|
|
A350880
|
|
a(n) is the constant term in expansion of Product_{k=1..n} (x^prime(k) + 1 + 1/x^prime(k)).
|
|
6
|
|
|
1, 1, 1, 3, 5, 7, 17, 39, 95, 233, 561, 1435, 3643, 9417, 24973, 66695, 177915, 475629, 1293017, 3517223, 9636365, 26676197, 73848517, 205382439, 571628347, 1588203787, 4435819313, 12474619295, 35194448271, 99782519701, 283514955585, 799783925547
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,4
|
|
COMMENTS
|
a(n) is the number of solutions to 0 = Sum_{i=1..n} c_i * prime(i) with c_i in {-1,0,1}. a(3) = 3: -2-3+5, +2+3-5, 0+0+0. - Alois P. Heinz, Dec 28 2023
|
|
LINKS
|
|
|
MAPLE
|
s:= proc(n) s(n):= `if`(n<1, 0, ithprime(n)+s(n-1)) end:
b:= proc(n, i) option remember; `if`(n>s(i), 0, `if`(i=0, 1,
b(n, i-1)+b(n+ithprime(i), i-1)+b(abs(n-ithprime(i)), i-1)))
end:
a:= n-> b(0, n):
|
|
PROG
|
(PARI) a(n) = polcoef (prod(k=1, n, x^prime(k) + 1 + 1/x^prime(k)), 0); \\ Michel Marcus, Jan 21 2022
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|