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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A350695 Number of solutions to +-2 +- 3 +- 5 +- 7 +- ... +- prime(n-1) = n. 2
 1, 0, 1, 0, 1, 0, 1, 1, 4, 5, 9, 15, 26, 45, 77, 137, 243, 434, 774, 1408, 2554, 4667, 8627, 15927, 29559, 54867, 101688, 189425, 355315, 668598, 1264180, 2395462, 4506221, 8507311, 16084405, 30545142, 57898862, 110199367, 209957460, 400430494, 765333684 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,9 LINKS Table of n, a(n) for n=0..40. FORMULA a(n) = [x^n] Product_{k=1..n-1} (x^prime(k) + 1/x^prime(k)). MATHEMATICA Table[SeriesCoefficient[Product[x^Prime[k] + 1/x^Prime[k], {k, n - 1}], {x, 0, n}], {n, 0, 40}] (* Stefano Spezia, Jan 30 2022 *) PROG (Python) from sympy import sieve, primerange from functools import cache @cache def b(n, i): maxsum = 0 if i < 2 else sum(p for p in primerange(2, sieve[i-1]+1)) if n > maxsum: return 0 if i < 2: return 1 return b(n+sieve[i-1], i-1) + b(abs(n-sieve[i-1]), i-1) def a(n): return b(n, n) print([a(n) for n in range(41)]) # Michael S. Branicky, Jan 29 2022 CROSSREFS Cf. A000040, A022894, A058377, A063890, A113040, A261061, A350404. Sequence in context: A042489 A217685 A251632 * A049860 A010382 A138673 Adjacent sequences: A350692 A350693 A350694 * A350696 A350697 A350698 KEYWORD nonn AUTHOR Ilya Gutkovskiy, Jan 29 2022 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.

Last modified September 7 22:13 EDT 2024. Contains 375749 sequences. (Running on oeis4.)