login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A088136 Primes such that sum of first and last digits is prime. 12

%I #12 Apr 24 2024 13:00:23

%S 11,23,29,41,43,47,61,67,83,89,101,131,151,181,191,211,223,229,233,

%T 239,241,251,263,269,271,281,283,293,401,409,419,421,431,433,439,443,

%U 449,457,461,463,467,479,487,491,499,601,607,617,631,641,647,661,677,691

%N Primes such that sum of first and last digits is prime.

%H Michael S. Branicky, <a href="/A088136/b088136.txt">Table of n, a(n) for n = 1..10000</a>

%t Select[Prime[Range[400]],PrimeQ[First[IntegerDigits[#]]+ Last[ IntegerDigits[ #]]]&] (* _Harvey P. Dale_, Jun 23 2017 *)

%o (Python)

%o from sympy import isprime, primerange

%o def ok(p): s = str(p); return isprime(int(s[0]) + int(s[-1]))

%o def aupto(limit): return [p for p in primerange(1, limit+1) if ok(p)]

%o print(aupto(691)) # _Michael S. Branicky_, Nov 23 2021

%o (PARI) select( {is_A088136(p)=isprime(p\10^logint(p,10)+p%10)&&isprime(p)}, primes(99)) \\ _M. F. Hasler_, Apr 23 2024

%Y Cf. A008040 (primes), A010051 (isprime), A000030 (first digit of n), A010879 (last digit of n).

%Y Cf. A046704, A007953, A088133, A088134, A088135.

%K easy,nonn,base

%O 1,1

%A _Zak Seidov_, Sep 20 2003

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 4 12:58 EDT 2024. Contains 374921 sequences. (Running on oeis4.)