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-10 of 21 results. Next

A085824 Numbers n such that the smallest prime containing exactly n 0's (A037053) requires only two nonzero digits.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15, 16, 17, 18, 19, 20, 21, 23, 24, 25, 26, 27, 28, 30, 34, 35, 36, 37, 38, 39, 41, 44, 45, 48, 51, 52, 54, 55, 56, 57, 59, 61, 64, 66, 68, 77, 80, 83, 85, 97, 99, 100, 102, 103, 104, 106, 109, 111, 112, 114, 119, 120, 122, 127, 128
Offset: 1

Views

Author

Robert G. Wilson v, Jul 04 2003

Keywords

Comments

In the first one thousand primes containing exactly n zeros, 140 use just two digits. 1008 is in the sequence.
Although this sequence probably thins out like the primes, it is infinite.
For indices n listed here (and no others), A037053(n) = a*10^(n+1)+b with a in {1,...,9} and b in {1, 3, 7, 9}. The sequence of numbers *not* in this sequence is 13, 22, 29, 31, 32, 33, 40, 42, 43, ... - M. F. Hasler, Feb 19 2016

Crossrefs

Cf. A037053.

Programs

  • PARI
    is_A085824(n)=forstep(m=n=10^(n+1),9*n,n,nextprime(m)M. F. Hasler, Feb 19 2016

Extensions

Sequence rechecked (per request) and edited by Charles R Greathouse IV, Aug 03 2010

A269230 Indices for which A037053(n), the smallest prime with n digits '0', does not have n consecutive digits '0'.

Original entry on oeis.org

32, 43, 46, 49, 50, 60, 69, 72, 73, 74, 78, 82, 84, 86, 88, 90, 91, 93, 94, 95, 98, 101, 107, 108, 110, 115, 116, 121, 123, 124, 125, 126, 130, 132, 136, 137, 139, 144, 147, 149, 152, 153, 154, 156, 158, 159, 160, 161, 163, 164, 166, 169, 170, 171, 172, 173, 176, 177, 178, 179
Offset: 1

Views

Author

M. F. Hasler, Feb 20 2016

Keywords

Comments

Sequence A085824 lists the indices n for which A037053(n) has only two nonzereo digits, i.e., A037053(n) = a*10^(n+1) + b, with 1 <= a,b <= 9.
It is conjectured that, apart from A037053(0) = 2, all other terms have three nonzero digits and are therefore of the form A037053(n) = a*10^(n+2) + b*10^k + c, where 1 <= a,b,c <= 9 and 1 <= k <= n+1.
Whenever 1 < k < n+1, the n digits '0' are not consecutive but separated in two "chunks" of length n-k+1 and k-1, respectively. These indices n are listed here.
I conjecture that k < n+1 for all n (where k is function of n, of course).
For most indices n listed here, the smallest prime with n consecutive digits '0' is of the above form with k = n+1, i.e., of the form ab0...0c = (10a+b)*10^(n+1) + c.
The first index n for which this is not the case remains to be found. It can be expected that for this index n, the least prime with n consecutive digits '0' is either of the form a0...0b0c = a*10^(n+3) + b*100 + c (in which case it equals A037053(n+1)) or of the form a0...0bc with a > 9 (in which case it equals A037053(n+1) if a = 0 (mod 10)).
Sequence A269260 lists the values a > 9 such that the least prime with (at least) n consecutive '0's equals nextprime(a*10^(n+1)), for the numbers n listed here. - M. F. Hasler, Feb 22 2016
The first two values of n that do not satisfy the above forms are 192 and 213. The least prime with 192 consecutive 0's is 11100...0007. The least prime with 213 consecutive 0's is 100...000499. - Chai Wah Wu, Mar 11 2018

Programs

  • PARI
    for(n=1,999,n+2<#(t=digits(A037053(n))) && !t[#t-2] && print1(n","))
    
  • PARI
    a269230=[32]; A269230(n)={my(t); while(n>#a269230, for(k=vecmax(a269230)+1,9e9, (t=A037053(k))>10^(k+2) && t%10^(k+2)>99 && (a269230=concat(a269230,k)) && break));a269230[n]} \\ M. F. Hasler, Feb 22 2016

A269233 a(n) = number of "candidate primes" < A037053(n). (See Comments for description and explanation.)

Original entry on oeis.org

0, 0, 3, 2, 1, 1, 5, 2, 2, 8, 1, 5, 12, 46, 20, 5, 1, 1, 22, 17, 31, 3, 51, 2, 7, 20, 32, 8, 10, 45, 17, 56, 93, 59, 5, 8, 31, 20, 1, 13, 57, 17, 44, 80, 3, 27, 88, 59, 3, 92, 198, 34, 34, 40
Offset: 0

Views

Author

Bob Selcoe, Feb 20 2016

Keywords

Comments

A037053(n) = the smallest prime containing exactly n zeros. After A037053(0)=2, the smallest possible terms ("candidate primes") in A037053 are of the form a[n zeros]b, a in {1..9}, b in {1,3,7,9}; the first such being 1[n zeros]1. These are followed by forms 1[n zeros]ab, 1[n-k zeros]a[k zeros]b {k=1..n}, then {2..9}[n-k zeros]a[k zeros]b, etc. The present sequence represents the number of smaller candidates which are excluded before a prime occurs. See Examples below and A037053 for additional details.
These numbers will never appear: 12k+4, 12k+6, 12k+9, 12k+11, for k = 0 to 2, and 12k, 12k+2, 12k+5, 12k+7, for k > 2. - Hans Havermann, Feb 23 2016
Additionally, 26 will never appear. - Hans Havermann, Mar 10 2016

Examples

			a(1)=0 because the smallest possible (candidate) prime containing one zero is 101, which is prime.
a(6)=5 because A037053(6)=20000003; the five smaller candidates {10000001, 10000003, 10000007, 10000009, 20000001} are composite.
a(13)=46 because A037053(13)=1000000000000037; the 36 smaller candidates of the form {1..9}[13 zeros]{1,3,7,9} are composite, as are the 10 candidates 1[13 zeros]{1,2}{1,3,7,9} and 1[13 zeros]3{1,3}.
		

Crossrefs

Cf. A037053, A270095 (records).

Extensions

Corrected a(15) & fixed Example typo. - Hans Havermann, Feb 21 2016

A034388 Smallest prime containing at least n consecutive identical digits.

Original entry on oeis.org

2, 11, 1117, 11113, 111119, 2999999, 11111117, 111111113, 1777777777, 11111111113, 311111111111, 2111111111111, 17777777777777, 222222222222227, 1333333333333333, 11111111111111119, 222222222222222221, 1111111111111111111, 1111111111111111111
Offset: 1

Views

Author

Keywords

Comments

For n in A004023, a(n) = A002275(n). For all other n > 1, a(n) has at least n+1 digits and is (for small n) often of the form a*10^n + b*(10^n-1)/9 or a*(10^n-1)/9*10 + b, with 1 <= a <= 9 and b in {1, 3, 7, 9}. However, for n = 24, 46, 48, 58, 60, 64, 66, ..., more digits are required. Only then a(n) can have a digit 0, and if it has, '0' is often the repeated digit. The first indices where a(n) has more than n+2 digits are n = 208, 277, 346, ... - M. F. Hasler, Feb 25 2016; corrected by Robert Israel, Feb 26 2016

Examples

			a(1) = 2 because this is the smallest prime.
a(2) = 11 because this repunit with n=2 digits is prime.
a(3) = 1117 is the smallest prime with 3 repeated digits.
a(19) = (10^19-1)/9 = R(19) is again a repunit prime. Since all primes with 18 consecutive repeated digits have at least 19 digits, also a(18) = a(19). The same happens for a(22) = a(23).
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local d, k,x,y,z,xs,ys,zs,c,cands;
      for d from n do
        cands:= NULL;
        for k from 0 to d-n do
          if k = 0 then zs:= [0] else zs:= [seq(i,i=1..10^k-1,2)] fi;
          if d=n+k then xs:= [0]; ys:= [$1..9] else xs:= [$10^(d-k-n-1)..10^(d-k-n)-1]; ys:= [$0..9] fi;
          cands:= cands, seq(seq(seq(z + 10^k*y*(10^n-1)/9 + x*10^(k+n), x = xs),y=ys),z=zs);
        od;
        cands:= sort([cands]);
        for c in cands do if isprime(c) then return(c) fi od;
      od
    end proc:
    map(f, [$1..30]); # Robert Israel, Feb 26 2016
  • Mathematica
    With[{s = Length /@ Split@ IntegerDigits@ # & /@ Prime@ Range[10^6]}, Prime@ Array[FirstPosition[s, #][[1]] &, Max@ Flatten@ s]] (* Michael De Vlieger, Aug 15 2018 *)
  • PARI
    A034388(n)={for(d=0,9, my(L=[],k=0); for(a=0,10^d-1,a<10^k||k++; L=setunion(L,vector(10-!a,c,[a*10^n+10^n\9*(c-(a>0)),1])*10^(d-k)));for(i=1,#L,if(L[i][2]>1, L[i][1]+L[i][2]>L[i][1]=nextprime(L[i][1]),ispseudoprime(L[i][1]))&&return(L[i][1])))} \\ M. F. Hasler, Feb 28 2016

Extensions

Edited by M. F. Hasler, Feb 25 2016
Edited by Robert Israel, Feb 26 2016

A037059 Smallest prime containing exactly n 3's.

Original entry on oeis.org

2, 3, 233, 2333, 23333, 313333, 3233333, 31333333, 333233333, 3233333333, 23333333333, 333313333333, 3333333333383, 33133333333333, 323333333333333, 1333333333333333, 23333333333333333, 333333133333333333, 3333313333333333333, 33313333333333333333
Offset: 0

Views

Author

Patrick De Geest, Jan 04 1999

Keywords

Comments

For almost all n >= 0, a(n) equals [10^(n+1)/3] with one of the (first) digits 3 replaced by a digit 1 or 2. We conjecture that in the few other cases (e.g., for n = 12, 119, ...) the statement holds with some digit 3 replaced by a digit among {4, 5, 7, 8}, except for the special case a(1) = 3. - M. F. Hasler, Feb 22 2016

Crossrefs

Programs

  • Mathematica
    f[n_, b_] := Block[{k = 10^(n + 1), p = Permutations[ Join[ Table[b, {i, 1, n}], {x}]], c = Complement[Table[j, {j, 0, 9}], {b}], q = {}}, Do[q = Append[q, Replace[p, x -> c[[i]], 2]], {i, 1, 9}]; r = Min[ Select[ FromDigits /@ Flatten[q, 1], PrimeQ[ # ] & ]]; If[r ? Infinity, r, p = Permutations[ Join[ Table[ b, {i, 1, n}], {x, y}]]; q = {}; Do[q = Append[q, Replace[p, {x -> c[[i]], y -> c[[j]]}, 2]], {i, 1, 9}, {j, 1, 9}]; Min[ Select[ FromDigits /@ Flatten[q, 1], PrimeQ[ # ] & ]]]]; Table[ f[n, 3], {n, 1, 18}]
    Table[Sort[Flatten[Table[Select[FromDigits/@Permutations[Join[{n},PadRight[{},i,3]]], PrimeQ],{n,0,9}]]][[1]],{i,20}] (* Harvey P. Dale, Feb 28 2015 *)
  • PARI
    A037059(n)={if(n==1,3,my(t=10^(n+1)\3); forvec(v=[[-1, n], [-2, -1]], ispseudoprime(p=t+10^(n-v[1])*v[2]) && return(p)); forvec(v=[[0, n], [1, 5]], ispseudoprime(p=t+10^v[1]*v[2]) && return(p)))} \\ M. F. Hasler, Feb 22 2016

Formula

a(n) = prime(A037058(n)). - Amiram Eldar, Jul 21 2025

Extensions

More terms from Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Mar 23 2003
More terms and a(0) = 2 prefixed by M. F. Hasler, Feb 22 2016

A037071 Smallest prime containing exactly n 9's.

Original entry on oeis.org

2, 19, 199, 1999, 49999, 199999, 2999999, 19999999, 799999999, 9199999999, 59999999999, 959999999999, 9919999999999, 59999999999999, 499999999999999, 9299999999999999, 99919999999999999, 994999999999999999, 9991999999999999999, 29999999999999999999, 989999999999999999999
Offset: 0

Views

Author

Patrick De Geest, Jan 04 1999

Keywords

Comments

We conjecture that for all n >= 0, a(n) equals [10^(n+1)/9]*9 with one of the (first) digits 9 replaced by a digit among {1, 2, 4, 5, 7, 8}. - M. F. Hasler, Feb 22 2016

Crossrefs

Programs

  • Mathematica
    f[n_, b_] := Block[{k = 10^(n + 1), p = Permutations[ Join[ Table[b, {i, 1, n}], {x}]], c = Complement[Table[j, {j, 0, 9}], {b}], q = {}}, Do[q = Append[q, Replace[p, x -> c[[i]], 2]], {i, 1, 9}]; r = Min[ Select[ FromDigits /@ Flatten[q, 1], PrimeQ[ # ] & ]]; If[r ? Infinity, r, p = Permutations[ Join[ Table[ b, {i, 1, n}], {x, y}]]; q = {}; Do[q = Append[q, Replace[p, {x -> c[[i]], y -> c[[j]]}, 2]], {i, 1, 9}, {j, 1, 9}]; Min[ Select[ FromDigits /@ Flatten[q, 1], PrimeQ[ # ] & ]]]]; Table[ f[n, 9], {n, 1, 20}]
  • PARI
    A037071(n)={my(t=10^(n+1)\9*9); forvec(v=[[-1, n], [-8, -1]], ispseudoprime(p=t+10^(n-v[1])*v[2]) && return(p));error} \\ M. F. Hasler, Feb 22 2016

Formula

a(n) = prime(A037070(n)). - Amiram Eldar, Jul 21 2025

Extensions

More terms from Vladeta Jovovic, Jan 10 2002
a(0) = 2 prepended by M. F. Hasler, Feb 22 2016

A037067 Smallest prime containing exactly n 7's.

Original entry on oeis.org

2, 7, 277, 1777, 47777, 727777, 7477777, 77767777, 577777777, 1777777777, 67777777777, 377777777777, 7177777777777, 17777777777777, 577777777777777, 2777777777777777, 77777767777777777, 377777777777777777, 2777777777777777777, 71777777777777777777
Offset: 0

Views

Author

Patrick De Geest, Jan 04 1999

Keywords

Comments

We conjecture that for all n >= 2, a(n) equals floor(10^(n+1)/9)*7 with one of the (first) digits 7 replaced by a digit among {0, ..., 6}. - M. F. Hasler, Feb 22 2016
The conjecture is false: a(668) = 7*(10^669-1)/9 + 10^276. - Robert Israel, Jul 13 2016

Crossrefs

Programs

  • Maple
    F:= proc(n) local x0,i,j;
      x0:= 7/9*(10^(n+1)-1);
      for j from 1 to 6 do
        if isprime(x0 + (j-7)*10^n) then
          return x0 + (j-7)*10^n fi od;
      for i from n-1 to 0 by -1 do
        for j from 0 to 6 do
         if isprime(x0 + (j-7)*10^i) then
           return x0 + (j-7)*10^i fi od od;
      for i from 0 to n do
        for j from 8 to 9 do
           if isprime(x0 + (j-7)*10^i) then
             return x0 + (j-7)*10^i fi
      od od:
    end proc:
    F(0):= 2: F(1):= 7:
    map(F, [$0..100]); # Robert Israel, Jul 13 2016
  • Mathematica
    f[n_, b_] := Block[{k = 10^(n + 1), p = Permutations[ Join[ Table[b, {i, 1, n}], {x}]], c = Complement[Table[j, {j, 0, 9}], {b}], q = {}}, Do[q = Append[q, Replace[p, x -> c[[i]], 2]], {i, 1, 9}]; r = Min[ Select[ FromDigits /@ Flatten[q, 1], PrimeQ[ # ] & ]]; If[r ? Infinity, r, p = Permutations[ Join[ Table[ b, {i, 1, n}], {x, y}]]; q = {}; Do[q = Append[q, Replace[p, {x -> c[[i]], y -> c[[j]]}, 2]], {i, 1, 9}, {j, 1, 9}]; Min[ Select[ FromDigits /@ Flatten[q, 1], PrimeQ[ # ] & ]]]]; Table[ f[n, 7], {n, 1, 18}]
  • PARI
    A037067(n)={my(t=10^(n+1)\9*7); forvec(v=[[-1, n], [-7, -1]], ispseudoprime(p=t+10^(n-v[1])*v[2]) && return(p)); error} \\ M. F. Hasler, Feb 22 2016

Formula

a(n) = prime(A037066(n)). - Amiram Eldar, Jul 21 2025

Extensions

More terms from Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Mar 23 2003
More terms from and a(0) = 2 prepended by M. F. Hasler, Feb 22 2016

A037055 Smallest prime containing exactly n 1's.

Original entry on oeis.org

2, 13, 11, 1117, 10111, 101111, 1111151, 11110111, 101111111, 1111111121, 11111111113, 101111111111, 1111111118111, 11111111111411, 111111111116111, 1111111111111181, 11111111101111111, 101111111111111111, 1111111111111111171, 1111111111111111111, 111111111111111119111
Offset: 0

Views

Author

Patrick De Geest, Jan 04 1999

Keywords

Comments

For n > 1, A037055 is conjectured to be identical to A084673. - Robert G. Wilson v, Jul 04 2003
a(n) = A002275(n) for n in A004023. For all other n < 900, a(n) has n+1 digits. - Robert Israel, Feb 21 2016

Crossrefs

Programs

  • Maple
    f:= proc(n) local m,d,r,x;
       r:= (10^n-1)/9;
       if isprime(r) then return r fi;
       r:= (10^(n+1)-1)/9;
       for m from n-1 to 1 by -1 do
         x:= r - 10^m;
         if isprime(x) then return x fi;
       od;
       for m from 0 to n do
         for d from 1 to 8 do
            x:= r + d*10^m;
            if isprime(x) then return x fi;
         od
       od;
       error("Needs more than n+1 digits")
    end proc:
    map(f, [$0..100]); # Robert Israel, Feb 21 2016
  • Mathematica
    f[n_, b_] := Block[{k = 10^(n + 1), p = Permutations[ Join[ Table[b, {i, 1, n}], {x}]], c = Complement[Table[j, {j, 0, 9}], {b}], q = {}}, Do[q = Append[q, Replace[p, x -> c[[i]], 2]], {i, 1, 9}]; r = Min[ Select[ FromDigits /@ Flatten[q, 1], PrimeQ[ # ] & ]]; If[r ? Infinity, r, p = Permutations[ Join[ Table[ b, {i, 1, n}], {x, y}]]; q = {}; Do[q = Append[q, Replace[p, {x -> c[[i]], y -> c[[j]]}, 2]], {i, 1, 9}, {j, 1, 9}]; Min[ Select[ FromDigits /@ Flatten[q, 1], PrimeQ[ # ] & ]]]]; Table[ f[n, 1], {n, 1, 18}]
    Join[{2, 13}, Table[Sort[Flatten[Table[Select[FromDigits/@Permutations[Join[{n}, PadRight[{}, i, 1]]], PrimeQ], {n, 0, 9}]]][[1]], {i, 2, 20}]] (* Vincenzo Librandi, May 11 2017 *)
  • PARI
    A037055(n)={my(p,t=10^(n+1)\9); forstep(k=n+1,1,-1, ispseudoprime(p=t-10^k) && return(p)); forvec(v=[[0, n], [1, 8]], ispseudoprime(p=t+10^v[1]*v[2]) && return(p))} \\ M. F. Hasler, Feb 22 2016

Formula

a(n) = the smallest prime in { R-10^n, R-10^(n-1), ..., R-10; R+a*10^b, a=1, ..., 8, b=0, 1, 2, ..., n }, where R = (10^(n+1)-1)/9 is the (n+1)-digit repunit. - M. F. Hasler, Feb 25 2016
a(n) = prime(A037054(n)). - Amiram Eldar, Jul 21 2025

Extensions

More terms from Sascha Kurz, Feb 10 2003
Edited by Robert G. Wilson v, Jul 04 2003
a(0) = 2 inserted by Robert Israel, Feb 21 2016

A037057 Smallest prime containing exactly n 2's.

Original entry on oeis.org

3, 2, 223, 2221, 22229, 1222229, 20222227, 22222223, 222222227, 20222222221, 22222222223, 2122222222229, 21222222222221, 22222222222229, 222222222222227, 21222222222222221, 202222222222222229, 222222222222222221, 22222202222222222221, 220222222222222222229, 2202222222222222222229
Offset: 0

Views

Author

Patrick De Geest, Jan 04 1999

Keywords

Comments

For n > 1, the last digit cannot be 2, so a(n) has at least n+1 digits. The probability is big that none of [10^n/9]*20 + {1,3,7,9} is prime, in which case a(n) must have at least n+2 digits. This is the most frequent case. We can even conjecture that for all n > 1, a(n) equals [10^(n+1)/9]*20 + b with 1 <= b <= 9 and one of the (first) digits 2 replaced by 0 or 1. - M. F. Hasler, Feb 22 2016

Crossrefs

Programs

  • Mathematica
    f[n_, b_] := Block[{k = 10^(n + 1), p = Permutations[ Join[ Table[b, {i, 1, n}], {x}]], c = Complement[Table[j, {j, 0, 9}], {b}], q = {}}, Do[q = Append[q, Replace[p, x -> c[[i]], 2]], {i, 1, 9}]; r = Min[ Select[ FromDigits /@ Flatten[q, 1], PrimeQ[ # ] & ]]; If[r ? Infinity, r, p = Permutations[ Join[ Table[ b, {i, 1, n}], {x, y}]]; q = {}; Do[q = Append[q, Replace[p, {x -> c[[i]], y -> c[[j]]}, 2]], {i, 1, 9}, {j, 1, 9}]; Min[ Select[ FromDigits /@ Flatten[q, 1], PrimeQ[ # ] & ]]]]; Table[ f[n, 2], {n, 1, 18}]
  • PARI
    A037057(n)={my(p,t=10^(n+1)\9*20); n>1 && forvec(v=[[-1,n],[-2,-1]],nextprime(p=t+10^(n-v[1])*v[2])-p<10 && return(nextprime(p)));3-n} \\ M. F. Hasler, Feb 22 2016

Formula

a(n) = prime(A037056(n)). - Amiram Eldar, Jul 21 2025

Extensions

More terms from Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Mar 23 2003
More terms and a(0) = 3 from M. F. Hasler, Feb 22 2016

A037063 Smallest prime containing exactly n 5's.

Original entry on oeis.org

2, 5, 557, 5557, 155557, 555557, 15555557, 55555553, 3555555551, 5555555557, 525555555557, 555555555551, 5555555555551, 355555555555559, 555555555555557, 51555555555555551, 545555555555555551, 555555555555555559, 15555555555555555557, 155555555555555555551
Offset: 0

Views

Author

Patrick De Geest, Jan 04 1999

Keywords

Comments

For n > 1, the last digit of n cannot be 5, therefore a(n) must have at least n+1 digits. It is probable that none among [10^n/9]*50 + {1,3,7,9} is prime in which case a(n) must have n+2 digits. We conjecture that for all n > 1, a(n) equals [10^(n+1)/9]*50 + b with 1 <= b <= 9 and one of the (first) digits 5 replaced by a 0, 1, 2, 3 or 4. - M. F. Hasler, Feb 22 2016

Crossrefs

Programs

  • Mathematica
    f[n_, b_] := Block[{k = 10^(n + 1), p = Permutations[ Join[ Table[b, {i, 1, n}], {x}]], c = Complement[Table[j, {j, 0, 9}], {b}], q = {}}, Do[q = Append[q, Replace[p, x -> c[[i]], 2]], {i, 1, 9}]; r = Min[ Select[ FromDigits /@ Flatten[q, 1], PrimeQ[ # ] & ]]; If[r ? Infinity, r, p = Permutations[ Join[ Table[ b, {i, 1, n}], {x, y}]]; q = {}; Do[q = Append[q, Replace[p, {x -> c[[i]], y -> c[[j]]}, 2]], {i, 1, 9}, {j, 1, 9}]; Min[ Select[ FromDigits /@ Flatten[q, 1], PrimeQ[ # ] & ]]]]; Table[ f[n, 5], {n, 1, 18}]
  • PARI
    A037063(n)={my(p, t=10^(n+1)\9*50); n>1 && forvec(v=[[-1, n], [-5, -1]], nextprime(p=t+10^(n-v[1])*v[2])-p<10 && return(nextprime(p)));1+4^n} \\ M. F. Hasler, Feb 22 2016

Formula

a(n) = prime(A037062(n)). - Amiram Eldar, Jul 21 2025

Extensions

More terms from Randall L Rathbun, Jan 11 2002
Edited and corrected by Robert G. Wilson v, Jul 04 2003
More terms and a(0) = 2 from M. F. Hasler, Feb 22 2016
Showing 1-10 of 21 results. Next