OFFSET
1,3
COMMENTS
+-p(1)+-p(2)+-...+-p(2n+1)=1 has no solutions because the l.h.s. is even.
LINKS
Alois P. Heinz and Ray Chandler, Table of n, a(n) for n = 1..1000 (first 130 terms from Alois P. Heinz)
FORMULA
Conjecture: limit_{n->infinity} a(n)^(1/n) = 4. - Vaclav Kotesovec, Jun 05 2019
a(n) = [x^1] Product_{k=1..2*n} (x^prime(k) + 1/x^prime(k)). - Ilya Gutkovskiy, Jan 25 2024
EXAMPLE
2 + 3 + 5 - 7 + 11 - 13 = - 2 + 3 + 5 - 7 - 11 + 13 = - 2 + 3 - 5 + 7 + 11 - 13 = 1 so a(3) = 3.
MAPLE
A113040:=proc(n) local i, j, p, t; t:= NULL; for j from 2 to 2*n by 2 do p:=1; for i to j do p:=p*(x^(-ithprime(i))+x^(ithprime(i))); od; t:=t, coeff(p, x, 1); od; t; end;
# second Maple program:
sp:= proc(n) sp(n):= `if`(n=0, 0, ithprime(n)+sp(n-1)) end:
b := proc(n, i) option remember; `if`(n>sp(i), 0, `if`(i=0, 1,
b(n+ithprime(i), i-1)+ b(abs(n-ithprime(i)), i-1)))
end:
a:= n-> b(1, 2*n):
seq(a(n), n=1..40); # Alois P. Heinz, Aug 05 2012
MATHEMATICA
sp[n_] := If[n == 0, 0, Prime[n]+sp[n-1]]; b[n_, i_] := b[n, i] =If[n > sp[i], 0, If[i == 0, 1, b[n+Prime[i], i-1] + b[Abs[n-Prime[i]], i-1]]]; a[n_] := b[1, 2*n]; Table[a[n], {n, 1, 40}] (* Jean-François Alcover, Nov 11 2015, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Floor van Lamoen, Oct 12 2005
STATUS
approved