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.

A280444 Least positive integer m such that n - p(m) = x*(3x-1)/2 + y*(3y+1)/2 for some nonnegative integers x and y, or 0 if no such m exists, where p(.) is the partition function given by A000041.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Jan 03 2017

Keywords

Comments

The conjecture in A280455 asserts that a(n) > 0 for all n > 0.

Examples

			a(12) = 4 since 12 - p(4) = 12 - 5 = 7 = 0*(3*0-1)/2 + 2*(3*2+1)/2.
a(35) = 6 since 35 - p(6) = 35 - 11 = 24 = 4*(3*4-1)/2 + 1*(3*1+1)/2.
a(4327) = 15 since 4327 - p(15) = 4327 - 176 = 4151 = 16*(3*16-1)/2 + 50*(3*50+1)/2.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
    p[n_]:=p[n]=PartitionsP[n];
    Pen[n_]:=Pen[n]=SQ[24n+1]&&Mod[Sqrt[24n+1],6]==1;
    Do[m=1;Label[bb];If[p[m]>n,Goto[cc]];Do[If[Pen[n-p[m]-x(3x-1)/2],Print[n," ",m];Goto[aa]],{x,0,(Sqrt[24(n-p[m])+1]+1)/6}];m=m+1;Goto[bb];Label[cc];Print[n," ",0];Label[aa];Continue,{n,1,80}]