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.
%I A280054 #13 Jan 30 2017 12:04:30 %S A280054 1,2,3,4,9,23,53,193,1012,11428,414069,89236803,281079668014, %T A280054 49673575524946259,3690344289594918623401179, %U A280054 2363083530686659576336864121757607550,1210869542685904980187672572977511794639836071291151196 %N A280054 Index of first occurrence of n in A280053, the nachos numbers based on squares. %C A280054 Analysis from _Lars Blomberg_, Jan 08 2017 (Start) %C A280054 Consider the sequence of sums of squares, q(n), n=1,2,3,... (A000330): %C A280054 1, 5, 14, 30, 55, 91, 140, 204, 285, 385, 506, 650, 819, 1015, 1240, 1496, ... %C A280054 which has formula q(n) = n*(n+1)*(2*n+1)/6. %C A280054 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 %C A280054 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. %C A280054 We also require that s<q(n), otherwise we must pick a larger n. In other words, r must be less than the interval between q(n-1) and q(n), that is r < q(n-1)-q(n) = n^2 %C A280054 Calculate n=floor(sqrt(r))+1 and from this we get s=q(n-1)+r. %C A280054 Note that the q sequence need not be explicitly calculated and stored. %C A280054 Examples: %C A280054 r.........n....q(n-1).......q(n)........s..phases %C A280054 4.........3.........5........14.........9.......5 %C A280054 9.........4........14........30........23.......6 %C A280054 23........5........30........55........53.......7 %C A280054 53........8.......140.......204.......193.......8 %C A280054 193......14.......819......1015......1012.......9 %C A280054 1012.....32.....10416.....11440.....11428......10 %C A280054 11428...107....402641....414090....414069......11 %C A280054 414069..644..88822734..89237470..89236803......12 %C A280054 ... %C A280054 The above values were confirmed by direct calculation. %C A280054 (End) %H A280054 Lars Blomberg, <a href="/A280054/b280054.txt">Table of n, a(n) for n = 1..24</a> %Y A280054 Cf. A280053. %K A280054 nonn %O A280054 1,2 %A A280054 _N. J. A. Sloane_, Jan 07 2017 %E A280054 More terms from _Lars Blomberg_, Jan 08 2017