login
Number of ways to write n as a*(3*a-1)/2 + b*(3*b-1)/2 + 3^c + 3^d with a,b,c,d nonnegative integers.
27

%I #25 Apr 25 2018 14:01:47

%S 0,1,1,2,1,2,2,2,1,2,2,4,1,3,2,3,2,3,3,2,1,2,3,3,2,2,2,4,4,4,3,2,3,3,

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

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

%N Number of ways to write n as a*(3*a-1)/2 + b*(3*b-1)/2 + 3^c + 3^d with a,b,c,d nonnegative integers.

%C Conjecture: a(n) > 0 for all n > 1. In other words, any integer n > 1 can be written as the sum of two pentagonal numbers and two powers of 3.

%C a(n) > 0 for all n = 2..7*10^6. See A303434 for the numbers of the form x*(3*x-1)/2 + 3^y with x and y nonnegative integers. See also A303389 and A303432 for similar conjectures.

%H Zhi-Wei Sun, <a href="/A303401/b303401.txt">Table of n, a(n) for n = 1..10000</a>

%H Zhi-Wei Sun, <a href="http://math.scichina.com:8081/sciAe/EN/abstract/abstract517007.shtml">On universal sums of polygonal numbers</a>, Sci. China Math. 58(2015), no. 7, 1367-1396.

%H Zhi-Wei Sun, <a href="http://dx.doi.org/10.1016/j.jnt.2016.11.008">Refining Lagrange's four-square theorem</a>, J. Number Theory 175(2017), 167-190.

%H Zhi-Wei Sun, <a href="http://maths.nju.edu.cn/~zwsun/179b.pdf">New conjectures on representations of integers (I)</a>, Nanjing Univ. J. Math. Biquarterly 34(2017), no. 2, 97-120.

%F a(78) = 1 with 78 = 3*(3*3-1)/2 + 3*(3*3-1)/2 + 3^3 + 3^3.

%F a(285) = 1 with 285 = 3*(3*1-1)/2 + 11*(3*11-1)/2 + 3^3 + 3^4.

%F a(711) = 1 with 711 = 9*(3*9-1)/2 + 20*(3*20-1)/2 + 3^0 + 3^1.

%F a(775) = 1 with 775 = 7*(3*7-1)/2 + 21*(3*21-1)/2 + 3^3 + 3^3.

%F a(3200) = 1 with 12*(3*12-1)/2 + 44*(3*44-1)/2 + 3^3 + 3^4.

%F a(13372) = 1 with 13372 = 17*(3*17-1)/2 + 65*(3*65-1)/2 + 3^4 + 3^8.

%F a(16545) = 1 with 16545 = 0*(3*0-1)/2 + 98*(3*98-1)/2 + 3^0 + 3^7.

%t SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];

%t PenQ[n_]:=PenQ[n]=SQ[24n+1]&&(n==0||Mod[Sqrt[24n+1]+1,6]==0);

%t f[n_]:=f[n]=FactorInteger[n];

%t g[n_]:=g[n]=Sum[Boole[Mod[Part[Part[f[n],i],1],4]==3&&Mod[Part[Part[f[n],i],2],2]==1],{i,1,Length[f[n]]}]==0;

%t QQ[n_]:=QQ[n]=(n==0)||(n>0&&g[n]);

%t tab={};Do[r=0;Do[If[QQ[12(n-3^j-3^k)+1],Do[If[PenQ[n-3^j-3^k-x(3x-1)/2],r=r+1],{x,0,(Sqrt[12(n-3^j-3^k)+1]+1)/6}]],{j,0,Log[3,n/2]},{k,j,Log[3,n-3^j]}];tab=Append[tab,r],{n,1,80}];Print[tab]

%Y Cf. A000244, A000326, A303233, A303338, A303363, A303389, A303393, A303399, A303428, A303432, A303434.

%K nonn

%O 1,4

%A _Zhi-Wei Sun_, Apr 23 2018