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!)
A369628 Number of solutions to k_1 + 2*k_2 + ... + n*k_n = 1, where k_i are from {-1,0,1}, i=1..n. 4
0, 1, 2, 3, 6, 15, 36, 85, 213, 549, 1423, 3723, 9882, 26508, 71579, 194533, 532120, 1463561, 4044075, 11221727, 31260192, 87386579, 245058185, 689209348, 1943530845, 5494106583, 15566303698, 44196212866, 125727934145, 358317169828, 1022916667066, 2924843243594 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
FORMULA
a(n) = [x^1] Product_{k=1..n} (x^k + 1 + 1/x^k).
a(n) = [x^(n*(n+1)/2+1)] Product_{k=1..n} (1 + x^k + x^(2*k)).
MATHEMATICA
Table[Coefficient[Product[(x^k + 1 + 1/x^k), {k, 1, n}], x, 1], {n, 0, 31}]
PROG
(Python)
from itertools import count, islice
from collections import Counter
def A369628_gen(): # generator of terms
ccount = Counter({0:1})
yield 0
for i in count(1):
bcount = Counter(ccount)
for a in ccount:
bcount[a+i] += ccount[a]
bcount[a-i] += ccount[a]
ccount = bcount
yield(ccount[1])
A369628_list = list(islice(A369628_gen(), 20)) # Chai Wah Wu, Jan 29 2024
CROSSREFS
Sequence in context: A182240 A352901 A052102 * A053561 A237585 A147773
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Jan 28 2024
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 September 18 03:51 EDT 2024. Contains 375995 sequences. (Running on oeis4.)