OFFSET
1,1
LINKS
Paolo P. Lava, First 60 couples [k, P(k)]
EXAMPLE
P(256) = 1619, P(257) = 1621; Sd(256) + Sd(257) = 13 + 14 = 27 and Sd(1619) + Sd(1621) = 17 + 10 = 27.
MAPLE
T:=proc(w) local x, y, z; x:=w; y:=0; for z from 1 to ilog10(x)+1 do y:=y+(x mod 10); x:=trunc(x/10); od; y; end:
P:= proc(q) local a, b, k, n;
for n from 1 to q do if ithprime(n+1)-ithprime(n)=2 then if T(ithprime(n))+T(ithprime(n+1))=T(n)+T(n+1) then print(ithprime(n)); fi; fi; od; end: P(10^5);
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Paolo P. Lava, Sep 30 2016
STATUS
approved