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.
%I A261045 #16 Nov 11 2015 03:45:13 %S A261045 0,0,0,1,2,5,32,93,261,1082,3253,12307,40809,153392,525417,1892876, %T A261045 6847161,25256461,91268129,335852960,1239350769,4606651034, %U A261045 17073491494,63523866957,237953442636,892247156886,3346127378391,12603121634857,47642071407103 %N A261045 Number of solutions to c(1)*prime(4) + c(2)*prime(5) + ... + c(2n-1)*prime(2n+2) = -1, where c(i) = +-1 for i>1, c(1) = 1. %C A261045 There cannot be a solution for an even number of terms on the l.h.s. because they are all odd and the r.h.s. is odd, too. %H A261045 Alois P. Heinz, <a href="/A261045/b261045.txt">Table of n, a(n) for n = 1..300</a> %p A261045 s:= proc(n) option remember; %p A261045 `if`(n<5, 0, ithprime(n)+s(n-1)) %p A261045 end: %p A261045 b:= proc(n, i) option remember; `if`(n>s(i), 0, `if`(i=4, 1, %p A261045 b(abs(n-ithprime(i)),i-1)+b(n+ithprime(i),i-1))) %p A261045 end: %p A261045 a:= n-> b(8, 2*n+2): %p A261045 seq(a(n), n=1..30); # _Alois P. Heinz_, Aug 08 2015 %t A261045 s[n_] := s[n] = If[n<5, 0, Prime[n]+s[n-1]]; b[n_, i_] := b[n, i] = If[n > s[i], 0, If[i == 4, 1, b[Abs[n-Prime[i]], i-1] + b[n+Prime[i], i-1]]]; a[n_] := b[8, 2*n+2]; Table[a[n], {n, 1, 30}] (* _Jean-François Alcover_, Nov 11 2015, after _Alois P. Heinz_ *) %o A261045 (PARI) a(n)={my(p=vector(2*n-2,i,prime(i+4)));sum(i=1,2^(2*n-2),sum(j=1,#p,(1-bittest(i,j-1)<<1)*p[j],7)==-1)} \\ For illustrative purpose; too slow for n >> 10. - _M. F. Hasler_, Aug 08 2015 %Y A261045 Cf. A261057 (starting with prime(1)), A261059 (starting with prime(2)), A261060 (starting with prime(3)), A261061 - A261063 and A261044 (r.h.s. = -1), A022894 -A022904, A083309, A022920 (r.h.s. = 0, 1 or 2). %K A261045 nonn %O A261045 1,5 %A A261045 _M. F. Hasler_, Aug 08 2015 %E A261045 a(13)-a(29) from _Alois P. Heinz_, Aug 08 2015