cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A280054 Index of first occurrence of n in A280053, the nachos numbers based on squares.

Original entry on oeis.org

1, 2, 3, 4, 9, 23, 53, 193, 1012, 11428, 414069, 89236803, 281079668014, 49673575524946259, 3690344289594918623401179, 2363083530686659576336864121757607550, 1210869542685904980187672572977511794639836071291151196
Offset: 1

Views

Author

N. J. A. Sloane, Jan 07 2017

Keywords

Comments

Analysis from Lars Blomberg, Jan 08 2017 (Start)
Consider the sequence of sums of squares, q(n), n=1,2,3,... (A000330):
1, 5, 14, 30, 55, 91, 140, 204, 285, 385, 506, 650, 819, 1015, 1240, 1496, ...
which has formula q(n) = n*(n+1)*(2*n+1)/6.
The term A280053(x) can be computed by repeatedly subtracting the largest q(n)<=x from x until 0 is reached. For example, 8 = 5+1+1+1, so A280053(8)=4
Note that A280054 is strictly increasing. Let r be the last term so far in A280054, and s the next term. We must find the smallest term in q such that s-q(n-1) = r, or s=q(n-1)+r. Therefore s will have one more phase than r, and it will be the smallest possible s.
We also require that s
Calculate n=floor(sqrt(r))+1 and from this we get s=q(n-1)+r.
Note that the q sequence need not be explicitly calculated and stored.
Examples:
r.........n....q(n-1).......q(n)........s..phases
4.........3.........5........14.........9.......5
9.........4........14........30........23.......6
23........5........30........55........53.......7
53........8.......140.......204.......193.......8
193......14.......819......1015......1012.......9
1012.....32.....10416.....11440.....11428......10
11428...107....402641....414090....414069......11
414069..644..88822734..89237470..89236803......12
...
The above values were confirmed by direct calculation.
(End)

Crossrefs

Cf. A280053.

Extensions

More terms from Lars Blomberg, Jan 08 2017