cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A303401 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.

Original entry on oeis.org

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, 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, 3, 3, 2, 4, 2, 4, 5, 4, 5, 1, 3, 4
Offset: 1

Views

Author

Zhi-Wei Sun, Apr 23 2018

Keywords

Comments

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.
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.

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
    PenQ[n_]:=PenQ[n]=SQ[24n+1]&&(n==0||Mod[Sqrt[24n+1]+1,6]==0);
    f[n_]:=f[n]=FactorInteger[n];
    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;
    QQ[n_]:=QQ[n]=(n==0)||(n>0&&g[n]);
    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]

Formula

a(78) = 1 with 78 = 3*(3*3-1)/2 + 3*(3*3-1)/2 + 3^3 + 3^3.
a(285) = 1 with 285 = 3*(3*1-1)/2 + 11*(3*11-1)/2 + 3^3 + 3^4.
a(711) = 1 with 711 = 9*(3*9-1)/2 + 20*(3*20-1)/2 + 3^0 + 3^1.
a(775) = 1 with 775 = 7*(3*7-1)/2 + 21*(3*21-1)/2 + 3^3 + 3^3.
a(3200) = 1 with 12*(3*12-1)/2 + 44*(3*44-1)/2 + 3^3 + 3^4.
a(13372) = 1 with 13372 = 17*(3*17-1)/2 + 65*(3*65-1)/2 + 3^4 + 3^8.
a(16545) = 1 with 16545 = 0*(3*0-1)/2 + 98*(3*98-1)/2 + 3^0 + 3^7.