OFFSET
1,1
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
EXAMPLE
a(2)=23. S(d)=5. 23+5=28. 28+1=29, the next prime in sequence. a(3)=61. S(d)=7. 61+7=68. 68-1=67, the next prime in sequence.
MATHEMATICA
ppQ[n_]:=Module[{sidn=Total[IntegerDigits[n[[1]]]]}, n[[1]]+sidn+1 == n[[2]]||n[[1]]+sidn-1==n[[2]]]; Transpose[Select[Partition[Prime[ Range[1500]], 2, 1], ppQ]][[1]] (* Harvey P. Dale, Mar 19 2012 *)
CROSSREFS
KEYWORD
easy,nonn,base
AUTHOR
Enoch Haga, Jan 19 2004
STATUS
approved