login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A320002 a(0) = 1; for n > 0, a(n) = A002828(n) * a(n-A002828(n)), where A002828(n) is the least number of squares that add up to n. 3

%I #19 Nov 26 2018 17:13:11

%S 1,1,2,3,3,6,9,12,18,18,36,54,54,108,162,216,216,432,432,648,864,1296,

%T 1944,2592,3888,3888,7776,11664,15552,23328,34992,46656,69984,104976,

%U 139968,209952,209952,419904,629856,839808,1259712,1679616,2519424,3779136,5038848,7558272,11337408,15116544,22674816,22674816,45349632

%N a(0) = 1; for n > 0, a(n) = A002828(n) * a(n-A002828(n)), where A002828(n) is the least number of squares that add up to n.

%C Product of A002828(x) computed over all x encountered when map x -> x - A002828(x) is iterated, starting from x = n, until 0 is reached.

%C Sequence is monotonic because A255131 is monotonic.

%C All terms are 3-smooth (A003586).

%H Antti Karttunen, <a href="/A320002/b320002.txt">Table of n, a(n) for n = 0..121</a>

%F a(0) = 1; for n > 0, a(n) = A002828(n) * a(n-A002828(n)).

%t Nest[Append[#1, #2 #1[[-#2]] ] & @@ {#, If[First@ # > 0, 1, Length@ First@ Split@ # + 1] &@ SquaresR[Range@ 4, Length@ #]} &, {1}, 50] (* _Michael De Vlieger_, Nov 25 2018, after _Harvey P. Dale_ at A002828 *)

%o (PARI)

%o istwo(n:int) = { my(f); if(n<3, return(n>=0); ); f=factor(n>>valuation(n, 2)); for(i=1, #f[, 1], if(bitand(f[i, 2], 1)==1&&bitand(f[i, 1], 3)==3, return(0))); 1 };

%o isthree(n:int) = { my(tmp=valuation(n, 2)); bitand(tmp, 1)||bitand(n>>tmp, 7)!=7 };

%o A002828(n) = if(issquare(n), !!n, if(istwo(n), 2, 4-isthree(n))); \\ From A002828

%o A255131(n) = (n-A002828(n));

%o A320002(n) = { my(m=1, v); while(n>0, v = A002828(n); m *= v; n -= v); (m); };

%o (PARI) A320002(n) = if(0==n,1,A002828(n)*A320002(n-A002828(n)));

%Y Cf. A002828, A003586, A255131, A276573.

%Y Cf. also A320008, A320009.

%K nonn

%O 0,3

%A _Antti Karttunen_, Nov 24 2018

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 22:17 EDT 2024. Contains 371964 sequences. (Running on oeis4.)