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

A173937 Smallest natural d = d(n) such that 2^n + d is lesser of twin primes (n = 0, 1, 2, ...).

Original entry on oeis.org

2, 1, 1, 3, 1, 9, 7, 9, 13, 9, 7, 33, 31, 27, 67, 33, 1, 39, 7, 63, 313, 105, 277, 9, 73, 69, 457, 51, 121, 105, 7, 219, 91, 297, 247, 321, 115, 567, 1327, 411, 553, 987, 325, 183, 2065, 2565, 415, 879, 241, 459, 643, 1209, 391, 1155, 1477, 1449, 175, 129, 1045
Offset: 0

Views

Author

Eva-Maria Zschorn (e-m.zschorn(AT)zaschendorf.km3.de), Mar 03 2010

Keywords

Examples

			2^0 + 2 = 3 = prime(2), 2^0 + 4 = 5 = prime(3).
2^1 + 1 = 3 = prime(2), 2^1 + 3 = 5 = prime(3).
2^2 + 1 = 5 = prime(3), 2^2 + 3 = 7 = prime(4).
		

References

  • Richard K. Guy, Unsolved Problems in Number Theory, New York, Springer-Verlag, 1994
  • Friedhelm Padberg, Elementare Zahlentheorie, Spektrum Akademischer Verlag, Berlin Heidelberg, 1996
  • Daniel Shanks, Solved and Unsolved Problems in Number Theory, 4th ed., New York, Chelsea, 1993

Crossrefs

Cf. A001359, A006512, A124001, A208572 (smallest twin prime > 2^n).

