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.

A030018 Coefficients in 1/(1+P(x)), where P(x) is the generating function of the primes.

Original entry on oeis.org

1, -2, 1, -1, 2, -3, 7, -10, 13, -21, 26, -33, 53, -80, 127, -193, 254, -355, 527, -764, 1149, -1699, 2436, -3563, 5133, -7352, 10819, -15863, 23162, -33887, 48969, -70936, 103571, -150715, 219844, -320973, 466641, -679232, 988627, -1437185, 2094446, -3052743
Offset: 0

Views

Author

Keywords

Comments

a(n+1)/a(n) => ~-1.456074948582689671... (see A072508). - Zak Seidov, Oct 01 2011

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n=0, 1,
          -add(ithprime(n-i)*a(i), i=0..n-1))
        end:
    seq(a(n), n=0..70);  # Alois P. Heinz, Jun 13 2018
  • Mathematica
    max = 50; P[x_] := 1 + Sum[Prime[n]*x^n, {n, 1, max}]; s = Series[1/P[x], {x, 0, max}]; CoefficientList[s, x] (* Jean-François Alcover, Sep 24 2014 *)
  • PARI
    v=[];for(n=1,50,v=concat(v,-prime(n)-sum(i=1,n-1,prime(i)*v[#v-i+1])));v \\ Derek Orr, Apr 28 2015

Formula

Apply inverse of "INVERT" transform to primes: INVERT: a's from b's in 1+Sum a_i x^i = 1/(1-Sum b_i x^i).
a(n) = -prime(n) - Sum_{i=1..n-1} prime(i)*a(n-i), for n > 0. - Derek Orr, Apr 28 2015
a(n) = Sum_{k=0..n} (-1)^k * A340991(n,k). - Alois P. Heinz, Feb 01 2021