HP Forums

Full Version: (38G) OEIS A116966 & A116996
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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):
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.
Reference URL's