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.

A030009 Euler transform of primes.

Original entry on oeis.org

1, 2, 6, 15, 37, 85, 192, 414, 879, 1816, 3694, 7362, 14480, 28037, 53644, 101379, 189587, 350874, 643431, 1169388, 2108045, 3770430, 6694894, 11804968, 20679720, 35999794, 62298755, 107198541, 183462856, 312357002, 529173060, 892216829, 1497454396, 2502190992
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A007441.

Programs

  • Maple
    with(numtheory):
    a:= proc(n) option remember; `if`(n=0, 1, add(add(
          d*ithprime(d), d=divisors(j))*a(n-j), j=1..n)/n)
        end:
    seq(a(n), n=0..40);  #  Alois P. Heinz, Sep 06 2008
  • Mathematica
    a[n_] := a[n] = If[n == 0, 1, Sum[Sum[d*Prime[d], {d, Divisors[j]}]*a[n-j], {j, 1, n}]/n]; Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Apr 16 2014, after Alois P. Heinz *)
  • PARI
    a(n)=if(n<0,0,polcoeff(prod(i=1,n,(1-x^i)^-prime(i),1+x*O(x^n)),n))
    
  • SageMath
    # uses[EulerTransform from A166861]
    b = EulerTransform(lambda n: nth_prime(n))
    print([b(n) for n in range(37)]) # Peter Luschny, Nov 11 2020

Formula

G.f.: Product_{n>=1} (1-x^n)^(-prime(n)).