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.

A096477 Subscripts for "secondary twin-primes": numbers k such that prime(prime(k)+1) - prime(prime(k)) = A073124(k) = 2.

Original entry on oeis.org

1, 2, 3, 4, 6, 7, 13, 14, 23, 24, 29, 30, 40, 59, 63, 65, 71, 74, 90, 103, 106, 110, 112, 117, 122, 128, 132, 187, 188, 193, 207, 248, 257, 258, 267, 271, 281, 285, 292, 296, 299, 300, 303, 304, 311, 317, 325, 340, 343, 344, 354, 356, 360, 368, 382, 389, 395, 402
Offset: 1

Views

Author

Labos Elemer, Jun 23 2004

Keywords

Examples

			24 is a term since prime(prime(24)+1) - prime(prime(24)) = prime(89+1) - prime(89) = 463 - 461 = 2.
		

Crossrefs

Programs

  • Mathematica
    Flatten[Position[Table[Prime[Prime[n]+1]-Prime[Prime[n]], {n, 1, 1000}], 2]]

Formula

a(n) = primepi(A096478(n)). - Amiram Eldar, Aug 13 2024

A096480 a(n) = Min{x : A073124(x) = 2n}.

Original entry on oeis.org

1, 8, 5, 22, 16, 15, 33, 67, 62, 164, 88, 56, 73, 202, 134, 504, 201, 261, 799, 1461, 289, 282, 1309, 1053, 1143, 939, 527, 3531, 2179, 4751, 2461, 5308, 2837, 3983, 1946, 8622, 9488, 12862, 6377, 4653, 7594, 7646, 19251, 22538, 9561, 32509, 26146, 17568
Offset: 1

Views

Author

Labos Elemer, Jun 23 2004

Keywords

Examples

			For n = 4: a(4) = 22 since A073124(22) = prime(1+prime(22)) - prime(prime(22)) = prime(1+79) - prime(79) = 409 - 401 = 8.
For n = 5: a(5) = 16 since A073124(16) = prime(1+prime(16)) - prime(prime(16)) = prime(54) - prime(53) = 251 - 241 = 10.
		

Crossrefs

