login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A113040 Number of solutions to +-p(1)+-p(2)+-...+-p(2n)=1 where p(i) is the i-th prime. 17
1, 1, 3, 6, 16, 45, 138, 439, 1417, 4698, 16021, 55146, 190274, 671224, 2404289, 8535117, 30635869, 110496946, 401422210, 1467402238, 5393176633, 19883249002, 73856531314, 273602448261, 1017563027699, 3803902663467, 14266523388813, 53564969402478 (list; graph; refs; listen; history; text; internal format)
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
a(n) = A022895(2n) + A261061(n). - M. F. Hasler, Aug 09 2015
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
Bisection (even part) of A306443.
Sequence in context: A333026 A086811 A106361 * A244036 A220184 A007002
KEYWORD
nonn
AUTHOR
Floor van Lamoen, Oct 12 2005
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 3 03:00 EDT 2024. Contains 372203 sequences. (Running on oeis4.)