OFFSET
1,1
LINKS
Donovan Johnson and Giovanni Resta, Table of n, a(n) for n = 1..1033 (terms < 10^12, first 500 terms from Donovan Johnson)
C. Rivera, See also related puzzle
EXAMPLE
nextprime(93639) = 93639 + (3+7+7+7+7+13) = 93683.
MATHEMATICA
Reap[For[n = 4, n <= 2*10^7, n = If[PrimeQ[n+1], n+2, n+1], If[n + Total[Times @@@ FactorInteger[n] ] == NextPrime[n], Print[n]; Sow[n]]]][[2, 1]] (* Jean-François Alcover, Oct 18 2013 *)
cspfQ[n_]:=CompositeQ[n]&&NextPrime[n]==n+Total[Flatten[Table[ #[[1]], #[[2]]] &/@FactorInteger[n]]]; Select[Range[29*10^6], cspfQ] (* Harvey P. Dale, Oct 14 2017 *)
CROSSREFS
KEYWORD
nonn,nice
AUTHOR
Patrick De Geest, Sep 15 1999
EXTENSIONS
Offset corrected by Donovan Johnson, Oct 18 2013
STATUS
approved