(38G) OEIS A116966 & A116996 - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Software Libraries (/forum-10.html) +--- Forum: General Software Library (/forum-13.html) +--- Thread: (38G) OEIS A116966 & A116996 (/thread-3573.html) (38G) OEIS A116966 & A116996 - Gerald H - 04-07-2015 08:58 AM The programme N13245 sets up the Sequence App to produce A116966 in U1 & the partial sums (A116996) in U2. http://oeis.org/A116966 http://oeis.org/A116996 The sub-programme SEQSET cleans the Sequence App & sets flags as I prefer. N13245 RUN SEQSET: RECURSE(U,(N-1)+IFTE(U3(N-1)==1,2,IFTE(U3(N-1)==2,0,1)),1,3)►U1(N): CHECK 1: RECURSE(U,N*(N+1)/2+IFTE(U3(N)==2,1,0),1,4)►U2(N): CHECK 2: RECURSE(U,N MOD 4,1,2)►U3(N): SEQSET SELECT Sequence: UNCHECK 0: 0►NumFont: 0►Simult: 2►Angle: 1►InvCross: 1►NumStep: 1►Format: 1►NumCol: 1►NumStart: 6►NumRow: RECURSE(U,0,0,0)►U1(N): Ans►U2(N): Ans►U3(N): Ans►U4(N): Ans►U5(N): Ans►U6(N): Ans►U7(N): Ans►U8(N): Ans►U9(N): Ans►U0(N): RE: HP 38G: OEIS A116966 & A116996 - Gerald H - 04-10-2015 05:27 AM You might be interested to add U4 RECURSE(U,N/2*(N+1)+(U3(N)==2),1,4)►U4(N): CHECK 4: & compare the accuracy for terms > 1,000,000 compared with U2.