OFFSET
0,4
COMMENTS
c(1)*prime(1) + ... + c(2n)*prime(2n) = 0 has no solution, because the l.h.s. has an odd number of odd terms and the r.h.s. is even.
LINKS
Ray Chandler, Table of n, a(n) for n = 0..1000 (first 101 terms from T. D. Noe)
FORMULA
Conjecture: limit_{n->oo} a(n)^(1/n) = 4. - Vaclav Kotesovec, Jun 05 2019
a(n) is the constant term in expansion of (1/2) * Product_{k=1..2*n+1} (x^prime(k) + 1/x^prime(k)). - Ilya Gutkovskiy, Jan 25 2024
EXAMPLE
a(1) = 1 because 2 + 3 - 5 = 0,
a(2) = 1 because 2 - 3 + 5 + 7 - 11 = 0,
a(3) = 2 because
2 + 3 - 5 - 7 + 11 + 13 - 17 =
2 + 3 - 5 + 7 - 11 - 13 + 17 = 0.
a(4) = 5 because
2 - 3 - 5 + 7 + 11 + 13 + 17 - 19 - 23 =
2 - 3 + 5 - 7 + 11 + 13 - 17 + 19 - 23 =
2 - 3 + 5 + 7 - 11 - 13 + 17 + 19 - 23 =
2 - 3 + 5 + 7 - 11 + 13 - 17 - 19 + 23 =
2 + 3 + 5 - 7 - 11 - 13 + 17 - 19 + 23 = 0
and there are no others up through the ninth prime.
MAPLE
sp:= proc(n) sp(n):= `if`(n=1, 0, ithprime(n)+sp(n-1)) end:
b := proc(n, i) option remember; `if`(n>sp(i), 0, `if`(i=1, 1,
b(n+ithprime(i), i-1)+ b(abs(n-ithprime(i)), i-1)))
end:
a:= n-> b(2, 2*n+1):
seq(a(n), n=0..40); # Alois P. Heinz, Aug 05 2012
MATHEMATICA
Do[a = Table[ Prime[i], {i, 1, n} ]; c = 0; k = 2^(n - 1); While[k < 2^n, If[ Apply[ Plus, a*(-1)^(IntegerDigits[k, 2] + 1)] == 0, c++ ]; k++ ]; Print[c], {n, 1, 32, 2} ]
PROG
(PARI) A022894={a(n, s=0-prime(1), p=1)=if(n<=s, if(s==p, n==s, a(abs(n-p), s-p, precprime(p-1))+a(n+p, s-p, precprime(p-1))), if(s<=0, a(abs(s), max(sum(i=p+1, p+(p>1)+2*n, prime(i)), 1), prime(p+(p>1)+2*n))))} \\ M. F. Hasler, Aug 09 2015
CROSSREFS
Cf. A022895, A022896 (r.h.s. = 1 & 2, using all primes), A083309 and A022897 - A022899 (using primes >= 3), A022900 - A022902 (using primes >=5), A022903, A022904, A022920 (using primes >= 7); A261061 - A261063 & A261045 (r.h.s. = -1); A261057, A261059, A261060 & A261044 (r.h.s. = -2).
Bisection (odd part) of A306443.
KEYWORD
nonn,nice
AUTHOR
EXTENSIONS
Edited by Robert G. Wilson v, Jan 29 2002
More terms from T. D. Noe, Jan 16 2007
Edited by M. F. Hasler, Aug 09 2015
STATUS
approved