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

A173976 Numbers m such that the concatenation of m and 999 is the lesser of twin primes, i.e., a millennium twin prime couple.

Original entry on oeis.org

2, 8, 101, 164, 179, 230, 272, 293, 326, 389, 410, 419, 443, 512, 524, 536, 659, 662, 773, 788, 794, 800, 818, 890, 920, 932, 989, 1028, 1058, 1136, 1187, 1238, 1271, 1292, 1310, 1346, 1466, 1490, 1550, 1577, 1583, 1823, 1838, 1856, 1865, 1913, 2003, 2075
Offset: 1

Views

Author

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

Keywords

Comments

Necessarily, m == 2 (mod 3).

Examples

			2 is a term: 2999 = prime(430), 2999+2 = 3001 = prime(431).
8 is a term: 8999 = prime(1117), 8999+2 = 9001 = prime(1118).
		

References

  • Richard K. Guy: Unsolved Problems in Number Theory, New York, Springer-Verlag, 1994.
  • Theo Kempermann: Zahlentheoretische Kostproben, Harri Deutsch, 2. aktualisierte Auflage 2005.
  • Helmut Kracke, Mathe-musische Knobelisken, Duemmler Bonn, 2. Auflage 1983.

Crossrefs

Programs

  • Mathematica
    tp999Q[n_]:=Module[{c=FromDigits[Join[IntegerDigits[n],{9,9,9}]]}, And @@ PrimeQ[c+{0,2}]]; Select[Range[2500],tp999Q] (* Harvey P. Dale, Oct 03 2013 *)
    Select[3 Range[0,700]+2,AllTrue[1000#+{999,1001},PrimeQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jul 05 2021 *)
  • PARI
    isok(m) = my(x=eval(Str(m, 999))); isprime(x) && isprime(x+2); \\ Michel Marcus, Mar 08 2023

A208572 Smallest twin prime > 2^n.

Original entry on oeis.org

3, 5, 11, 17, 41, 71, 137, 269, 521, 1031, 2081, 4127, 8219, 16451, 32801, 65537, 131111, 262151, 524351, 1048889, 2097257, 4194581, 8388617, 16777289, 33554501, 67109321, 134217779, 268435577, 536871017, 1073741831, 2147483867, 4294967387
Offset: 1

Views

Author

Washington Bomfim, Feb 28 2012

Keywords

Examples

			For n=1 the smallest twin prime > 2^n is 3.
		

Crossrefs

Cf. A001359, A208574, A173937 (a(n) - 2^n).

Programs

  • Mathematica
    stp[n_]:=Module[{t=NextPrime[n]},While[!PrimeQ[t+2],t=NextPrime[t]];t]; Table[stp[2^i],{i,40}] (* Harvey P. Dale, Aug 24 2013 *)
  • PARI
    a(n)=my(t=2^n);while(!ispseudoprime(t+2),t=nextprime(t+1));t \\ Charles R Greathouse IV, Jun 21 2012

A329736 Smallest odd prime P such that P*3*2^n - 1 and P*3*2^n + 1 are twin primes.

Original entry on oeis.org

3, 5, 3, 5, 43, 11, 3, 19, 17, 5, 113, 59, 317, 331, 307, 241, 127, 829, 23, 149, 127, 11, 3023, 1091, 787, 971, 1523, 2741, 727, 1051, 227, 211, 727, 89, 1163, 71, 367, 1031, 577, 89, 1213, 1151, 3, 1021, 283, 2699, 4933, 59, 647, 709, 3083, 541, 1483, 2069
Offset: 1

Views

Author

Pierre CAMI, Nov 20 2019

Keywords

Examples

			3*3*2^1 - 1 =  17,  17 and  19 are twin primes so a(1)=3.
5*3*2^2 - 1 =  59,  59 and  61 are twin primes so a(2)=5.
3*3*2^3 - 1 =  71,  71 and  73 are twin primes so a(3)=3.
5*3*2^4 - 1 = 119, 119 and 121 are twin primes so a(4)=5.
		

Crossrefs

Programs

  • Mathematica
    Array[Block[{p = 3}, While[! AllTrue[3 p*2^# + {-1, 1}, PrimeQ], p = NextPrime@ p]; p] &, 54] (* Michael De Vlieger, Nov 21 2019 *)
  • PARI
    for(n=1,54,my(m=3*2^n);forprime(k=3,oo,my(j=k*m);if(ispseudoprime(j-1)&&ispseudoprime(j+1),print1(k,", ");break))) \\ Hugo Pfoertner, Nov 21 2019
    
  • PARI
    a(n) = my(p=3, q); while (!isprime(q=p*3*2^n - 1) || !isprime(q+2), p = nextprime(p+1)); p; \\ Michel Marcus, May 06 2020

A329916 Smallest k such that 6*k*A057130(n)-1 and 6*k*A057130(n)+1 are twin primes.

Original entry on oeis.org

1, 2, 3, 23, 11, 18, 77, 46, 84, 76, 22, 30, 3, 107, 26, 198, 136, 23, 236, 284, 167, 269, 381, 405, 379, 374, 620, 481, 606, 505, 163, 1414, 348, 639, 1696, 1429, 850, 2050, 740, 117, 362, 35, 3961, 72, 1307, 1816, 9410, 5705, 972, 368, 5083, 4387, 3296, 6039
Offset: 1

Views

Author

Pierre CAMI, Nov 24 2019

Keywords

Comments

A057130 gives the product of prime numbers (-1 mod 6) in the order of occurrence.

Examples

			A057130(1)=5, 6*1*5-1=29, and 29 and 31 are twin primes, so a(1)=1.
A057130(2)=55, 6*2*55-1=659, and 659 and 661 are twin primes, so a(2)=2.
		

Crossrefs

Programs

  • PARI
    lista(nn) = {my(pp = 1); forprime (p = 1, nn, if (Mod(p, 6) == -1, pp *= p; my(k=1); while (!isprime(6*k*pp-1) || !isprime(6*k*pp+1), k++); print1(k, ", ");););} \\ Michel Marcus, Nov 25 2019

A329920 Smallest k such that 6*k*A121940(n)-1 and 6*k*A121940(n)+1 are twin primes.

Original entry on oeis.org

1, 2, 2, 15, 36, 10, 13, 26, 30, 228, 24, 138, 520, 59, 110, 456, 700, 670, 146, 300, 390, 53, 2335, 340, 159, 340, 65, 475, 785, 1145, 759, 3557, 490, 169, 990, 1527, 704, 3379, 1426, 1927, 2397, 600, 1603, 4809, 9815, 58, 35, 364, 361, 123, 2197, 4054, 1867, 1827, 5048
Offset: 1

Views

Author

Pierre CAMI, Nov 24 2019

Keywords

Examples

			A121940(1)=7, 6*1*7-1=41, 41 and 43 are twin primes so a(1)=1.
A121940(2)=91, 6*2*91-1=1091, 1091 and 1093 are twin primes so a(2)=2.
		

Crossrefs

Programs

  • PARI
    lista(nn) = {my(pp = 1); forprime (p = 1, nn, if (Mod(p, 6) == +1, pp *= p; my(k=1); while (!isprime(6*k*pp-1) || !isprime(6*k*pp+1), k++); print1(k, ", ");););} \\ Michel Marcus, Nov 25 2019
Showing 1-5 of 5 results.