cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A099678 Numbers n such that 10n01 is a prime.

Original entry on oeis.org

3, 5, 6, 15, 17, 20, 21, 23, 27, 30, 38, 47, 48, 54, 56, 57, 65, 68, 71, 72, 83, 84, 90, 92, 102, 105, 110, 116, 122, 126, 134, 135, 143, 155, 156, 162, 164, 173, 182, 183, 197, 198, 200, 201, 203, 204, 210, 213, 222, 225, 227, 231, 233, 236, 249, 261, 264, 270, 281, 282, 290
Offset: 1

Views

Author

N. J. A. Sloane, Nov 19 2004

Keywords

Crossrefs

Cf. A032672, A100502 (for the primes).

Programs

  • Maple
    t0:=[]; u0:=[]; for n from 0 to 500 do p0:="10"; p1:="01"; t1:=cat(p0,n,p1); t1:=convert(t1,decimal,10); if isprime(t1) then t0:=[op(t0),n]; u0:=[op(u0),t1]; fi; od: t0;
    # Alternative:
    filter:= n -> isprime( 10^(ilog10(n)+4)+100*n+1):
    select(filter, [$1..1000]); # Robert Israel, Mar 16 2017
  • Mathematica
    Select[ Range[280], PrimeQ[ FromDigits[Join[{1, 0}, IntegerDigits[ # ], {0, 1}]]] &] (* Robert G. Wilson v, Nov 20 2004 *)
  • PARI
    isok(n) = isprime(eval(concat(concat("10", n), "01"))); \\ Michel Marcus, Jul 29 2015