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

A248919 "Stubborn primes" (see comments in A232210).

Original entry on oeis.org

13, 131, 653, 883, 1279, 10739, 17669
Offset: 1

Views

Author

Vladimir Shevelev, Oct 16 2014

Keywords

Comments

Terms a(2)-a(5) were obtained by Peter J. C. Moses.
Terms a(6)-a(7) were obtained by Hans Havermann (cf. b-file in A232210).
Hypothetically, a(8) = 26293 = A232210(2889).
However, there are two conjectures: 1) for every n, prime a(n) exists (Shevelev); 2) already prime a(8) does not exist (Havermann).
M. F. Hasler showed that, if a prime of the form 262933...3 > 26293 exists, then it has at least several thousand digits.
Note that, for a(n), n=1,...,7, the number of digits of the smallest prime of the form a(n)*10^k+3...3 (k 3's) respectively equals 16, 26, 53, 255, 4756, 6525, 9677. Judging from the ratio 4756/255 > 18.65, the smallest prime of the form 262933...3 could have more than 180000 digits.

Crossrefs

A055782 Primes q of the form q = 10p + 3, where p is also prime.

Original entry on oeis.org

23, 53, 73, 113, 173, 193, 233, 293, 313, 373, 433, 593, 613, 673, 733, 1013, 1033, 1093, 1373, 1493, 1733, 1913, 1933, 1973, 1993, 2113, 2273, 2293, 2333, 2393, 2633, 2693, 2713, 2833, 3313, 3373, 3533, 3593, 3673, 3733, 3793, 3833, 4013, 4093, 4493
Offset: 1

Views

Author

Labos Elemer, Jul 13 2000

Keywords

Comments

These primes correspond to resulting primes for A232210, when A232210(n)=1. - Vladimir Shevelev, Oct 16 2014

Examples

			5413 = 541*10 + 3, 3 appended to 541.
		

Crossrefs

Cf. A005384, A005385, A023238. Apart from first term, same as A057667.

Programs

  • Mathematica
    Select[Prime@ Range@ 630, PrimeQ[(# - 3)/10] &] (* Michael De Vlieger, Jul 14 2017 *)
  • PARI
    lista(nn) = {forprime(p=2, nn, if (isprime(q=10*p+3), print1(q, ", ")););} \\ Michel Marcus, Oct 20 2014

Formula

a(n) = 10*A023238(n) + 3. - R. J. Mathar, Sep 21 2009

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

Original entry on oeis.org

0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 1, 1, 4, 2, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 3, 3, 2, 1, 2, 7, 3, 1, 3, 2, 2, 8, 1, 1, 7, 2, 1, 1, 5, 3, 2, 2, 2, 3, 1, 3, 8, 5, 1, 1, 4, 3, 1, 4, 5, 3, 6, 1, 2, 1, 2, 1, 3, 1, 2, 2, 1, 3, 1, 6, 3, 1, 3, 4, 2, 3, 8, 4, 1, 3, 34, 1
Offset: 1

Views

Author

Vladimir Shevelev, Sep 13 2014

Keywords

Comments

Conjecture: for n>=4, a(n)>0.
Records >=1: 1,2,4,7,8,34,... correspond to primes 7,19,41,127,157,443,...

Examples

			For n<=3, a(n) = 0, because 3..32, 3..33 and 3..35 can never be prime, whatever the number of 3's that are concatenated.
For n=4, prime(n)=7, 37 is prime. So a(4)=1.
		

Crossrefs

Programs

  • PARI
    a(n) = {if (n<=3, return (0)); p = prime(n); k = 1; while (! isprime(p = eval(concat("3", Str(p)))), k++); k; } \\ Michel Marcus, Sep 17 2014

Extensions

More terms from Peter J. C. Moses, Sep 14 2014

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

Original entry on oeis.org

1, 1, 1, 1, 1, 4, 1, 1, 2, 3, 1, 1, 4, 4, 6, 30, 3, 1, 6, 1, 32, 3, 3, 2, 22, 1, 6, 1, 2, 14, 7, 1, 10, 1, 2, 6, 3, 4, 2, 5, 2, 6, 1, 1, 37, 53, 53, 13, 64, 1, 67, 1, 45, 29, 17, 12, 14, 1, 2, 5, 15, 36, 10, 7, 1, 1, 81, 4, 18, 5, 55, 8, 33, 19, 8, 6, 2, 11
Offset: 0

Views

Author

Vladimir Shevelev, Sep 14 2014

Keywords

Comments

Conjecture: for all n, a(n)>0.

Crossrefs

Programs

  • PARI
    a(n) = {k = 0; while (! isprime(eval(concat(Str(2^n), Str((10^k-1)/3)))), k++); k;} \\ Michel Marcus, Sep 16 2014

Extensions

More terms from Michel Marcus, Sep 16 2014

A247342 Let b_k=3...3 consist of k>=1 3's. Then a(n) is the smallest k such that the odd part (A000265) of concatenation b_k 2^n is prime, or a(n)=0 if there is no such prime.

Original entry on oeis.org

1, 2, 1, 1, 1, 1, 4, 3, 2, 1, 3, 1, 1, 6, 1, 1, 1, 3, 1, 15, 29, 5, 1, 2, 3, 6, 1, 6, 20, 6, 3, 50, 3, 22, 8, 5, 5, 1, 84, 8, 7, 36, 3, 6, 7, 20, 6, 6, 8, 1, 6, 3, 2, 38, 1, 5, 3, 2, 5, 16, 1, 12, 13, 7, 1, 4, 16, 5, 32, 1, 6, 13, 4, 150, 7, 29, 17, 9, 12, 34
Offset: 0

Views

Author

Vladimir Shevelev, Sep 14 2014

Keywords

Comments

Conjecture: for all n, a(n)>0.
a(443) > 17000 if it is not 0.

Examples

			2^0=1 and already 31 is prime. So a(0)=1;
2^1=2, but odd part of 32 is 1 (nonprime); then consider odd part of 332. It is 83 that is prime. So a(1)=2.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local m,d,k,x;
        m:= 2^n;
        d:=ilog10(m);
        for k from 1 do
           x:= (10^k-1)/3*10^(d+1)+m;
           if isprime(x/2^padic:-ordp(x,2)) then return k fi
        od
    end proc:
    map(f, [$0..100]); # Robert Israel, Oct 30 2016
  • PARI
    a(n) = {k = 0; while (! ((val = eval(concat(Str((10^k-1)/3), Str(2^n)))) && isprime(val/2^valuation(val, 2))), k++); k;} \\ Michel Marcus, Sep 15 2014

Extensions

More terms from Michel Marcus, Sep 15 2014

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.

A257461 Let b_k=9...9 consist of k>0 9'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

1, 0, 1, 1, 5, 1, 1, 1, 1, 2, 28, 1, 1, 1, 1, 2, 1, 1, 4, 1, 1, 3, 1, 2, 90, 1, 1, 2, 8, 2, 1, 1, 2, 1, 1, 2, 1, 4, 6, 8, 3, 2, 3, 4, 1, 1, 5, 1, 5, 60, 1, 1, 5, 6, 1, 2, 1, 1, 2, 1, 10, 1, 1, 1, 5, 2, 1, 3, 4, 1, 1, 2, 4, 1, 3, 4, 3, 2, 1, 1, 2, 1, 6, 1, 5, 3
Offset: 1

Views

Author

Keywords

Comments

The only unknown terms less than 10000, tested to 25000, are for n: 87, 5744, 8041, 9533.
For p(87)=449, the concatenation is divisible by 11 if k is odd and is divisible by 7 if k == 4 (mod 6).

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{k = 1, p = Prime[n]}, While[ !PrimeQ[p*10^k + 10^k - 1], k++]; k]; f[2] = 0; Array[f, 86]

Formula

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

Extensions

a(87) from Eric Chen, Apr 24 2015

A245657 Primes p for which none of the concatenations p3, p9, 3p, 9p are primes.

Original entry on oeis.org

3, 107, 113, 179, 317, 443, 487, 599, 641, 653, 751, 773, 937, 977, 991, 1021, 1087, 1103, 1187, 1201, 1213, 1217, 1301, 1409, 1427, 1439, 1483, 1553, 1559, 1579, 1609, 1637, 1693, 1747, 1777, 1787, 1789, 1861, 1949, 1987, 1993, 2081, 2129, 2239, 2281, 2287, 2293, 2351, 2393, 2477
Offset: 1

Views

Author

Vladimir Shevelev, Sep 13 2014

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[400]],NoneTrue[{10#+3,10#+9,3*10^IntegerLength[#]+#, 9*10^IntegerLength[ #]+#},PrimeQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Sep 06 2020 *)
  • PARI
    lista(nn) = {forprime(p=2, nn, if (!isprime(eval(concat(Str(p), Str(3)))) && ! isprime(eval(concat(Str(p), Str(9)))) && ! isprime(eval(concat(Str(3), Str(p)))) && ! isprime(eval(concat(Str(9), Str(p)))), print1(p, ", ")););} \\ Michel Marcus, Sep 14 2014
    
  • Python
    import sympy
    from sympy import isprime
    from sympy import prime
    for n in range(1,10**3):
      p = str(prime(n))
      if not isprime(int(p+'3')) and not isprime(int(p+'9')) and not isprime(int('3'+p)) and not isprime(int('9'+p)):
        print(int(p),end=', ') # Derek Orr, Sep 16 2014

Extensions

More terms from Derek Orr, Sep 16 2014
Showing 1-9 of 9 results.