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.

A306790 Number of ways to write n as x*(3*x+1)/2 + y*(y+1)*(y+2)/2 + z*(z+1)*(z+2)/6, where x is a nonzero integer, and y and z are nonnegative integers.

Original entry on oeis.org

1, 2, 1, 1, 4, 3, 1, 3, 3, 1, 3, 3, 2, 4, 5, 3, 3, 4, 4, 2, 2, 4, 3, 3, 6, 3, 4, 4, 3, 3, 2, 4, 3, 3, 7, 5, 4, 5, 7, 3, 3, 6, 3, 4, 5, 3, 5, 4, 3, 3, 3, 6, 4, 3, 5, 3, 6, 5, 1, 5, 7, 6, 4, 5, 4, 6, 5, 2, 5, 7, 7, 5, 7, 5, 5, 3, 5, 3, 2, 6, 5, 7, 5, 1, 6, 5, 7, 3, 5, 6, 6, 6, 4, 3, 4, 7, 4, 3, 6, 6
Offset: 1

Views

Author

Zhi-Wei Sun, Mar 10 2019

Keywords

Comments

Conjecture: a(n) > 0 for all n > 0. In other words, each positive integer n can be written as the sum of a positive generalized pentagonal number, a tetrahedral number and a tetrahedral number times three.
This has been verified for all n = 1..2*10^7.

Examples

			a(59) = 1 with 59 = (-3)*(3*(-3)+1)/2 + 2*3*4/2 + 5*6*7/6.
a(19694) = 1 with 19694 = 20*(3*20+1)/2 + 10*11*12/2 + 47*48*49/6.
a(19919) = 1 with 19919 = (-45)*(3*(-45)+1)/2 + 30*31*32/2 + 22*23*24/6.
a(33989) = 1 with 33989 = 55*(3*55+1)/2 + 20*21*22/2 + 52*53*54/6.
a(60769) = 1 with 60769 = 46*(3*46+1)/2 + 47*48*49/2 + 23*24*25/6.
		

Crossrefs

Programs

  • Mathematica
    f[n_]:=f[n]=Binomial[n+2,3]; PQ[n_]:=PQ[n]=IntegerQ[Sqrt[24n+1]];
    tab={};Do[r=0;Do[If[f[x]>=n/3,Goto[cc]];Do[If[f[y]>=n-3*f[x],Goto[bb]];If[PQ[n-3*f[x]-f[y]],r=r+1];Label[aa],{y,0,n-1-3*f[x]}];Label[bb],{x,0,(n-1)/3}];Label[cc];tab=Append[tab,r],{n,1,100}];Print[tab]