login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A022894 Number of solutions to c(1)*prime(1) +...+ c(2n+1)*prime(2n+1) = 0, where c(i) = +-1 for i > 1, c(1) = 1. 30
0, 1, 1, 2, 5, 13, 39, 122, 392, 1286, 4341, 14860, 51085, 178402, 634511, 2260918, 8067237, 29031202, 105250449, 383579285, 1404666447, 5171065198, 19141008044, 71124987313, 263548339462, 983424096451, 3684422350470, 13818161525284, 51938115653565 (list; graph; refs; listen; history; text; internal format)
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

T. D. Noe and Ray Chandler, Table of n, a(n) for n = 0..1000 (first 101 terms from T. D. Noe)

FORMULA

Conjecture: limit_{n->infinity} a(n)^(1/n) = 4. - Vaclav Kotesovec, Jun 05 2019

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. A113040, A215036, A083309 (sums of odd primes).

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.

Sequence in context: A319378 A151446 A239106 * A149861 A148305 A104447

Adjacent sequences:  A022891 A022892 A022893 * A022895 A022896 A022897

KEYWORD

nonn,nice

AUTHOR

Clark Kimberling

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

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 17 22:05 EDT 2019. Contains 328134 sequences. (Running on oeis4.)