login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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. 19
0, 0, 0, 1, 2, 5, 32, 93, 261, 1082, 3253, 12307, 40809, 153392, 525417, 1892876, 6847161, 25256461, 91268129, 335852960, 1239350769, 4606651034, 17073491494, 63523866957, 237953442636, 892247156886, 3346127378391, 12603121634857, 47642071407103 (list; graph; refs; listen; history; text; internal format)
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
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
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).
Sequence in context: A032504 A041397 A042811 * A145656 A221680 A009274
KEYWORD
nonn
AUTHOR
M. F. Hasler, Aug 08 2015
EXTENSIONS
a(13)-a(29) from Alois P. Heinz, Aug 08 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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)