A240088 The number of ways of writing n as an ordered sum of a triangular number (A000217), a square (A000290) and a pentagonal number (A000326).
1, 3, 3, 2, 3, 4, 4, 4, 3, 3, 5, 5, 5, 3, 3, 7, 7, 5, 2, 6, 5, 4, 8, 5, 6, 4, 8, 7, 5, 7, 4, 9, 6, 5, 4, 3, 9, 12, 9, 4, 7, 9, 8, 4, 6, 8, 7, 8, 4, 8, 9, 10, 9, 6, 10, 6, 7, 10, 9, 8, 7, 11, 7, 4, 10, 8, 10, 10, 7, 5, 10, 14, 11, 7, 6, 11, 10, 10, 4, 11, 10, 10, 13, 8, 7, 7, 13, 12, 8, 8, 6, 10, 17, 8, 10, 7, 16, 10, 3, 12, 9
Offset: 0
Keywords
Links
- Robert G. Wilson v and Robert Israel, Table of n, a(n) for n = 0..10000
- Zhi-Wei Sun, On universal sums of polygonal numbers, Science China Mathematics, Vol. 58, No. 7 (2015), 1367-1396; arXiv:0905.0635 [math.NT], 2009-2015 [Edited, _Felix Fröhlich_, Aug 24 2016].
- Zhi-Wei Sun, Various new conjectures involving polygonal numbers and primes, a message to the Number Theory List, May 8 2009.
Crossrefs
Programs
-
Maple
# requires Maple 17 and up with(SignalProcessing): N:= 10000; # to get terms up to a(N) A:= Array(0..N,datatype=float); B:= Array(0..N,datatype=float); C:= Array(0..N,datatype=float); for i from 0 to floor(sqrt(N)) do A[i^2]:= 1 od: for i from 0 to floor((1+sqrt(1+8*N))/2) do B[i*(i-1)/2]:= 1 od: for i from 0 to floor((1+sqrt(1+24*N))/6) do C[i*(3*i-1)/2]:= 1 od: R:= Convolution(Convolution(A,B),C); R:= evalhf(map(round,R)); # Note that a(i) = R[i+1] for i from 0 to N # Robert Israel, Apr 01 2014
-
Mathematica
p = Table[n (3n - 1)/2, {n, 0, 26}]; s = Table[n^2, {n, 0, 32}]; t = Table[n (n + 1)/2, {n, 0, 45}]; a = Sort@ Flatten@ Table[ p[[i]] + s[[j]] + t[[k]], {i, 26}, {j, 32}, {k, 45}]; Table[ Count[a, n], {n, 0, 105}]
Comments