|
|
A088136
|
|
Primes such that sum of first and last digits is prime.
|
|
12
|
|
|
11, 23, 29, 41, 43, 47, 61, 67, 83, 89, 101, 131, 151, 181, 191, 211, 223, 229, 233, 239, 241, 251, 263, 269, 271, 281, 283, 293, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 601, 607, 617, 631, 641, 647, 661, 677, 691
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
MATHEMATICA
|
Select[Prime[Range[400]], PrimeQ[First[IntegerDigits[#]]+ Last[ IntegerDigits[ #]]]&] (* Harvey P. Dale, Jun 23 2017 *)
|
|
PROG
|
(Python)
from sympy import isprime, primerange
def ok(p): s = str(p); return isprime(int(s[0]) + int(s[-1]))
def aupto(limit): return [p for p in primerange(1, limit+1) if ok(p)]
(PARI) select( {is_A088136(p)=isprime(p\10^logint(p, 10)+p%10)&&isprime(p)}, primes(99)) \\ M. F. Hasler, Apr 23 2024
|
|
CROSSREFS
|
|
|
KEYWORD
|
easy,nonn,base,changed
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|