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”).

A253216
Smallest of four primes in arithmetic progression with common difference 6 and digit sum prime.
1
1091, 15791, 30091, 369991, 421691, 501191, 661091, 1101091, 1539991, 2042591, 2210291, 2542091, 2811191, 3351191, 3512291, 3864691, 4411391, 4675591, 5960791, 5992291, 5998691, 6884191, 6918391, 7516891, 8608591, 8697791, 9297091, 9622891, 9646291, 12013091
OFFSET
1,1
LINKS
EXAMPLE
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.
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.
MATHEMATICA
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
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 *)
PROG
(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, ", ")))
CROSSREFS
KEYWORD
nonn,base
AUTHOR
K. D. Bajpai, Dec 29 2014
EXTENSIONS
Definition corrected by Harvey P. Dale, May 26 2018
STATUS
approved