|
|
A030018
|
|
Coefficients in 1/(1+P(x)), where P(x) is the generating function of the primes.
|
|
21
|
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
COMMENTS
|
|
|
LINKS
|
|
|
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
|
|
MAPLE
|
a:= proc(n) option remember; `if`(n=0, 1,
-add(ithprime(n-i)*a(i), i=0..n-1))
end:
|
|
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 *)
|
|
PROG
|
(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
|
|
CROSSREFS
|
|
|
KEYWORD
|
sign
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|