A210531
Number of nonnegative integers k
1, 1, 1, 2, 2, 1, 2, 4, 2, 2, 2, 3, 2, 2, 4, 5, 4, 2, 3, 7, 5, 1, 2, 7, 4, 2, 7, 5, 6, 1, 5, 9, 4, 4, 6, 9, 9, 2, 5, 12, 9, 3, 5, 6, 8, 5, 6, 13, 4, 2, 8, 6, 11, 6, 11, 14, 8, 2, 4, 7, 4, 5, 7, 29, 8, 3, 5, 8, 11, 4, 13, 16, 13, 2, 7, 12, 13, 6, 10, 16, 10, 6, 15, 9, 13, 3, 9, 20, 11, 8, 11, 20, 9, 2, 8, 22, 14, 6, 15, 15
Offset: 1
Keywords
Examples
a(22)=1 since 22+2^3=30 is practical.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 1..5000
- G. Melfi, On two conjectures about practical numbers, J. Number Theory 56 (1996) 205-210 [MR96i:11106].
- Zhi-Wei Sun, Conjectures involving primes and quadratic forms, arXiv:1211.1588 [math.NT], 2012-2017.
Crossrefs
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) a[n_]:=a[n]=Sum[If[pr[n+k^3]==True,1,0],{k,0,n-1}] Do[Print[n," ",a[n]],{n,1,100}]
Comments