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

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

A094068 Lessers of twin prime pairs whose greater has a prime prime index.

Original entry on oeis.org

3, 29, 107, 239, 281, 857, 1061, 1151, 1619, 1667, 1721, 2267, 2339, 2801, 2999, 3167, 3257, 3467, 3557, 4271, 4337, 4547, 4799, 4931, 5279, 5501, 5849, 5867, 6359, 6659, 6689, 7349, 8009, 8219, 8231, 8387, 9857, 10007, 10859, 13001, 13691, 15269, 15971
Offset: 1

Views

Author

Cino Hilliard, May 31 2004

Keywords

Examples

			107 is the lesser of twin prime pair (107,109) the prime index of 109 (the greater) is 29.
		

Crossrefs

Programs

  • Mathematica
    seq = {}; p = prv = 2; k = 1; Do[p = NextPrime[p]; k++; If[p == prv + 2 && PrimeQ[k], AppendTo[seq, prv]]; prv = p, {10^3}]; seq
    Select[Partition[Prime[Range[2000]],2,1],#[[2]]-#[[1]]==2&&PrimeQ[PrimePi[ #[[2]]]]&] [[All,1]] (* Harvey P. Dale, Nov 30 2022 *)
  • PARI
    lista(n) = {forprime(x=2,n, y=prime(x)- 2; if(isprime(y),print1(y",")))}

Extensions

Offset corrected by Amiram Eldar, Dec 27 2019
Showing 1-4 of 4 results.