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!)
A034809 Numbers k such that the concatenation of k and previous_prime(k) is a prime. 2

%I #20 Apr 06 2021 01:56:22

%S 4,5,9,10,16,24,33,36,42,46,51,53,56,59,63,66,67,69,75,76,78,81,87,96,

%T 102,106,108,111,114,116,123,125,129,130,135,137,144,145,147,148,153,

%U 156,159,170,171,177,179,180,184,187,190,192,195,196,198,207,211,214

%N Numbers k such that the concatenation of k and previous_prime(k) is a prime.

%H Jon E. Schoenfield, <a href="/A034809/b034809.txt">Table of n, a(n) for n = 1..10000</a> (first 1001 terms from Harvey P. Dale)

%e k=156 is a term because the largest prime < 156 is 151 and '156151' is a prime.

%t Select[Range[250],PrimeQ[FromDigits[Join[IntegerDigits[#], IntegerDigits[ NextPrime[ #,-1]]]]]&] (* _Harvey P. Dale_, Jul 10 2017 *)

%o (Python)

%o from sympy import isprime, prevprime

%o def ok(n): return isprime(int(str(n) + str(prevprime(n))))

%o print(list(filter(ok, range(3, 215)))) # _Michael S. Branicky_, Apr 05 2021

%Y Cf. A034808-A034821.

%K nonn,base

%O 1,1

%A _Patrick De Geest_, Oct 15 1998

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 March 28 16:58 EDT 2024. Contains 371254 sequences. (Running on oeis4.)