The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A350287 Number of solutions to +-1 +- 3 +- 6 +- 10 +- ... +- n*(n + 1)/2 = 0 or 1. 1
1, 1, 0, 0, 2, 1, 2, 2, 4, 7, 12, 16, 26, 42, 66, 104, 210, 318, 620, 970, 1748, 3281, 5948, 10480, 18976, 34233, 60836, 111430, 209460, 378529, 704934, 1284836, 2387758, 4466874, 8331820, 15525814, 28987902, 54162165, 101242982, 190267598, 358969426, 674845081 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,5
LINKS
EXAMPLE
a(4) = 2: -1 - 3 - 6 + 10 = +1 + 3 + 6 - 10 = 0.
PROG
(Python)
from functools import lru_cache
@lru_cache(maxsize=None)
def b(n, i):
if n > i*(i+1)*(i+2)//6: return 0
if i == 0: return 1
return b(n+i*(i+1)//2, i-1) + b(abs(n-i*(i+1)//2), i-1)
def a(n): return b(0, n) + b(1, n)
print([a(n) for n in range(41)]) # Michael S. Branicky, Jan 19 2022
CROSSREFS
Sequence in context: A325246 A193691 A089408 * A208888 A258783 A079318
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Jan 19 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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 18 12:18 EDT 2024. Contains 372630 sequences. (Running on oeis4.)