OFFSET
1,5
COMMENTS
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.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..300
MAPLE
s:= proc(n) option remember;
`if`(n<5, 0, ithprime(n)+s(n-1))
end:
b:= proc(n, i) option remember; `if`(n>s(i), 0, `if`(i=4, 1,
b(abs(n-ithprime(i)), i-1)+b(n+ithprime(i), i-1)))
end:
a:= n-> b(8, 2*n+2):
seq(a(n), n=1..30); # Alois P. Heinz, Aug 08 2015
MATHEMATICA
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 *)
PROG
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
M. F. Hasler, Aug 08 2015
EXTENSIONS
a(13)-a(29) from Alois P. Heinz, Aug 08 2015
STATUS
approved