The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A113042 Number of solutions to +-p(1)+-p(2)+-...+-p(2n) = 3 where p(i) is the i-th prime. 5
0, 2, 1, 7, 15, 45, 139, 438, 1419, 4703, 16019, 55146, 190254, 671215, 2404179, 8534995, 30635448, 110495549, 401418693, 1467388464, 5393131894, 19883104535, 73856058401, 273600682457, 1017557492609, 3803885439979, 14266466901249, 53564801078049 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
+-p(1)+-p(2)+-...+-p(2n+1) = 3 does not have solutions, since the left hand side is even. [Corrected and edited by M. F. Hasler, Aug 09 2015]
LINKS
Ray Chandler, Table of n, a(n) for n = 1..1000 (first 120 terms from Alois P. Heinz)
FORMULA
a(n) = [x^3] Product_{k=1..2*n} (x^prime(k) + 1/x^prime(k)). - Ilya Gutkovskiy, Jan 30 2024
MAPLE
A113042:=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, 3); 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(3, 2*n):
seq(a(n), n=1..30); # Alois P. Heinz, Aug 05 2012
MATHEMATICA
sp[n_] := 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[3, 2*n]; Table[a[n], {n, 1, 30}] (* Jean-François Alcover, Jan 31 2017, after Alois P. Heinz *)
CROSSREFS
Cf. A022894 - A022904, A022920, A083309; A261061 - A261063 and A261045 (r.h.s. = -1); A261057, A261059, A261060 and A261044 (r.h.s. = -2); A113040, A113041.
Sequence in context: A239104 A260259 A141488 * A305881 A184346 A178622
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 17 18:28 EDT 2024. Contains 372603 sequences. (Running on oeis4.)