A308640 Number of ways to write n as (2^a*3^b)^2 + c*(2c+1) + d*(3d+1)/2, where a,b,c are nonnegative integers and d is an integer.
1, 1, 1, 2, 2, 3, 1, 2, 4, 1, 4, 3, 3, 4, 1, 7, 2, 2, 7, 2, 5, 2, 4, 5, 1, 8, 5, 2, 3, 4, 6, 2, 3, 4, 2, 3, 7, 6, 5, 4, 7, 6, 1, 7, 5, 4, 6, 4, 4, 1, 6, 9, 2, 5, 3, 3, 5, 6, 7, 4, 7, 5, 4, 6, 6, 6, 4, 4, 5, 3, 9, 7, 4, 8, 2, 8, 5, 4, 10, 3, 9, 6, 5, 6, 4, 11, 7, 5, 8, 4, 7, 7, 8, 8, 2, 14, 6, 3, 8, 4
Offset: 1
Keywords
Examples
a(230) = 1 with 230 =(2^3*3^0)^2 + 3*(2*3+1) + 10*(3*10+1)/2. a(2058) = 1 with 2058 = (2^0*3^0)^2 + 25*(2*25+1) + (-23)*(3*(-23)+1)/2. a(26550) = 1 with 26550 = (2^0*3^3)^2 + 14*(2*14+1) + 130*(3*130+1)/2. a(39433) = 1 with 39433 = (2*3^3)^2 + 135*(2*135+1) + 17*(3*17+1)/2. a(505330) = 1 with 505330 = (2*3^2)^2 + 198*(2*198+1) + 533*(3*533+1)/2. a(537830) = 1 with 537830 = (2^5*3^2)^2 + 402*(2*402+1) + (-296)*(3*(-296)+1)/2.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
- Zhi-Wei Sun, On universal sums of polygonal numbers, Sci. China Math. 58 (2015), No. 7, 1367-1396.
Crossrefs
Programs
-
Mathematica
PenQ[n_]:=PenQ[n]=IntegerQ[Sqrt[24n+1]]; tab={};Do[r=0;Do[If[PenQ[n-4^a*9^b-c(2c+1)],r=r+1],{a,0,Log[4,n]},{b,0,Log[9,n/4^a]},{c,0,(Sqrt[8(n-4^a*9^b)+1]-1)/4}];tab=Append[tab,r],{n,1,100}];Print[tab]
Comments