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

A074039 If (n, n+2) is the k-th twin prime pair then k else 0.

Original entry on oeis.org

0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Reinhard Zumkeller, Aug 13 2002

Keywords

Crossrefs

Programs

  • Mathematica
    seq[max_] := Module[{t = Select[Range[max], And @@ PrimeQ[# + {0, 2}] &], v}, v = Table[0, {max}]; v[[t]] = Range[Length[t]]; v]; seq[100] (* Amiram Eldar, Apr 06 2025 *)

Formula

A001359(a(n)) = n, A006512(a(n)) = n+2.

A074041 Product of first n single (i.e., non-twin) primes.

Original entry on oeis.org

2, 46, 1702, 79994, 4239682, 284058694, 22440636826, 1862572856558, 165768984233662, 16079591470665214, 1816993836185169182, 230758217195516486114, 30229326452612659680934, 4746004253060187569906638, 773598693248810573894781994
Offset: 1

Views

Author

Reinhard Zumkeller, Aug 13 2002

Keywords

Comments

a(n) = 5*A002110(A049084(A074038(n)))/A074040(k), where k is the largest number such that A006512(k) < A007510(n).

Examples

			The first four single primes are 2, 23, 37 and 47, therefore a(4) = 2*23*37*47 = 79994.
		

Programs

  • Mathematica
    nn=50;tps=Union[Flatten[Select[Partition[Prime[Range[nn]],2,1],Last[#]- First[#] ==2&]]]; ntps=Complement[Prime[Range[nn]],tps];Rest[ FoldList[ Times,1,ntps]]  (* Harvey P. Dale, Mar 31 2011 *)

Formula

a(1) = A007510(1) and a(n) = a(n-1)*A007510(n) for n > 1.

Extensions

More terms from Harvey P. Dale, Mar 31 2011
Showing 1-2 of 2 results.