login
A277111
Lesser of twin primes P(k) and P(k+1) such that Sd(P(k)) + Sd(P(k+1)) = Sd(k) + Sd(k+1), where Sd(x) is the sum of digits of x.
1
1619, 2309, 2339, 12239, 28109, 35081, 37307, 37571, 50549, 51059, 51719, 62129, 64919, 65729, 87539, 89519, 91079, 113759, 121439, 121631, 160649, 170351, 174329, 182129, 191249, 205949, 215459, 223679, 231839, 254039, 270269, 285119, 301841, 317489, 319829
OFFSET
1,1
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
Sequence in context: A231048 A231423 A252011 * A345597 A345856 A206537
KEYWORD
nonn,base,easy
AUTHOR
Paolo P. Lava, Sep 30 2016
STATUS
approved