Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #11 May 26 2018 18:30:53
%S 1091,15791,30091,369991,421691,501191,661091,1101091,1539991,2042591,
%T 2210291,2542091,2811191,3351191,3512291,3864691,4411391,4675591,
%U 5960791,5992291,5998691,6884191,6918391,7516891,8608591,8697791,9297091,9622891,9646291,12013091
%N Smallest of four primes in arithmetic progression with common difference 6 and digit sum prime.
%H K. D. Bajpai, <a href="/A253216/b253216.txt">Table of n, a(n) for n = 1..2500</a>
%e a (1) = 1091: 1091 + 6 = 1097; 1097 + 6 = 1103; 1103 + 6 = 1109; all four are prime. Their digit sums 1+0+9+1 = 11; 1+0+9+7 = 17; 1+1+0+3 = 5 and 1+1+0+9 = 11 are also prime.
%e a(2) = 15791: 15791 + 6 = 15797; 15797 + 6 = 15803; 15803 + 6 = 15809; all four are prime. Their digit sums 1+5+7+9+1 = 23, 1+5+7+9+7 = 29, 1+5+8+0+3 = 17 and 1+5+8+0+9 = 23 are also prime.
%t A253216 = {}; Do[d = 6; k = Prime[n]; k1 = k + d; k2 = k + 2d; k3 = k + 3d; If[PrimeQ[k1] && PrimeQ[k2] && PrimeQ[k3] && PrimeQ[Plus @@ IntegerDigits[k]] && PrimeQ[Plus @@ IntegerDigits[k1]] && PrimeQ[Plus @@ IntegerDigits[k2]] && PrimeQ[Plus @@ IntegerDigits[k3]], AppendTo[A253216, k]], {n, 1000000}]; A253216
%t prQ[{a_,b_,c_,d_}]:=AllTrue[{b,c,d},PrimeQ]&&AllTrue[Total/@ (IntegerDigits/@ {a,b,c,d}),PrimeQ]; Select[#+{0,6,12,18}& /@Prime[Range[800000]],prQ][[All,1]] (* The program uses the AllTrue function from Mathematica version 10 *) (* _Harvey P. Dale_, May 26 2018 *)
%o (PARI) for( n=1, 10^6, k=prime(n); k1=k+6; k2=k+12; k3=k+18; if(isprime(k1)&isprime(k2)&isprime(k3) &isprime(eval(Str(sumdigits(k)))) &isprime(eval(Str(sumdigits(k1)))) &isprime(eval(Str(sumdigits(k2)))) &isprime(eval(Str(sumdigits(k3)))), print1(k,", ")))
%Y Cf. A000040, A033447, A062088, A253140.
%K nonn,base
%O 1,1
%A _K. D. Bajpai_, Dec 29 2014
%E Definition corrected by _Harvey P. Dale_, May 26 2018