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!)
A050805 Inserting any digit between adjacent digits of prime p never yields another prime. 3

%I #16 Aug 04 2021 13:27:39

%S 439,853,1013,1061,1109,1117,1153,1187,1213,1249,1259,1283,1291,1301,

%T 1303,1361,1427,1451,1489,1511,1523,1531,1583,1597,1607,1657,1733,

%U 1747,1753,1801,1873,1879,1913,1951,2069,2083,2137,2243,2251,2267,2293,2297

%N Inserting any digit between adjacent digits of prime p never yields another prime.

%H Reinhard Zumkeller, <a href="/A050805/b050805.txt">Table of n, a(n) for n = 1..10000</a>

%e 40309, 41319, 42327, 43339, 44349, 45359, 46369, 47379, 48389, and 49399 are all composite. Thus, 439, being prime, belongs to the sequence.

%t a[n_]:=Or@@PrimeQ[Table[FromDigits[Riffle[IntegerDigits[n],k]],{k,0,9}]]; Select[Prime[Range[5,350]],a[#]==False&] (* _Jayanta Basu_, May 30 2013 *)

%t Select[Prime[Range[400]],NoneTrue[Table[FromDigits[Riffle[ IntegerDigits[ #],d]],{d,0,9}],PrimeQ]&] (* _Harvey P. Dale_, Aug 04 2021 *)

%o (Haskell)

%o import Data.List (intersperse)

%o a050805 n = a050805_list !! (n-1)

%o a050805_list = filter ((all (== 0)) . f) a000040_list where

%o f p = map (i $ show p) "0123456789"

%o i ps d = a010051' (read $ intersperse d ps :: Integer)

%o -- _Reinhard Zumkeller_, May 07 2013

%Y Cf. A050674-A050719, A050806.

%Y Cf. A010051, A000040.

%K nonn,nice,base

%O 1,1

%A _Patrick De Geest_, Oct 15 1999

%E Offset corrected by _Reinhard Zumkeller_, May 07 2013

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 April 25 01:06 EDT 2024. Contains 371964 sequences. (Running on oeis4.)