login
Number of ways of writing n as a sum of powers of 4, each power being used at most four times.
6

%I #23 Nov 19 2024 22:11:39

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

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

%U 5,2,2,2,4,2,2,2,4,2,2,2,5,3,3,3,4,1

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

%C Also known as the hyper 4-ary partition sequence, often denoted h_4(n).

%C Contains A002487 as a subsequence.

%H Timothy B. Flowers, <a href="/A277872/b277872.txt">Table of n, a(n) for n = 0..10000</a>

%H K. Courtright and J. Sellers, <a href="http://www.integers-ejcnt.org/e6/e6.Abstract.html">Arithmetic properties for hyper m-ary partition functions</a>, Integers, 4 (2004), A6.

%H Timothy B. Flowers, <a href="https://www.emis.de/journals/JIS/VOL20/Flowers/flowers3.html">Extending a Recent Result on Hyper m-ary Partition Sequences</a>, Journal of Integer Sequences, Vol. 20 (2017), #17.6.7.

%H T. B. Flowers and S. R. Lockard, <a href="http://www.integers-ejcnt.org/q10/q10.Abstract.html">Identifying an m-ary partition identity through an m-ary tree</a>, Integers, 16 (2016), A10.

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

%F G.f.: Product_{j>=0} (1+x^(4^j)+x^(2*4^j)+x^(3*4^j)+x^(4*4^j)).

%F a(0)=1 and for n>0, a(4n)=a(n)+a(n-1), a(4n+r)=a(n) for r=1,2,3.

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

%e a(72) = 4 because 72 = 64+4+4 = 64+4+1+1+1+1 = 16+16+16+16+4+4 = 16+16+16+16+4+1+1+1+1.

%t n:=250;

%t r:=3;

%t (* To get up to n-th term, need r such that 4^r < n < 4^(r+1) *)

%t h4 := CoefficientList[ Series[ Product[ (1 - q^(5*4^i))/(1 - q^(4^i)) , {i, 0, r}], {q, 0, n} ], q]

%Y Cf. A002487, A054390, A277873.

%K nonn

%O 0,5

%A _Timothy B. Flowers_, Nov 03 2016