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.

Showing 1-4 of 4 results.

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

A099744 Palindromes n such that 10n01 is a prime.

Original entry on oeis.org

3, 5, 6, 222, 282, 353, 434, 555, 626, 656, 747, 828, 858, 929, 939, 10301, 10601, 11411, 11711, 12821, 12921, 13431, 13731, 14141, 14241, 14741, 15951, 16161, 17171, 17771, 18381, 18981, 19191, 19491, 19991, 20402, 20702, 22022, 22322
Offset: 1

Views

Author

N. J. A. Sloane, Nov 19 2004

Keywords

Crossrefs

Programs

  • Maple
    read transforms; pal:=[]; for n from 0 to 8000 do if digrev(n) = n then pal:=[op(pal),n]; fi; od:
    t0:=[]; u0:=[]; for n from 1 to nops(pal) do m:=pal[n]; p0:="10"; p1:="01"; t1:=cat(p0,m,p1); t1:=convert(t1,decimal,10); if isprime(t1) then t0:=[op(t0),m]; u0:=[op(u0),t1]; fi; od: t0; # u0 gives A099746.
  • Mathematica
    p = Select[ Range[ 22322], # == FromDigits[ Reverse[ IntegerDigits[ # ]]] &]; Select[p, PrimeQ[ FromDigits[ Join[{1, 0}, IntegerDigits[ # ], {0, 1}]]] &] (* Robert G. Wilson v, Nov 20 2004 *)
    Select[Range[23000],PalindromeQ[#]&&PrimeQ[FromDigits[Join[{1,0},IntegerDigits[ #],{0,1}]]]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Mar 26 2021 *)

Extensions

More terms from Robert G. Wilson v, Nov 19 2004

A032667 Digit '4' concatenated with a(n) is a prime.

Original entry on oeis.org

1, 3, 7, 19, 21, 31, 33, 39, 43, 49, 57, 61, 63, 67, 79, 87, 91, 99, 111, 127, 129, 133, 139, 153, 157, 159, 177, 201, 211, 217, 219, 229, 231, 241, 243, 253, 259, 261, 271, 273, 283, 289, 297, 327, 337, 339, 349, 357, 363, 373, 391, 397, 409
Offset: 1

Views

Author

Patrick De Geest, May 15 1998

Keywords

Comments

Obviously there can be no even terms in this sequence. - Alonso del Arte, Jun 18 2017

Examples

			Concatenate 4 and 1 to get 41, which is prime, so 1 is in the sequence.
Concatenate 4 and 3 to get 43, which is prime, so 3 is in the sequence.
Concatenate 4 and 5 to get 45 = 3^2 * 5, which is not prime, so 5 is not in the sequence.
		

Crossrefs

Cf. other digit 'd' concatenated with a(n) is prime sequences: A032664 (d = 1), A032665 (d = 2), A032666 (d = 3), A032668 (d = 5), A032669 (d = 6), A032670 (d = 7), A032671 (d = 8), A032672 (d = 9), A000040 (d = 0).

Programs

  • Mathematica
    Select[2Range[250] - 1, PrimeQ[FromDigits[Join[{4}, IntegerDigits[#]]]] &] (* Alonso del Arte, Jun 18 2017 *)
  • PARI
    isok(n) = isprime(eval(concat(4, Str(n)))); \\ Michel Marcus, Jun 19 2017

Extensions

Offset adjusted at the suggestion of Michel Marcus by Alonso del Arte, Jun 18 2017

A167724 Squares that becomes a prime number when prefixed with a 9.

Original entry on oeis.org

1369, 2401, 2809, 3481, 5929, 9409, 10201, 14161, 16129, 17689, 25921, 28561, 32761, 41209, 44521, 64009, 94249, 100489, 108241, 116281, 117649, 130321, 137641, 146689, 157609, 170569, 175561, 177241, 196249, 201601, 218089, 219961
Offset: 1

Views

Author

Claudio Meller, Nov 10 2009

Keywords

Comments

Subsequence of squares of A032672. - Michel Marcus, Jun 22 2016

Crossrefs

Cf. A032672.

Programs

  • Mathematica
    Select[Range[1, 500000, 2]^2, PrimeQ[FromDigits[Join[{9}, IntegerDigits[#]]]] &] (* G. C. Greubel, Jun 21 2016 *)
Showing 1-4 of 4 results.