A308656 Number of ways to write n as (2^a*9^b)^2 + c*(2c+1) + d*(3d+1), where a and b are nonnegative integers, and c and d are integers.
1, 1, 1, 3, 2, 3, 3, 2, 3, 1, 4, 2, 1, 4, 3, 4, 3, 5, 4, 3, 6, 2, 2, 4, 3, 6, 2, 4, 5, 3, 6, 4, 4, 4, 4, 4, 4, 1, 4, 5, 5, 2, 3, 3, 2, 8, 3, 4, 5, 3, 5, 3, 3, 5, 3, 7, 1, 3, 5, 4, 6, 3, 6, 2, 2, 6, 5, 4, 6, 6, 7, 3, 4, 9, 5, 4, 5, 3, 4, 4, 11, 5, 5, 12, 5, 7, 5, 4, 10, 2, 7, 8, 4, 8, 7, 12, 5, 5, 5, 5
Offset: 1
Keywords
Examples
a(13) = 1 with 13 = (2^0*9^0)^2 + 2*(2*2+1) + (-1)*(3*(-1)+1). a(3515) = 1 with 3515 = (2^0*9^1)^2 + 0*(2*0+1) + (-34)*(3*(-34)+1). a(124076) = 1 with 124076 = (2^3*9^1)^2 + 206*(2*206+1) + 106*(3*106+1). a(141518) = 1 with 141518 = (2^1*9^2)^2 + (-188)*(2*(-188)+1) + 122*(3*122+1). a(345402) = 1 with 345402 = (2^7*9^0)^2 + 18*(2*18+1) + (-331)*(3*(-331)+1).
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
Crossrefs
Programs
-
Mathematica
PQ[n_]:=PQ[n]=IntegerQ[Sqrt[12n+1]]; tab={};Do[r=0;Do[If[PQ[n-81^a*4^b-x(2x+1)],r=r+1],{a,0,Log[81,n]},{b,0,Log[4,n/81^a]},{x,-Floor[(Sqrt[8(n-81^a*4^b)+1]+1)/4],(Sqrt[8(n-81^a*4^b)+1]-1)/4}];tab=Append[tab,r],{n,1,100}];Print[tab]
Comments