The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A118118 Composite numbers that always remain composite when a single decimal digit of the number is changed. 4
 200, 204, 206, 208, 320, 322, 324, 325, 326, 328, 510, 512, 514, 515, 516, 518, 530, 532, 534, 535, 536, 538, 620, 622, 624, 625, 626, 628, 840, 842, 844, 845, 846, 848, 890, 892, 894, 895, 896, 898, 1070, 1072, 1074, 1075, 1076, 1078, 1130 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS The term "prime-proof" for this property is found on projecteuler.net (cf. link). The nontrivial subsequence A143641 is that of odd elements not ending in 5 (i.e. not ending in 0,2,4,5,6 or 8); it starts 212159,595631,872897,... - M. F. Hasler, Sep 04 2008 LINKS Paolo P. Lava, Table of n, a(n) for n = 1..10000 G. L. Honaker, Jr. and Chris Caldwell, Prime Curios! 200 Project Euler, Problem 200 (2008) EXAMPLE a(1) = 200 is in the sequence because changing any digit of 200 (for example 300, 220, or 209) is still composite. The integer 100 is not in the sequence because it can be changed to 107 which is prime. MAPLE with(numtheory): P:= proc(q) local d, j, k, ok, n; for n from 1 to q do d:=ilog10(n)+1;  ok:=1; for k from 1 to d do if ok=1 then for j from 0 to 9 do if isprime((10*trunc(n/10^k)+j)*10^(k-1)+(n mod 10^(k-1))); then ok:=0; break; fi; od; fi; od; if ok=1 then print(n); fi; od; end: P(10^6); # Paolo P. Lava, Nov 09 2015 MATHEMATICA unprimeableQ[n_] := Block[{d = IntegerDigits@ n, t = {}}, Do[AppendTo[t, FromDigits@ ReplacePart[d, i -> #] & /@ DeleteCases[Range[0, 9], x_ /; x == d[[i]]]], {i, Length@ d}]; ! AnyTrue[Flatten@ t, PrimeQ]]; Select[Range@ 1200, unprimeableQ] (* Michael De Vlieger, Nov 09 2015, Version 10 *) PROG (PARI) /* return 1 if no digit can be changed to make it prime; if d=1, print a prime if n is not prime-proof */ isA118118(n, d=0)={ forstep( k=n\10*10+1, n\10*10+9, 2, isprime(k) || next; d && print("prime:", k); return); if( n%2==0 || n%5==0, /* even or ending in 5: no other digit can make it prime, except for the case where the last digit is prime and the first digit is the only other nonzero one */ return( !isprime(n%10) || 9 < n % 10^( log(n+.5)\log(10) ) || (d && print("prime:", n%10)) )); o=10; until( n < o*=10, k=n-o*(n\o%10); for( i=0, 9, isprime(k) && return(d && print("prime:", k)); k+=o)); 1} \\ M. F. Hasler, Sep 04 2008 (MAGMA) IsA118118:=function(n); D:=Intseq(n); return forall{ : k in [1..#D], j in [0..9] | j eq D[k] or not IsPrime(Seqint(S)) where S:=Insert(D, k, k, [j]) }; end function; [ n: n in [1..1200] | IsA118118(n) ]; // Klaus Brockhaus, Feb 28 2011 CROSSREFS Cf. A143641, A050249. Sequence in context: A180104 A114984 A192545 * A124472 A247399 A078492 Adjacent sequences:  A118115 A118116 A118117 * A118119 A118120 A118121 KEYWORD easy,nonn,base AUTHOR Adam Panagos (adam.panagos(AT)gmail.com), May 12 2006 EXTENSIONS Edited by Charles R Greathouse IV, Aug 05 2010 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified January 29 14:23 EST 2020. Contains 331338 sequences. (Running on oeis4.)