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.

A097490 Primes which are two greater than A097489 terms.

Original entry on oeis.org

5, 17, 167, 302946354048717875530381041444257, 17164738545781348456175905084853738838912866540727619406614703260339837793050935010265073947
Offset: 1

Views

Author

Cino Hilliard, Aug 24 2004

Keywords

Examples

			a(3) = 167 = (Product_{k=1..3} A001359(k)) + 2 = 3 * 5 * 11 + 2 = A097489(3) + 2. - _Hartmut F. W. Hoft_, Apr 27 2021
		

Crossrefs

Programs

  • Mathematica
    step[{list_, q_}] := Module[{p=NextPrime[q]}, {Join[list, If[PrimeQ[p+2], {{p,p+2}}, {}]], p}]
    smallerTwin[n_] := First[Transpose[First[NestWhile[step, {{{3, 5}}, 3}, Length[First[step[#]]]<=n&]]]]
    a097489[n_] := Rest[FoldList[Times, 1, smallerTwin[n]]]
    a097490[n_] := Select[Map[#+2&, a097489[n]], PrimeQ]
    a097490[39] (* Hartmut F. W. Hoft, Apr 27 2021 *)
  • PARI
    fp(n) = p=1;for(x=1,n,p*=twinl(x);if(isprime(p+2),print1(p+2", ")))
    twinl(n) = { local(c,x); c=0; x=1; while(c
    				

Extensions

Edited by Don Reble, Apr 16 2007

A097493 Primes which are two greater than A097492 terms.

Original entry on oeis.org

7, 37, 457, 8647, 51315414607
Offset: 1

Views

Author

Cino Hilliard, Aug 24 2004

Keywords

Comments

The next term (17866..79237) has 186 digits.

Examples

			a(4) = 8647 = (Product_{k=1..4} A006512(k)) + 2 = 5*7*13*19 + 2 = A097492(4) + 2. - _Hartmut F. W. Hoft_, Apr 27 2021
		

Crossrefs

Programs

  • Mathematica
    step[{list_, q_}] := Module[{p=NextPrime[q]}, {Join[list, If[PrimeQ[p+2], {{p,p+2}}, {}]], p}]
    largerTwin[n_] := Last[Transpose[First[NestWhile[step, {{{3, 5}}, 3}, Length[First[step[#]]]<=n&]]]]
    a097492[n_] := Rest[FoldList[Times, 1, largerTwin[n]]]
    a097493[n_] := Select[Map[#+2&, a097492[n]], PrimeQ]
    a097493[68] (* Hartmut F. W. Hoft, Apr 27 2021 *)
  • PARI
    fu(n) = p=1;for(x=1,n,p*=twinu(x);if(isprime(p+2),print1(p+2", ")))
    twinu(n) = { local(c,x); c=0; x=1; while(c
    				

Extensions

Edited by Don Reble, Apr 16 2007

A343778 Primes which are two greater than A074040 terms.

Original entry on oeis.org

17, 21800053277, 86984485062381462583582279727, 2948338207972508983453357158259221375675126583677039825367935271466652794027
Offset: 1

Views

Author

Hartmut F. W. Hoft, Apr 29 2021

Keywords

Comments

a(5) = 3052230...330677 has 17332 digits, the only prime larger than a(4) and among the cumulative products of the first 2000 twin primes pairs plus two.

Examples

			a(1) = 17 = A074040(1) + 2 = 3*5 + 2.
		

Crossrefs

Programs

  • Mathematica
    (* function a074040[ ] is defined in A074040 *)
    a343778[n_] := Select[Map[#+2&, a074040[n]], PrimeQ]
    a343778[30]

A344148 Primes which are two greater than A191746 terms.

Original entry on oeis.org

17, 6779, 293617, 2992417, 24101863, 423722581, 625997497, 929306267, 3377032037, 3825265007, 6458885659, 7150892197, 13075407803, 13860035251, 19434399319, 32531231209, 47475445333, 50281049527, 53207636077, 62607479491, 85780812151, 106014038789, 109384656937, 121991823731, 125813698531
Offset: 1

Views

Author

Hartmut F. W. Hoft, May 10 2021

Keywords

Comments

Among numbers a(1..564) are 38 twin primes of which 14 are twins to numbers in A344147 with the first of the latter pairs being A344147(16)=85780812149 and a(21)=85780812151. In contrast it appears that A097490, A097491, A097493 and A343778 contain only twin prime numbers from the set {5, 7, 17}.

Examples

			a(1)=17=A191746(1)+2 is the first prime and a(2)=6779=A191746(7)+2 is the second of the form A191746(k)+2; both are twin primes while a(3)=293617 is not.
		

Crossrefs

Programs

  • Mathematica
    (* function a191746[ ] is defined in A344147 *)
    a344148[n_] := Select[a191746[n] + 2, PrimeQ]
    a344148[500]
Showing 1-4 of 4 results.