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-3 of 3 results.

A100028 Values of n for which the decimal number 10...030...01 is an n-digit prime.

Original entry on oeis.org

3, 5, 7, 9, 23, 29, 33, 185, 267, 307, 757, 897, 1571, 2977, 3831, 4595, 6573, 9511, 11651, 15641, 68885, 69883
Offset: 1

Views

Author

Harvey Dubner (harvey(AT)dubner.com), Nov 20 2004

Keywords

Examples

			The corresponding primes are 131, 10301, 1003001, 100030001, 10000000000300000000001, etc.
		

Crossrefs

Programs

  • Mathematica
    IntegerLength/@Select[Table[FromDigits[Join[PadRight[{1},n,0],{3},PadLeft[ {1},n,0]]],{n,35000}],PrimeQ] (* Harvey P. Dale, Dec 20 2019 *)

Formula

a(n) = 2*(A171376(n+1))+1. - Chai Wah Wu, Aug 20 2015

A171553 a(n) = 9*10^n + 100^n + 1.

Original entry on oeis.org

11, 191, 10901, 1009001, 100090001, 10000900001, 1000009000001, 100000090000001, 10000000900000001, 1000000009000000001, 100000000090000000001, 10000000000900000000001, 1000000000009000000000001, 100000000000090000000000001, 10000000000000900000000000001
Offset: 0

Views

Author

Jason Earls, Dec 11 2009

Keywords

Crossrefs

Cf. A100459.

Programs

  • Magma
    [1+9*10^n+100^n: n in [0..15]]; // Vincenzo Librandi, Jul 29 2014
    
  • Mathematica
    Join[{11}, Table[FromDigits[Join[{1}, PadRight[{}, n, 0], {9}, PadRight[{}, n, 0], {1}]], {n, 0, 20}]] (* Harvey P. Dale, Apr 26 2013 *)
    Table[100^n + 9 * 10^n + 1, {n, 0, 19}] (* Alonso del Arte, Jul 28 2014 *)
  • PARI
    Vec(-(1910*x^2-1030*x+11)/((x-1)*(10*x-1)*(100*x-1)) + O(x^100)) \\ Colin Barker, Jul 29 2014

Formula

G.f.: -(1910*x^2-1030*x+11) / ((x-1)*(10*x-1)*(100*x-1)). - Colin Barker, Jul 29 2014
From Elmo R. Oliveira, Sep 06 2024: (Start)
E.g.f.: exp(x)*(9*exp(9*x) + exp(99*x) + 1).
a(n) = 111*a(n-1) - 1110*a(n-2) + 1000*a(n-3) for n > 2. (End)

Extensions

More terms from Harvey P. Dale, Apr 26 2013

A261450 Smallest k such that A011557(n)//k//rev is prime, where rev is the string of digits of A011557(n) reversed (retaining any leading zeros) and // denotes concatenation.

Original entry on oeis.org

0, 3, 3, 3, 5, 8, 29, 5, 8, 15, 3, 21, 8, 3, 21, 3, 8, 18, 20, 92, 110, 51, 102, 6, 57, 23, 5, 114, 8, 32, 41, 6, 236, 6, 39, 60, 110, 62, 36, 17, 53, 21, 161, 41, 159, 57, 137, 42, 83, 114, 126, 80, 30, 36, 278, 107, 425, 111, 68, 68, 95, 29, 8, 53, 426, 48
Offset: 0

Views

Author

Felix Fröhlich, Aug 23 2015

Keywords

Comments

Is a(n) = 0 for any n > 0? If such an n exists, that n is a term of A000079 (cf. Greathouse, 2010).
All terms are congruent to 0 or 2 modulo 3, since if k is congruent to 1 modulo 3, 1000...0//k//00...01 is divisible by 3 and thus not prime.
a(n) <= A100026(n-1) with equality when a(n) is a palindrome. - Michel Marcus, Sep 11 2015

Examples

			a(1) = 3, because 10001, 10101, and 10201 are composite and 10301 is prime.
a(6) = 29, because 29 is the smallest k such that 1000000//k//0000001 is prime. The decimal expansion of that prime is 1000000290000001.
		

Crossrefs

Programs

  • Mathematica
    Table[k = 0; d = IntegerDigits[10^n]; While[! PrimeQ@ FromDigits@ Join[d, IntegerDigits@ k, Reverse@ d], k++]; k, {n, 0, 65}] (* Michael De Vlieger, Aug 26 2015 *)
  • PARI
    a(n) = x=10^n; k=0; while(!ispseudoprime(eval(Str(x, k, concat(Vecrev(Str(x)))))), k++); k
    
  • Perl
    use ntheory ":all"; for my $n (0..50) { my($t,$c)=(0); $t++ while $c=1 . 0 x $n . $t . 0 x $n . 1, !is_prob_prime($c); say "$n $t"; } # Dana Jacobsen, Oct 02 2015
Showing 1-3 of 3 results.