login
A106711
Smaller prime of the set of two consecutive primes each of whose sum of digits is prime.
0
2, 3, 5, 7, 23, 41, 43, 61, 83, 131, 137, 151, 173, 191, 193, 197, 223, 227, 263, 281, 311, 313, 317, 331, 353, 373, 397, 401, 443, 461, 463, 571, 593, 599, 601, 641, 643, 733, 751, 797, 821, 823, 827, 881, 883, 911, 971, 1013, 1031, 1033, 1091, 1093, 1097, 1103
OFFSET
1,1
EXAMPLE
a(5)=23 is a term because it is the first of two consecutive primes (23 and 29), each of which has a prime sum of digits: 2 + 3 = 5 and 2 + 9 = 11.
MATHEMATICA
Select[Partition[Prime[Range[200]], 2, 1], PrimeQ[Total[IntegerDigits[ #[[1]]]]] && PrimeQ[Total[IntegerDigits[#[[2]]]]]&][[All, 1]] (* or *) Prime[#]&/@SequencePosition[Table[If[PrimeQ[Total[IntegerDigits[n]]], 1, 0], {n, Prime[Range[200]]}], {1, 1}][[All, 1]] (* The second program requires Mathematica version 10 or later, but is more efficient because it only requires testing each prime for its sum of digits once. *) (* Harvey P. Dale, Jul 27 2017 *)
Prime@Select[Range[500], PrimeQ[Total[IntegerDigits[Prime[#]]]] && PrimeQ[Total[IntegerDigits[Prime[# + 1]]]] &] (* César Eliud Lozada, Mar 31 2024 *)
CROSSREFS
Sequence in context: A210566 A155873 A362678 * A235110 A048398 A059170
KEYWORD
base,nonn
AUTHOR
Shyam Sunder Gupta, May 14 2005
EXTENSIONS
Definition clarified by Harvey P. Dale, Jul 27 2017
STATUS
approved