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!)
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
a(n) ~ n log n. - Charles R Greathouse IV, May 11 2014
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:
seq(a(n), n=1..100); # Alois P. Heinz, May 10 2014
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
Sequence in context: A062679 A106093 A084666 * A004618 A030433 A242550
KEYWORD
nonn,base
AUTHOR
J. Lowell, May 09 2014
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 March 28 05:39 EDT 2024. Contains 371235 sequences. (Running on oeis4.)