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.

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

A128874 Numbers k such that 16 + the product of the first k lesser twin primes (A097489) is prime.

Original entry on oeis.org

1, 2, 3, 469
Offset: 1

Views

Author

Cino Hilliard, May 08 2007

Keywords

Comments

Define twinl#(n)as the product of the first n lesser twin primes. Then if twinl#(n)+ 16 is prime, list n.
It is interesting from the example that the first three primes 19,31 and 181 greater than twinl#(n) + 16 are all greater twin primes. The next PRP is the 1824 digit number twinl#(469) + 16 and is not part of a twin prime pair.
a(5) > 2000, if it exists. - Amiram Eldar, Jul 07 2024
a(5) > 10000, if it exists. - Michael S. Branicky, Jul 11 2024

Examples

			Twinl#(3) + 16 = 3*5*11+16 = 181 is prime so 3 is in the sequence.
		

Crossrefs

Cf. A097489.

Programs

  • Mathematica
    next[n_] := Module[{k = n + 1}, While[! (PrimeQ[k] && PrimeQ[k + 2]), k++]; k]; seq[kmax_] := Module[{r = 1, p = 1, s = {}}, Do[p = next[p]; r *= p; If[PrimeQ[r + 16], AppendTo[s, k]], {k, 1, kmax}]; s]; seq[500] (* Amiram Eldar, Jul 07 2024 *)
  • PARI
    twinl(n) = { local(c,x); c=0; x=1; while(cCino Hilliard, May 08 2007
    
  • PARI
    lista(nn) = { for(n=1, nn, if (ispseudoprime(16+prod(i=1, n, twinl(i))), print1(n, ", ")));} \\ Michel Marcus, Feb 10 2014

Extensions

Partially edited by Michel Marcus, Feb 10 2014

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

A097492 a(n) = product of first n terms of A006512.

Original entry on oeis.org

5, 35, 455, 8645, 267995, 11523785, 702950885, 51315414605, 5285487704315, 576118159770335, 80080424208076565, 12092144055419561315, 2188678074030940598015, 422414868287971535416895
Offset: 1

Views

Author

Cino Hilliard, Aug 24 2004

Keywords

Crossrefs

Programs

  • Mathematica
    Rest[FoldList[Times,1,Transpose[Select[Partition[Prime[Range[100]],2,1], Last[#]- First[#] == 2&]][[2]]]] (* Harvey P. Dale, Nov 02 2011 *)
  • PARI
    fu(n) = p=1;for(x=1,n,p*=twinu(x);print1(p",")) \The n-th upper twin prime twinu(n) = { local(c,x); c=0; x=1; while(c
    				

Extensions

Edited by Don Reble, Apr 16 2007

A128817 Primes which are 4 greater than the product of lesser twin primes.

Original entry on oeis.org

7, 19, 81349, 3335149, 196773559, 13970922409, 150983758430839
Offset: 1

Views

Author

Cino Hilliard, May 08 2007

Keywords

Comments

Also primes which are 4 greater than the terms of A097489, where A097489 = product of first n terms of A001359 and A001359 = Lesser of twin primes.
a(8) = A097489(547) + 4 = 4.247...*10^2176. - Amiram Eldar, Jun 30 2024

Examples

			twinl#(2) = 3*5=15. 15+4 = 19 prime and the second term in the table.
		

Crossrefs

Programs

  • PARI
    twinl(n) = /* The n-th lower twin prime */ { local(c,x); c=0; x=1; while(c
    				

Formula

Define twinl#(n)as the product of the first n lesser twin primes. Then if twinl#+4 is prime, list it.
Showing 1-5 of 5 results.