login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A126021
Primes p such that |100-p|, |1000-p|, |10000-p| and |100000-p| are also primes.
1
71, 281, 743, 827, 1151, 1163, 1193, 1571, 1877, 3221, 3671, 7703, 9719, 9929, 10433, 10601, 10613, 10739, 11789, 11831, 13163, 15683, 16661, 19181, 19433, 22739, 25439, 26981, 28211, 33911, 37997, 46691, 50123, 50177, 51131, 53189, 57527
OFFSET
1,1
LINKS
EXAMPLE
71 is included because it is prime and (100-71) and (1000-71) and (10000-71) and (100000-71) are also primes.
MAPLE
select(p-> andmap(j-> isprime(abs(10^j-p)), [$2..5]),
[seq(ithprime(i), i=1..10000)])[]; # Alois P. Heinz, Aug 28 2019
MATHEMATICA
Select[Prime[Range[10000]], And @@ PrimeQ /@{100-#, 1000-#, 10000-#, 100000-#}&]
Select[Prime[Range[6000]], AllTrue[Abs[10^Range[2, 5]-#], PrimeQ]&] (* Harvey P. Dale, May 25 2023 *)
PROG
(Magma) [p: p in PrimesUpTo(70000)| IsPrime(100-p)and IsPrime(1000-p) and IsPrime(10000-p) and IsPrime(100000-p)] // Vincenzo Librandi, Jan 29 2011
CROSSREFS
Sequence in context: A140856 A114992 A158734 * A142548 A158738 A142143
KEYWORD
easy,less,nonn
AUTHOR
Harvey P. Dale, Feb 27 2007
EXTENSIONS
Name clarified by Peter Munn, Aug 23 2019
STATUS
approved