OFFSET
1,2
EXAMPLE
Sum of the digits of 21 and 22 is 2+1+2+2 = 7 and 21+22 = 43. Both 7 and 43 are prime, hence 21 is a term.
MAPLE
sod:=proc(n) local b: b:=n->convert(n, base, 10): sum(b(n)[j], j=1..nops(b(n))) end: a:=proc(n) if isprime(2*n+1) and isprime(sod(n)+sod(n+1)) then n fi end: seq(a(n), n=1..280); # Emeric Deutsch, Apr 01 2007
MATHEMATICA
Select[Range[300], And@@PrimeQ[{2#+1, Total[IntegerDigits[#]]+ Total[ IntegerDigits[#+1]]}]&] (* Harvey P. Dale, May 20 2012 *)
PROG
(Magma) [ n: n in [1..200] | IsPrime(&+Intseq(n, 10) + &+Intseq(n+1, 10)) and IsPrime(2*n+1) ]; /* Klaus Brockhaus, Apr 06 2007 */
CROSSREFS
KEYWORD
nonn,base
AUTHOR
J. M. Bergot, Mar 28 2007
EXTENSIONS
Edited and extended by Emeric Deutsch and Klaus Brockhaus, Apr 01 2007
STATUS
approved