Programs

  • Mathematica
    Table[Min[Flatten[Position[Table[Prime[Prime[n]+1]- Prime[Prime[n]], {n, 1, 5000}], 2*j]]], {j, 1, 20}]
    seq[max_] := Module[{p = Prime[Range[max + 1]], m = PrimePi[max], ind, t}, ind = Prime[Range[m]]; t = p[[ind + 1]] - p[[ind]]; TakeWhile[FirstPosition[t, 2*#] & /@ Range[Max[t]] // Flatten, ! MissingQ[#] &]]; seq[10^6] (* Amiram Eldar, Feb 15 2025 *)
  • PARI
    {m=48;for(n=1,m,k=1;while((prime(prime(k)+1)-prime(prime(k)))!=2*n,k++);print1(k,","))} \\ Klaus Brockhaus, Jun 27 2004

Extensions

a(31)-a(48) from Klaus Brockhaus, Jun 27 2004

A177716 The k-th prime repeated A073124(k) times, k = 1,2,3....

Original entry on oeis.org

2, 2, 3, 3, 5, 5, 7, 7, 11, 11, 11, 11, 11, 11, 13, 13, 17, 17, 19, 19, 19, 19, 23, 23, 23, 23, 23, 23, 29, 29, 29, 29, 31, 31, 31, 31, 37, 37, 37, 37, 37, 37, 41, 41, 43, 43, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 59, 59, 59, 59
Offset: 1

Views

Author

Giovanni Teofilatto, May 12 2010

Keywords

Crossrefs

Cf. A109763.

Extensions

Incorrect formula removed; precise definition added - R. J. Mathar, Aug 23 2010

A096478 a(n) = A000040(A096477(n)), i.e., prime(a(n)) and prime(a(n)+1) are twin primes.

Original entry on oeis.org

2, 3, 5, 7, 13, 17, 41, 43, 83, 89, 109, 113, 173, 277, 307, 313, 353, 373, 463, 563, 577, 601, 613, 643, 673, 719, 743, 1117, 1123, 1171, 1279, 1571, 1621, 1627, 1709, 1741, 1823, 1867, 1907, 1949, 1979, 1987, 1999, 2003, 2063, 2099, 2153, 2287, 2309, 2311
Offset: 1

Views

Author

Labos Elemer, Jun 23 2004

Keywords

Comments

Gives primes in A029707. - Pierre CAMI, Apr 20 2006

Examples

			89 is a term since it is a prime and prime(89 + 1) - prime(89) = 463 - 461 = 2; the prime with subscript 89 (which is prime) and the next prime (i.e., prime(90)) are twin primes.
		

Crossrefs

Programs

  • Mathematica
    Prime[Flatten[Position[Table[Prime[Prime[n]+1]-Prime[Prime[n]], {n, 1, 1000}], 2]]]

A096479 "Secondary twin primes": a(n) = A006450(A096477(n)).

Original entry on oeis.org

3, 5, 11, 17, 41, 59, 179, 191, 431, 461, 599, 617, 1031, 1787, 2027, 2081, 2381, 2549, 3299, 4091, 4217, 4421, 4517, 4787, 5021, 5441, 5651, 8999, 9041, 9461, 10457, 13217, 13709, 13757, 14591, 14867, 15641, 16061, 16451, 16901, 17189, 17291
Offset: 1

Views

Author

Labos Elemer, Jun 23 2004

Keywords

Examples

			a(10) = 461 since prime(10) = 89 and prime(89 + 1) - prime(89) = 463 - 461 = 2.
		

Crossrefs

Programs

  • Mathematica
    Prime[Prime[Flatten[Position[Table[Prime[Prime[n]+1] -Prime[Prime[n]], {n, 1, 1000}], 2]]]]

A096481 a(n) = A000040(A096480(n)).

Original entry on oeis.org

2, 19, 11, 79, 53, 47, 137, 331, 293, 971, 457, 263, 367, 1231, 757, 3607, 1229, 1663, 6131, 12227, 1879, 1831, 10733, 8423, 9221, 7393, 3793, 32941, 19213, 45863, 21961, 51871, 25763, 37591, 16879, 89017, 98867, 138241, 63611, 44773, 77279, 77783
Offset: 1

Views

Author

Labos Elemer, Jun 23 2004

Keywords

Crossrefs

Programs

  • Mathematica
    Prime[Table[Min[Flatten[Position[Table[Prime[Prime[n]+1]- Prime[Prime[n]], {n, 1, 10000}], 2*j]]], {j, 1, 100}]]
  • PARI
    {m=42;for(n=1,m,k=1;while((prime(prime(k)+1)-prime(prime(k)))!=2*n,k++);print1(prime(k),","))} \\ Klaus Brockhaus, Jun 27 2004

Extensions

a(31)-a(42) from Klaus Brockhaus, Jun 27 2004

A096482 a(n) = prime(prime(A096480(n))).

Original entry on oeis.org

3, 67, 31, 401, 241, 211, 773, 2221, 1913, 7649, 3229, 1669, 2477, 10009, 5749, 33647, 9973, 14107, 60821, 130729, 16141, 15683, 113233, 86629, 95651, 74959, 35617, 388403, 214993, 557093, 248909, 637003, 296843, 448451, 186481, 1145899, 1283603, 1845637, 795349, 542603
Offset: 1

Views

Author

Labos Elemer, Jun 23 2004

Keywords

Comments

a(n) = prime(p) where p is the smallest prime such that prime(p+1) - prime(p) = 2*n.
Both a(n) and a(n) + 2*n are primes while pi(a(n)) = A096481(n) and pi(pi(a(n))) = A096480(n).

Examples

			a(2) = 67 = prime(19) since prime(19+1) - prime(19) = 71 - 67 = 2*2 and 19 is the smallest prime with this property.
		

Crossrefs

Programs

  • Mathematica
    Prime[Prime[Table[Min[Flatten[Position[Table[Prime[Prime[n]+1]- Prime[Prime[n]], {n, 1, 5000}], 2*j]]], {j, 1, 100}]]]
  • PARI
    a(n) = {my(p=2); while((prime(p+1)-prime(p))!=2*n, p=nextprime(p+1)); prime(p)} \\ Klaus Brockhaus, Jun 27 2004
    
  • PARI
    a(n) = {my(p=2,k=1); forprime(q=3, oo, if(q==p+2*n && isprime(k), return(p)); p=q; k++)} \\ Andrew Howroyd, Dec 16 2024

Formula

a(n) = A006450(A096480(n)) = prime(A096481(n)).
a(n) + 2*n = prime(1 + prime(A096480(n))).

Extensions

a(31)-a(36) from Klaus Brockhaus, Jun 27 2004
a(37) onwards from Andrew Howroyd, Dec 16 2024

A073123 a(n) is the largest number such that pi(a(n)) = prime(n).

Original entry on oeis.org

4, 6, 12, 18, 36, 42, 60, 70, 88, 112, 130, 162, 180, 192, 222, 250, 280, 292, 336, 358, 372, 408, 432, 462, 520, 556, 568, 592, 600, 618, 718, 742, 786, 808, 862, 880, 928, 970, 996, 1032, 1068, 1090, 1162, 1180, 1212, 1222, 1300, 1422, 1438, 1450, 1480
Offset: 1

Views

Author

Labos Elemer, Jul 16 2002

Keywords

Comments

Primes with prime subscripts correspond to least numbers m, such that pi(m) = prime(n).

Examples

			n=25: prime(25)=97; for 12 terms X = {509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520}, pi(X)=97. Largest is a(25)=520, smallest is A006450(25), number of terms = A073124(25).
		

Crossrefs

Equals A072677(n) - 1.

Programs

  • Maple
    seq(ithprime(ithprime(n)+1)-1, n=1..100); # Robert Israel, May 14 2018

Formula

a(n) = Max{x: A000720(x)=A000040(n)}.
a(n) = A000040(A000040(n)+1) - 1.

Extensions

Edited by Robert Israel, May 14 2018
Showing 1-8 of 8 results.