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!)
A143641 Odd prime-proof numbers (A118118) not ending in 5. 4
212159, 595631, 872897, 1203623, 1293671, 1566691, 1702357, 1830661, 3716213, 3964169, 4103917, 4134953, 4173921, 4310617, 4376703, 4586509, 4703801, 4749187, 4801387, 4928909, 5005353, 5051179, 5231739, 5258901, 5317573 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Most "prime-proof" numbers are even or multiples of 5, cf. A118118.
Nicol & Selfridge proved that this sequence is infinite. - Charles R Greathouse IV, Jan 27 2014
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000 (terms 1..3655 from Klaus Brockhaus)
Michael Filaseta, Mark Kozek, Charles Nicol and John Selfridge, Composites that remain composite after changing a digit, Journal of Combinatorics and Number Theory 2 (2011), pp. 25-36.
Project Euler, Problem 200: Prime-proof Squbes (2008).
PROG
(PARI) forstep( i=1, 10^7, 2, i%5 || next; isA118118(i) && print1(i", "))
(Magma) IsA143641:=function(n); D:=Intseq(n); return Intseq(n)[1] ne 5 and forall{ <k, j>: k in [1..#D], j in [0..9] | not IsPrime(Seqint(Insert(D, k, k, [j]))) }; end function; [ n: n in [1..4000000 by 2] | IsA143641(n) ]; // Klaus Brockhaus, Mar 03 2011
(Python)
from sympy import isprime
from itertools import count, islice
def selfplusneighs(n):
s = str(n); d = "0123456789"; L = len(s)
yield from (int(s[:i]+c+s[i+1:]) for c in d for i in range(L))
def agen():
for n in count(1, 2):
if n%5 == 0: continue
if all(not isprime(k) for k in selfplusneighs(n)):
yield n
print(list(islice(agen(), 8))) # Michael S. Branicky, Aug 16 2022
CROSSREFS
Cf. A118118.
Sequence in context: A231418 A246999 A186694 * A184383 A234829 A184652
KEYWORD
base,nonn
AUTHOR
M. F. Hasler, Aug 27 2008, Sep 04 2008
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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 14 12:35 EDT 2024. Contains 374318 sequences. (Running on oeis4.)