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

A257459 Let b_k=1...1 consist of k>0 1's. Then a(n) is the smallest k such that the concatenation prime(n)b_k is prime, or a(n)=0 if there is no such prime.

Original entry on oeis.org

2, 1, 5, 1, 17, 1, 8, 1, 2, 6, 1, 0, 2, 1, 3, 9, 18, 4, 210, 6, 7, 3, 2, 6, 1, 2, 1, 2, 1, 2, 4, 3, 2, 24, 3, 1, 1, 6, 5, 11, 2, 1, 11, 1, 12, 6, 1, 7, 3, 39, 2, 2, 1, 2, 9, 3, 5, 1, 6, 2, 3, 2, 180, 3, 15, 17, 24, 1, 5, 1, 2, 2, 1, 64, 7, 6, 3, 24, 2, 1, 2, 1, 6, 16, 1, 9, 8, 6, 17, 4, 6, 2, 1, 9, 30, 2, 6, 44, 1, 6
Offset: 1

Views

Author

Keywords

Comments

The only unknown terms less than 10000, tested to 15000, are for n: 284, 714, 1257, 1618, 2248, 2450, 2779, 3886, 3891, 4007, 4359, 4784, 4912, 5364, 6108, 6356, 6371, 7570, 7668, 8446, 9606.
Prime(12)=37 and b_k for k == 2 (mod 3), the concatenation is divisible by 3; for k == 1 (mod 3), the concatenation is divisible by either 7 or 13; and finally for k == 0 (mod 3), the concatenation is divisible by 37.

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{k = 1, p = Prime[n]}, While[ !PrimeQ[p*10^k + (10^k - 1)/9], k++]; k]; f[12] = 0; Array[f, 100]

Formula

a(n)=k for the least k such that p(n)*10^k+(10^k-1)/9 is prime, where p(n) is the n_th prime.

A257460 Let b_k=7...7 consist of k>0 7's. Then a(n) is the smallest k such that the concatenation prime(n)b_k is prime, or a(n)=0 if there is no such prime.

Original entry on oeis.org

2, 1, 2, 0, 3, 1, 2, 1, 2, 48, 1, 10, 2, 3, 3, 3, 9, 1, 1, 2, 66, 1, 2, 8, 1, 2, 6, 3, 1, 3, 1, 2, 3, 6, 8, 9, 7, 1, 3, 2, 2, 3, 17, 4, 2, 1, 3, 1, 2, 1, 3, 2, 1, 5, 17, 5, 8, 16, 1, 3, 1, 8, 6, 2, 1, 3, 3, 2184, 6, 6, 3, 2, 1, 3, 1, 2, 2, 4, 2, 3, 3, 1, 2, 1, 1, 3, 6, 15, 5, 1, 48, 2, 1, 2, 7, 2, 47, 2, 1, 1
Offset: 1

Views

Author

Keywords

Comments

The only unknown terms less than 10000, tested to 17500, are for n: 484, 1291, 2096, 2238, 3503, 3859, 6674, 7087, 7824, 8954.

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{k = 1, p = Prime[n]}, While[ !PrimeQ[p*10^k + 7(10^k - 1)/9], k++]; k]; f[4] = 0; Array[f, 100]
  • PARI
    isok(k, dp) = ispseudoprime(fromdigits(concat(dp, vector(k, i, 7))));
    a(n) = {if (prime(n) == 7, return(0)); my(k=1, p=prime(n)); while (!ispseudoprime(p*10^k+7*(10^k-1)/9), k++); k;} \\ Michel Marcus, Jan 20 2021

Formula

a(n)=k for the least k such that prime(n)*10^k+7*(10^k-1)/9 is prime, where prime(n) is the n-th prime.
Showing 1-2 of 2 results.