HP Forums

Full Version: (38G) OEIS A228297: An Interesting Irregular Sequence
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
These three programmes together produce the Online Encyclopaedia of Integer Sequences' sequence A228297.

The first programme takes a positive integer input from any previous calculation & finds the integer quotient for division by 5.

eg If you enter

77

on the home screen, the programme returns

15

as Ans, which you can see on the Home screen after pressing SHIFT ENTER.

Code:
IQUOT5

(Ans-(Ans MOD 5))/5:

The next programme takes a positive integer, eg 67, input from any previous calculation & calculates eg the 67th member of the OEIS sequence A27868.

https://oeis.org/A027868

Code:
A27868

Ans►A:
0►C:
DO
A:
RUN IQUOT5:
Ans►A:
Ans+C►C:
UNTIL
A==0
END:
C:

Thr third programme takes a positive integer, eg 777,777,777,777, input from any previous calculation & calculates eg the 777,777,777,777th member of the OEIS sequence A228297, making use of the two programmes above.

https://oeis.org/A228297

Code:
A228297

Ans►N:
RUN IQUOT5:
N-Ans-1►M:
DO
1+M►M:
RUN A27868:
UNTIL
M+Ans≥N
END:
M:
Reference URL's