login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A127312
Numbers k such that the sum of the digits of k and of k+1 is prime and 2k + 1 is also prime.
0
1, 2, 3, 5, 6, 8, 11, 14, 15, 18, 20, 21, 23, 26, 30, 33, 35, 36, 41, 44, 50, 51, 53, 54, 56, 63, 65, 68, 74, 78, 81, 83, 86, 90, 95, 96, 99, 105, 111, 113, 114, 116, 120, 125, 128, 131, 134, 135, 140, 141, 146, 153, 155, 158, 168, 173, 176, 186, 191, 194, 198, 200
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
Sequence in context: A266542 A095172 A179101 * A081830 A238006 A329289
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