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

A095138 Indices of primes in A095137(n).

Original entry on oeis.org

1, 3, 4, 5, 6, 7, 17, 22, 25, 29, 34, 40, 58, 78, 99, 146, 249, 554, 767, 963
Offset: 1

Views

Author

Robert G. Wilson v, May 28 2004

Keywords

Crossrefs

Cf. A095137.

Programs

  • Mathematica
    f[n_] := Abs[ Product[ Prime[i], {i, 2, n, 2}] + Product[ Prime[i], {i, 1, n, 2}]]; f[1] = 2; Do[ If[ PrimeQ[ f[n]], Print[n]], {n, 1000}]

A095139 Number of distinct prime factors of A095137(n).

Original entry on oeis.org

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

Views

Author

Robert G. Wilson v, May 28 2004

Keywords

Crossrefs

Cf. A095137.

Programs

  • Mathematica
    PrimeFactors[n_] := Flatten[ Table[ #[[1]], {1} ] & /@ FactorInteger[n]]; f[n_] := Abs[ Product[ Prime[i], {i, 2, n, 2}] + Product[ Prime[i], {i, 1, n, 2}]]; f[1] = 2; Table[ Length[ PrimeFactors[ f[n]]], {n, 72}]

A095134 Sum of the product of the first ceiling(n/2) odd-indexed primes and the product of the first floor(n/2) even-indexed primes; a(1) = 2.

Original entry on oeis.org

2, 5, 13, 31, 131, 383, 2143, 7057, 48197, 193433, 1483733, 6898961, 60231361, 293988703, 2808611363, 15253406999, 164272132459, 925319250199, 10930128162979, 65091314708809, 796351893424729, 5081275480436251
Offset: 1

Views

Author

Robert G. Wilson v, May 27 2004

Keywords

Examples

			a(5) = 2*5*11 + 3*7 = 131, a(6) = 2*5*11 + 3*7*13 = 383;
a(7) = 2*5*11*17 + 3*7*13 = 2143, a(8) = 2*5*11*17 + 3*7*13*19 = 7057.
		

Crossrefs

Programs

  • Maple
    p:= 2: R:= 2: a:= 2: b:= 1:
    for m from 1 to 10 do
      p:= nextprime(p); b:= b*p; R:= R,a+b;
      p:= nextprime(p); a:= a*p; R:= R,a+b;
    od:
    R; # Robert Israel, Dec 01 2024
  • Mathematica
    f[n_] := Product[Prime[i], {i, 2, n, 2}] + Product[Prime[i], {i, 1, n, 2}]; f[1] = 2; Table[ f[n], {n, 22}]
  • PARI
    a(n) = if (n==1, 2, vecprod(vector(floor(n/2), k, prime(2*k)))+vecprod(vector(ceil(n/2), k, prime(2*k-1)))); \\ Michel Marcus, Dec 03 2024

Formula

Sum_{i=1..n} of the product_{j=2..n, 2} p_j (A066206) and the product_{k=1..n, 2} p_j (A066205).
Showing 1-3 of 3 results.