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.
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
Keywords
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.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
- Zhi-Wei Sun, Problems on combinatorial properties of primes, in: M. Kaneko, S. Kanemitsu and J. Liu (eds.), Number Theory: Plowing and Starring through High Wave Forms, Proc. 7th China-Japan Seminar (Fukuoka, Oct. 28--Nov. 1, 2013), Ser. Number Theory Appl., Vol. 11, World Sci., Singapore, 2015, pp. 169-187.
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}]
Comments