A336431 Number of ordered ways to write n as the sum of a practical number (A005153) and a generalized heptagonal number (A085787).
1, 2, 1, 1, 2, 2, 1, 3, 2, 1, 1, 2, 2, 1, 2, 2, 2, 1, 4, 3, 2, 2, 1, 3, 3, 1, 1, 3, 3, 2, 4, 2, 3, 2, 3, 4, 3, 2, 2, 3, 2, 3, 4, 1, 2, 3, 3, 3, 3, 3, 1, 3, 1, 4, 4, 2, 3, 4, 2, 3, 4, 2, 3, 4, 1, 4, 5, 1, 2, 3, 3, 3, 4, 4, 2, 4, 1, 4, 4, 1, 2, 6, 3, 3, 5, 2, 4, 5, 2, 4, 5, 1, 3, 4, 2, 2, 5, 3, 2, 6
Offset: 1
Keywords
Examples
Set p_7(x) = x*(5*x-3)/2. a(14) = 1, and 14 = 1 + p_7(-2) with 1 practical. a(80) = 1, and 80 = 80 + p_7(0) with 80 practical. a(425) = 1, and 425 = 160 + p_7(-10) with 160 practical. a(1340) = 1, and 1340 = 800 + p_7(15) with 800 practical. a(2273) = 1, and 2273 = 544 + p_7(-26) with 544 practical. a(5591) = 1, and 5591 = 2752 + p_7(34) with 2752 practical.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
- Zhi-Wei Sun, Conjectures on representations involving primes, in: M. Nathanson (ed.), Combinatorial and Additive Number Theory II, Springer Proc. in Math. & Stat., Vol. 220, Springer, Cham, 2017, pp. 279-310. (See also arXiv, arXiv:1211.1588 [math.NT], 2012-2017.)
Programs
-
Mathematica
f[n_]:=f[n]=FactorInteger[n]; Pow[n_, i_]:=Pow[n,i]=Part[Part[f[n], i], 1]^(Part[Part[f[n], i], 2]); Con[n_]:=Con[n]=Sum[If[Part[Part[f[n], s+1], 1]<=DivisorSigma[1, Product[Pow[n, i], {i, 1, s}]]+1, 0, 1], {s, 1, Length[f[n]]-1}]; pr[n_]:=pr[n]=n>0&&(n<3||Mod[n, 2]+Con[n]==0); tab={};Do[r=0;Do[If[pr[n-x*(5*x-3)/2],r=r+1],{x,-Floor[(Sqrt[40n+9]-3)/10],(Sqrt[40n+9]+3)/10}];tab=Append[tab,r],{n,1,100}];Print[tab]
Comments