Programs

  • Mathematica
    Join[{2}, Table[s = 2^n + 1; While[! (PrimeQ[s] && PrimeQ[s + 2]), s = s + 2]; s - 2^n, {n, 60}]] (* T. D. Noe, May 08 2012 *)
  • PARI
    A173937(n)={forstep(p=2^n\6*6+5,2<M. F. Hasler, Oct 21 2012

Extensions

Values a(0..300) double-checked by M. F. Hasler, Oct 21 2012

A092245 Lesser of the first twin prime pair with n digits.

Original entry on oeis.org

3, 11, 101, 1019, 10007, 100151, 1000037, 10000139, 100000037, 1000000007, 10000000277, 100000000817, 1000000000061, 10000000001267, 100000000000097, 1000000000002371, 10000000000001549, 100000000000000019
Offset: 1

Views

Author

Cino Hilliard, Feb 17 2004

Keywords

Comments

Sum of reciprocals = 0.43523579465477...

Crossrefs

Programs

  • Maple
    for n from 1 to 100 do
      r:= 10^(n-1);
      p:= nextprime(r); q:= nextprime(p);
      while q - p > 2 do
        p:= q; q:= nextprime(p);
      od;
      A[n]:= p;
    od:
    seq(A[n],n=1..100); # Robert Israel, Aug 04 2014
  • Mathematica
    a[n_] := Block[{p = NextPrime[10^(n -1)]}, While[ !PrimeQ[p +2], p = NextPrime@ p]; p]; Array[a, 18] (* Robert G. Wilson v, Dec 04 2022 *)
  • PARI
    firsttwpr(n) = { sr=0; for(m=0,n, c=0; for(x=10^m+1,10^(m+1), if(isprime(x)&& isprime(x+2),print1(x",");sr+=1./x;break) ) ); print(); print(sr) }
    
  • Python
    import sympy
    for i in range(100):
        p=sympy.nextprime(10**i)
        while not sympy.isprime(p+2):
            p=sympy.nextprime(p)
        print(p)
    # Abhiram R Devesh, Aug 02 2014

Formula

a(n) = A124001(n-1) + 10^(n-1). - Robert G. Wilson v, Nov 28 2015

Extensions

Corrected by T. D. Noe, Nov 15 2006

A227432 Difference between 10^n and the first prime of gap 4 > 10^n.

Original entry on oeis.org

3, 3, 9, 99, 189, 33, 453, 123, 93, 597, 69, 189, 279, 1173, 399, 1719, 2733, 2493, 87, 753, 213, 537, 249, 663, 3309, 123, 279, 597, 2253, 2853, 3237, 2403, 6747, 1257, 3069, 159, 3933, 2277, 6057, 7557, 1869, 17043, 2463, 17013, 4923, 4767, 15723, 2607, 2763
Offset: 1

Views

Author

Pierre CAMI, Jul 11 2013

Keywords

Comments

As N increases, the ratio sum(a(n)/n^2)/N for n = 1 to N tends to 4.

Examples

			10^1+3 = 13, 13 and 17 primes of gap 4, a(1)=3.
10^2+3 = 103, 103 and 107 primes of gap 4, a(2)=3.
		

Crossrefs

Cf. A124001.

Programs

  • PARI
    a(n) = {p = nextprime(10^n); q = nextprime(p+1); while (q-p != 4, r = nextprime(q+1); p = q; q = r); p - 10^n;} \\ Michel Marcus, Feb 24 2018

Extensions

Missing a(246) inserted into b-file by Andrew Howroyd, Feb 24 2018

A224846 Smallest k such that (10^n+k, 10^n+k+2) and (10^(n+1)+k, 10^(n+1)+k+2) are two pairs of twin primes with k(n+1) > k(n).

Original entry on oeis.org

1, 49, 91, 1117, 2929, 3001, 4831, 37237, 43897, 54409, 55669, 81931, 89809, 194971, 271159, 556651, 628069, 639247, 1036447, 1615597, 2075407, 2086447, 2414077, 3331009, 3442789, 4088539, 4178311, 4330681, 5834869, 6846649, 7928047, 11222341, 15520927, 18575911, 18615787, 22426969, 22645189
Offset: 1

Views

Author

Pierre CAMI, Jul 22 2013

Keywords

Examples

			10^1+1=11 prime as 13 10^2+1=101 prime as 103 so a(1)=1.
		

Crossrefs

Cf. A124001 (10^n+k and 10^n+k+2 are prime).

Programs

  • Mathematica
    i = -1; Table[i = i + 2; While[! (PrimeQ[10^n + i] && PrimeQ[10^n + i + 2] && PrimeQ[10^(n + 1) + i] && PrimeQ[10^(n + 1) + i + 2]), i = i + 2]; i, {n, 10}] (* T. D. Noe, Jul 23 2013 *)

A224905 Smallest k such that (10^n+k, 10^n+k+2) and (10^(n+1)+k, 10^(n+1)+k+2) are two pairs of twin primes.

Original entry on oeis.org

1, 49, 91, 1117, 2929, 721, 1819, 37237, 30979, 30967, 29629, 6457, 53269, 27727, 271159, 556651, 190489, 62797, 105259, 784777, 290659, 1320829, 438037, 1019317, 333991, 248371, 226609, 671227, 384571, 1573537, 366841, 954391, 1701247, 540811, 1105291
Offset: 1

Views

Author

Pierre CAMI, Jul 25 2013

Keywords

Examples

			10^1+1=11 prime as 13 10^2+1=101 prime as 103 so a(1)=1.
		

Crossrefs

Programs

  • Mathematica
    sk[n_]:=Module[{k=1},While[!AllTrue[{10^n+k,10^n+k+2,10^(n+1)+k,10^(n+1)+k+2},PrimeQ],k++];k]; Array[sk,35] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, May 09 2020 *)

A224906 Prime numbers p such that 10^(j-1) < p < 10^j and p + 10^(j+k) are also prime numbers for k = 0 to 4.

Original entry on oeis.org

37957, 1115239, 2757649, 2884279, 3125779, 3169459, 3384583, 3405037, 4237603, 4746139, 4769239, 4861261, 5074831, 5080081, 5194951, 5295877, 5681899, 5980981, 6110593, 6330043, 7025101, 7214773, 7233883, 8010589, 8068969, 8323153, 8462131, 8653651, 9460723
Offset: 1

Views

Author

Pierre CAMI, Jul 25 2013

Keywords

Comments

Only 656 primes have this property in the first 60000000 primes.

Examples

			37957, 137957, 1037957, 10037957, 100037957, 1000037957 are all prime numbers. Hence, a(1) = 37957 as it is the smallest prime with this property.
		

Crossrefs

Cf. A124001.

A227435 Difference between 10^n and the first prime of gap 6 > 10^n.

Original entry on oeis.org

13, 31, 13, 61, 43, 187, 223, 217, 87, 97, 57, 163, 267, 133, 273, 2473, 13, 3, 91, 757, 367, 421, 531, 177, 343, 673, 1753, 721, 847, 6331, 1081, 1141, 6583, 2191, 957, 1563, 423, 3951, 81, 8497, 1477, 7723, 11311, 12691, 5817, 8751, 2251, 4761, 12627, 1521, 1281, 11283, 11577, 3201, 3991, 3
Offset: 1

Views

Author

Pierre CAMI, Jul 11 2013

Keywords

Comments

As N increases, the ratio sum(a(n)/n^2)/N for n = 1 to N tends to 2.

Examples

			10^1+13 = 23, 23 and 29 primes of gap 6 so a(1)=13.
		

Crossrefs

A124050 Difference between (first Chen prime > 10^n) and 10^n.

Original entry on oeis.org

1, 1, 1, 9, 7, 19, 37, 19, 7, 7, 19, 19, 61, 687, 97, 91, 79, 13, 79, 97, 151, 217, 427, 253, 667, 13, 127, 427, 457, 577, 1069, 349, 1147, 1267, 2527, 2833, 709, 871, 259, 361, 1651, 391, 2689, 649, 31, 3007, 1657, 2257, 3757, 5977, 1441, 2779, 5749, 367, 31
Offset: 0

Views

Author

Zak Seidov, Nov 03 2006

Keywords

Comments

A033873(n) <= a(n) <= A124001(n) and a(n) = A033873(n) for n = 0, 1, 2, 3, 4, 7, 8, 9, 10, 25, 44, 54.

Examples

			a(0) = 1 because 2 is prime, 2 + 2 = 4 semiprime and 2 - 10^0 = 1,
a(1) = 1 because 11 and 13 are twin primes and 11 - 10^1 = 1,
a(2) = 1 because 101 and 103 are twin primes and 101 - 10^2 = 1,
a(3) = 9 because 1009 is prime, 1011 = 3*337 semiprime and 1009 - 10^3 = 9,
a(4) = 7 because 10007 and 10009 are twin primes and 10007 - 10^4 = 7,
a(5) = 19 because 100019 is prime, 100021 = 29*3449 semiprime and 100019 - 10^5 = 19, etc.
		

Crossrefs

Showing 1-8 of 8 results.