%I #30 Sep 09 2017 23:28:09
%S 0,3,6,8,11,15,16,18,21,24,27,30,32,35,38,40,43,45,48,51,53,56,59,63,
%T 64,67,70,72,75,78,80,83,85,88,90,93,96,99,102,105,108,112,115,117,
%U 120,123,126,128,131,134,136,139,143,144,147,149,152,155,158,160,162,165,168,171,173,176,179,183,186,189,192,195
%N The infinite trunk of least squares beanstalk: The only infinite sequence such that a(0) = 0 and a(n-1) = a(n) - least number of squares (A002828) that sum to a(n).
%H Antti Karttunen, <a href="/A276573/b276573.txt">Table of n, a(n) for n = 0..10028</a>
%F a(n) = A276574(A276572(n)).
%F Other identities and observations. For all n >= 0:
%F A260731(a(n)) = n.
%F a(A260733(n+1)) = A005563(n).
%F A278517(n) <= a(n) <= A278519(n).
%F A010873(a(n)) = A278499(n). [Terms reduced modulo 4.]
%F A010877(a(n)) = A278488(n). [modulo 8.]
%F A046523(a(n)) = A278497(n). [Least number with the same prime signature.]
%F A008683(a(n)) = A278513(n).
%F A065338(a(n)) = A278498(n).
%F A278509(a(n)) = A278265(n).
%F A278216(a(n)) = A278516(n). [Number of children the n-th node of the trunk has.]
%o (Scheme) (define (A276573 n) (A276574 (A276572 n)))
%Y Cf. A002828, A005563, A255131, A260731, A260733, A262689, A276572, A276574, A276575 (first differences), A277016 (squares present), A277015 (their square roots), A277888 (primes), A278486 (numbers one more than a prime), A278265, A278487, A278488, A278491 (another subsequence), A278497, A278498, A278499, A278513, A278516, A278517, A278518, A278519, A278521, A278522.
%Y Cf. A277890 & A277891 (number of even and odd terms in each range. The latter seem to be slightly more numerous), A277889.
%Y Positions of nonzero terms in A278515.
%Y Subsequence of A278489, no common terms with A278490.
%Y Cf. also A179016, A259934, A276583, A276613, A276623 for similar constructions.
%K nonn
%O 0,2
%A _Antti Karttunen_, Sep 07 2016
%E Definition clarified and more identities added to the Formula section by _Antti Karttunen_, Nov 28 2016