The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A253848 Primes p such that the digit sums of p, p + 4 and p^2 + 4 are all prime. 1
 43, 61, 151, 197, 199, 397, 601, 661, 733, 823, 883, 1051, 1093, 1123, 1297, 1381, 1453, 1471, 1543, 1831, 1873, 2281, 2371, 2551, 2683, 2713, 2953, 2971, 3181, 3343, 3361, 3583, 3613, 3631, 4003, 4153, 4261, 4513, 4603, 4621, 4801, 4951, 5011, 5101, 5323, 5413 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 LINKS K. D. Bajpai, Table of n, a(n) for n = 1..10000 EXAMPLE a(1) = 43: 43+4 = 47; 43^2+4 = 1853. Their digit sums 4+3 = 7, 4+7 = 11 and 1+8+5+3 = 17 are all prime. a(2) = 61: 61+4 = 65; 61^2+4 = 3725. Their digit sums 6+1 = 7, 6+5 = 11 and 3+7+2+5 = 17 are all prime. MAPLE digsum:= n -> convert(convert(n, base, 10), `+`): select(p -> isprime(p) and isprime(digsum(p)) and isprime(digsum(p+4)) and isprime(digsum(p^2+4)), [2, seq(2*k+1, k=1..10^4)]); # Robert Israel, Jan 16 2015 MATHEMATICA k = 4; Select[Prime[Range[1, 2000]], PrimeQ[Plus @@ IntegerDigits[#]] && PrimeQ[Plus @@ IntegerDigits[k+#]] && PrimeQ[Plus @@ IntegerDigits[k+#^2]] &] Select[Prime[Range[800]], AllTrue[Total/@IntegerDigits[{#, #+4, #^2+4}], PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Aug 14 2015 *) PROG (PARI) for( n=1, 10^2, p=prime(n); k=4; if(isprime(eval(Str(sumdigits(p)))) & isprime(eval(Str(sumdigits(p+k)))) &isprime(eval(Str(sumdigits(p^2+k)))), print1(p, " ", ) ) ) (PARI) forprime(p=1, 10000, if(isprime(sumdigits(p)) && isprime(sumdigits(p+4)) && isprime(sumdigits(p^2+4)), print1(p", "))) \\ Dana Jacobsen, Sep 07 2015 (Perl) use ntheory ":all"; forprimes { say if is_prime(sumdigits(\$_)) && is_prime(sumdigits(\$_+4)) && is_prime(sumdigits(\$_*\$_+4)) } 1000; # Dana Jacobsen, Sep 07 2015 CROSSREFS Cf. A000040, A076162, A243586. Sequence in context: A063641 A129928 A317393 * A245742 A295702 A102269 Adjacent sequences: A253845 A253846 A253847 * A253849 A253850 A253851 KEYWORD nonn,base AUTHOR K. D. Bajpai, Jan 16 2015 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified June 14 15:00 EDT 2024. Contains 373400 sequences. (Running on oeis4.)