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.

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]]]]

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

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