login
Largest of five consecutive primes the sum of the digits of each of which is prime.
1

%I #9 Jul 14 2016 11:36:10

%S 11,337,1109,1307,2087,2089,2593,2609,3187,3271,3299,3301,3307,3691,

%T 4159,4177,4201,4421,4423,4441,4447,5437,7127,7129,7457,8627,9859,

%U 10103,12107,12109,12347,12473,12479,13009,14327,14341,14347,14369,14387

%N Largest of five consecutive primes the sum of the digits of each of which is prime.

%H Harvey P. Dale, <a href="/A106717/b106717.txt">Table of n, a(n) for n = 1..1000</a>

%e a(2)=337 is a term because this is Largest of five consecutive primes i.e. 311,313,317,331 and 337, whose sum of digits is prime i.e. 3+1+1=5, 3+1+3=7, 3+1+7=11, 3+3+1=7 and 3+3+7=13.

%t Transpose[Select[Partition[Prime[Range[2000]],5,1],AllTrue[Total/@ (IntegerDigits/@ #),PrimeQ]&]]//Last (* or *) Prime[#]&/@Transpose[ SequencePosition[ Table[ If[ PrimeQ[Total[IntegerDigits[n]]],1,0],{n,Prime[Range[2000]]}],{1,1,1,1,1}]][[2]] (* The programs use the AllTrue and SequencePosition functions from Mathematica version 10 *) (* _Harvey P. Dale_, Jul 14 2016 *)

%K base,nonn

%O 1,1

%A _Shyam Sunder Gupta_, May 14 2005

%E Definition clarified by _Harvey P. Dale_, Jul 14 2016