cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

This page as a plain text file.
%I A022894 #46 Jan 25 2024 19:02:54
%S A022894 0,1,1,2,5,13,39,122,392,1286,4341,14860,51085,178402,634511,2260918,
%T A022894 8067237,29031202,105250449,383579285,1404666447,5171065198,
%U A022894 19141008044,71124987313,263548339462,983424096451,3684422350470,13818161525284,51938115653565
%N 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.
%C A022894 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.
%H A022894 Ray Chandler, <a href="/A022894/b022894.txt">Table of n, a(n) for n = 0..1000</a> (first 101 terms from T. D. Noe)
%F A022894 Conjecture: limit_{n->oo} a(n)^(1/n) = 4. - _Vaclav Kotesovec_, Jun 05 2019
%F A022894 a(n) is the constant term in expansion of (1/2) * Product_{k=1..2*n+1} (x^prime(k) + 1/x^prime(k)). - _Ilya Gutkovskiy_, Jan 25 2024
%e A022894 a(1) = 1 because 2 + 3 - 5 = 0,
%e A022894 a(2) = 1 because 2 - 3 + 5 + 7 - 11 = 0,
%e A022894 a(3) = 2 because
%e A022894   2 + 3 - 5 - 7 + 11 + 13 - 17 =
%e A022894   2 + 3 - 5 + 7 - 11 - 13 + 17 = 0.
%e A022894 a(4) = 5 because
%e A022894   2 - 3 - 5 + 7 + 11 + 13 + 17 - 19 - 23 =
%e A022894   2 - 3 + 5 - 7 + 11 + 13 - 17 + 19 - 23 =
%e A022894   2 - 3 + 5 + 7 - 11 - 13 + 17 + 19 - 23 =
%e A022894   2 - 3 + 5 + 7 - 11 + 13 - 17 - 19 + 23 =
%e A022894   2 + 3 + 5 - 7 - 11 - 13 + 17 - 19 + 23 = 0
%e A022894 and there are no others up through the ninth prime.
%p A022894 sp:= proc(n) sp(n):= `if`(n=1, 0, ithprime(n)+sp(n-1)) end:
%p A022894 b := proc(n,i) option remember; `if`(n>sp(i), 0, `if`(i=1, 1,
%p A022894         b(n+ithprime(i), i-1)+ b(abs(n-ithprime(i)), i-1)))
%p A022894      end:
%p A022894 a:= n-> b(2, 2*n+1):
%p A022894 seq(a(n), n=0..40);  # _Alois P. Heinz_, Aug 05 2012
%t A022894 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} ]
%o A022894 (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
%Y A022894 Cf. A113040, A215036, A083309 (sums of odd primes).
%Y A022894 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).
%Y A022894 Bisection (odd part) of A306443.
%K A022894 nonn,nice
%O A022894 0,4
%A A022894 _Clark Kimberling_
%E A022894 Edited by _Robert G. Wilson v_, Jan 29 2002
%E A022894 More terms from _T. D. Noe_, Jan 16 2007
%E A022894 Edited by _M. F. Hasler_, Aug 09 2015