|
|
A242265
|
|
Primes that become composite numbers if the most significant digit is removed.
|
|
2
|
|
|
19, 29, 59, 79, 89, 109, 127, 139, 149, 151, 157, 163, 181, 191, 193, 199, 227, 233, 239, 251, 257, 263, 269, 277, 281, 293, 349, 409, 421, 433, 439, 449, 457, 463, 487, 491, 499, 509, 521, 557, 563, 569, 577, 587, 593, 599, 677, 691, 709, 727, 733, 739, 751
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
127 is a term because 127 is prime but 27 is composite.
131 is not a term because 131 and 31 are both prime.
|
|
MAPLE
|
a:= proc(n) option remember; local p, m;
p:= `if`(n=1, 1, a(n-1));
do p:= nextprime(p);
m:= irem(p, 10^(length(p)-1));
if m>1 and not isprime(m) then return p fi
od
end:
|
|
MATHEMATICA
|
Select[Prime[Range[5, 200]], PrimeOmega[FromDigits[Drop[IntegerDigits[#], 1]]] > 1 &] (* Alonso del Arte, May 10 2014 *)
Select[Prime[Range[200]], CompositeQ[FromDigits[Rest[IntegerDigits[ #]]]]&] (* Harvey P. Dale, Mar 09 2016 *)
|
|
PROG
|
(Sage)
[x for x in primes(1000) if not(is_prime(x-(x.digits(base=10)[-1])*10^(floor(log(x, base=10))))) and x-(x.digits(base=10)[-1])*10^(floor(log(x, base=10)))!=1and x-(x.digits(base=10)[-1])*10^(floor(log(x, base=10)))!=0] # Tom Edgar, May 10 2014
(PARI) drop(v)=v[2..#v];
iscomposite(n)=n>3 && !isprime(n);
is(n)=isprime(n) && n>9 && iscomposite(subst(Pol(drop(digits(n))), 'x, 10)) \\ Charles R Greathouse IV, May 11 2014
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|