login
This site is supported by donations 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. 11

%I

%S 1,1,3,6,16,45,138,439,1417,4698,16021,55146,190274,671224,2404289,

%T 8535117,30635869,110496946,401422210,1467402238,5393176633,

%U 19883249002,73856531314,273602448261,1017563027699,3803902663467,14266523388813,53564969402478

%N Number of solutions to +-p(1)+-p(2)+-...+-p(2n)=1 where p(i) is the i-th prime.

%C +-p(1)+-p(2)+-...+-p(2n+1)=1 has no solutions because the l.h.s. is even.

%H Alois P. Heinz and Ray Chandler, <a href="/A113040/b113040.txt">Table of n, a(n) for n = 1..1000</a> (first 130 terms from Alois P. Heinz)

%F a(n) = A022895(2n) + A261061(n). - _M. F. Hasler_, Aug 09 2015

%F Conjecture: limit_{n->infinity} a(n)^(1/n) = 4. - _Vaclav Kotesovec_, Jun 05 2019

%e 2 + 3 + 5 - 7 + 11 - 13 = - 2 + 3 + 5 - 7 - 11 + 13 = - 2 + 3 - 5 + 7 + 11 - 13 = 1 so a(3) = 3.

%p 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;

%p # second Maple program:

%p sp:= proc(n) sp(n):= `if`(n=0, 0, ithprime(n)+sp(n-1)) end:

%p b := proc(n,i) option remember; `if`(n>sp(i), 0, `if`(i=0, 1,

%p b(n+ithprime(i), i-1)+ b(abs(n-ithprime(i)), i-1)))

%p end:

%p a:= n-> b(1, 2*n):

%p seq(a(n), n=1..40); # _Alois P. Heinz_, Aug 05 2012

%t 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_ *)

%Y Cf. A083309, A022894 - A022904, A022920, A261057 - A261063 and A261044 - A261045; A215036.

%Y Bisection (even part) of A306443.

%K nonn

%O 1,3

%A _Floor van Lamoen_, Oct 12 2005

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 16 21:10 EDT 2019. Contains 328103 sequences. (Running on oeis4.)