login
Number of distinct representations of n as a sum of four terms of A020330 (including 0), where order does not matter.
5

%I #16 Apr 10 2021 03:20:50

%S 1,0,0,1,0,0,1,0,0,1,1,0,1,1,0,1,1,0,1,1,1,1,0,1,1,1,1,0,1,0,2,1,0,2,

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

%U 1,3,2,1,3,2,1,4,2,1,3,2,1,3,2,1,4,2,1,3,1,1,4,2,1,4,2,0,4,1,1,4,2,1,3,3,0,4,1

%N Number of distinct representations of n as a sum of four terms of A020330 (including 0), where order does not matter.

%H Amiram Eldar, <a href="/A298731/b298731.txt">Table of n, a(n) for n = 0..10000</a>

%H Parthasarathy Madhusudan, Dirk Nowotka, Aayush Rajasekaran and Jeffrey Shallit, <a href="https://drops.dagstuhl.de/opus/volltexte/2018/9600">Lagrange's Theorem for Binary Squares</a>, in: I. Potapov, P. Spirakis and J. Worrell (eds.), 43rd International Symposium on Mathematical Foundations of Computer Science (MFCS 2018), Schloss Dagstuhl, 2018, pp. 18:1-18:14; <a href="https://arxiv.org/abs/1710.04247">arXiv preprint</a>, arXiv:1710.04247 [math.NT], 2017-2018.

%e For n = 45, the a(45) = 4 solutions are 45 = 15+15+15 = 36+3+3+3 = 15+10+10+10.

%t v = Table[k + k * 2^Floor[Log2[k] + 1], {k, 0, 8}]; a[n_] := Length @ IntegerPartitions[n, {4}, v]; Table[a[n], {n, 0, v[[-1]]}] (* _Amiram Eldar_, Apr 09 2021 *)

%Y Cf. A020330, A290334, A290335 (which is the same sequence where order matters).

%K nonn

%O 0,31

%A _Jeffrey Shallit_, Jan 25 2018