OFFSET
1,1
COMMENTS
See comments in A178548.
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..10000
EXAMPLE
From Robert G. Wilson v, Aug 23 2010: (Start)
2*13 + prime(3) = 26 + 5 = 31 = prime(11), digsum(13)=digsum(31)=4
2*2 + prime(4) = 4 + 7 = 11 = prime(5), digsum(2)=digsum(11)=2
2*151 + prime(5) = 302 + 11 = 313 = prime(65), digsum(151)=digsum(313)=7
2*5 + prime(6) = 10 + 13 = 23 = prime(9), digsum(5)=digsum(23)=5, etc.
(End)
MATHEMATICA
f[n_] := Block[{p = 2}, While[q = 2 p + Prime[n + 2]; !PrimeQ@q || Plus @@ IntegerDigits@p != Plus @@ IntegerDigits@q, p = NextPrime@p]; q]; Array[f, 53] (* Robert G. Wilson v, Aug 23 2010 *)
PROG
(PARI) a(n) = {my(p=2, q=prime(n+2)+2*p); while ((!isprime(q) || (sumdigits(p) != sumdigits(q))), p = nextprime(p+1); q = prime(n+2) + 2*p); q; }
vector(70, n, a(n)) \\ G. C. Greubel and Michel Marcus, Feb 26 2019
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Ulrich Krug (leuchtfeuer37(AT)gmx.de), May 29 2010
EXTENSIONS
All comments removed by Robert G. Wilson v, Aug 23 2010
a(37) corrected by G. C. Greubel, Feb 16 2019
STATUS
approved