The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A303827 Number of ways of writing n as a sum of powers of 4, each power being used at most 5 times. 2

%I #23 Oct 06 2019 12:34:00

%S 1,1,1,1,2,2,1,1,2,2,1,1,2,2,1,1,3,3,2,2,4,4,2,2,3,3,1,1,2,2,1,1,3,3,

%T 2,2,4,4,2,2,3,3,1,1,2,2,1,1,3,3,2,2,4,4,2,2,3,3,1,1,2,2,1,1,4,4,3,3,

%U 6,6,3,3,5,5,2,2,4,4,2,2,6,6,4,4,8,8,4,4,6,6

%N Number of ways of writing n as a sum of powers of 4, each power being used at most 5 times.

%H Alois P. Heinz, <a href="/A303827/b303827.txt">Table of n, a(n) for n = 0..16383</a>

%F G.f.: Product_{k>=0} (1-x^(6*4^k))/(1-x^(4^k)).

%F G.f. A(x) satisfies: A(x) = (1 + x + x^2 + x^3 + x^4 + x^5) * A(x^4). - _Ilya Gutkovskiy_, Jul 09 2019

%e a(17) = 3 because 17=16+1=4+4+4+4+1=4+4+4+1+1+1+1+1.

%p b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<0, 0,

%p add(b(n-j*4^i, i-1), j=0..min(5, n/4^i))))

%p end:

%p a:= n-> b(n, ilog[4](n)):

%p seq(a(n), n=0..120); # _Alois P. Heinz_, May 01 2018

%t m = 100; A[_] = 1;

%t Do[A[x_] = (1+x+x^2+x^3+x^4+x^5) * A[x^4] + O[x]^m // Normal, {m}];

%t CoefficientList[A[x], x] (* _Jean-François Alcover_, Oct 06 2019, after _Ilya Gutkovskiy_ *)

%Y Number of ways of writing n as a sum of powers of b, each power being used at most b+1 times: A117535 (b=3), this sequence (b=4), A303828 (b=5).

%Y Cf. A277872.

%K nonn,look

%O 0,5

%A _Seiichi Manyama_, May 01 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 June 16 19:52 EDT 2024. Contains 373432 sequences. (Running on oeis4.)