cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-10 of 13 results. Next

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.

Original entry on oeis.org

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
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 28 2024

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Coefficient[Product[(x^k + 1 + 1/x^k), {k, 1, n}], x, 1], {n, 0, 31}]
  • 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

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)).

A369390 a(n) = [x^prime(n)] Product_{k=1..n} (x^prime(k) + 1 + 1/x^prime(k)).

Original entry on oeis.org

1, 1, 2, 4, 6, 13, 31, 77, 188, 449, 1191, 3014, 7920, 21498, 57833, 154073, 412733, 1141274, 3106771, 8576977, 24015471, 66489615, 185886699, 517837152, 1435964205, 4034697191, 11438332340, 32395341851, 92396549863, 263233759500, 736127855014, 2093027604453
Offset: 1

Views

Author

Ilya Gutkovskiy, Jan 22 2024

Keywords

Crossrefs

Programs

  • Maple
    s:= proc(n) s(n):= `if`(n<1, 0, ithprime(n)+s(n-1)) end:
    b:= proc(n, i) option remember; `if`(n>s(i), 0, `if`(i=0, 1,
          b(n, i-1)+b(n+ithprime(i), i-1)+b(abs(n-ithprime(i)), i-1)))
        end:
    a:= n-> b(ithprime(n), n):
    seq(a(n), n=1..40);  # Alois P. Heinz, Jan 22 2024
  • Mathematica
    Table[Coefficient[Product[(x^Prime[k] + 1 + 1/x^Prime[k]), {k, 1, n}], x, Prime[n]], {n, 1, 32}]

A369433 a(n) = [x^n] Product_{k=1..n} (x^(k^2) + 1 + 1/x^(k^2)).

Original entry on oeis.org

1, 1, 0, 1, 3, 5, 7, 13, 35, 82, 168, 409, 1035, 2540, 6262, 16068, 41474, 107259, 279256, 736359, 1953946, 5205746, 13938670, 37567522, 101675407, 276158642, 752927255, 2060852216, 5658658210, 15582628517, 43032891276, 119166025289, 330808837377
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 23 2024

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Coefficient[Product[(x^(k^2) + 1 + 1/x^(k^2)), {k, 1, n}], x, n], {n, 0, 32}]

A369437 a(n) = [x^n] Product_{k=1..n} (x^(k^3) + 1 + 1/x^(k^3)).

Original entry on oeis.org

1, 1, 0, 0, 0, 0, 0, 4, 6, 15, 24, 40, 69, 138, 396, 1028, 3062, 8269, 21680, 50955, 115457, 262239, 631393, 1666438, 4558051, 12913587, 35530351, 95825467, 246943968, 628040166, 1607703060, 4228528070, 11485131123, 31616483271, 88141192570, 243487667830
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 23 2024

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n>(i*(i+1)/2)^2, 0,
         `if`(i=0, 1, b(n, i-1)+b(n+i^3, i-1)+b(abs(n-i^3), i-1)))
        end:
    a:= n-> b(n$2):
    seq(a(n), n=0..35);  # Alois P. Heinz, Jan 23 2024
  • Mathematica
    Table[Coefficient[Product[(x^(k^3) + 1 + 1/x^(k^3)), {k, 1, n}], x, n], {n, 0, 34}]

A369434 a(n) = [x^(n^2)] Product_{k=1..n} (x^(k^2) + 1 + 1/x^(k^2)).

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 5, 13, 31, 75, 155, 344, 808, 2019, 5136, 13422, 34720, 91055, 238447, 630753, 1678780, 4502862, 12135507, 32873145, 89324119, 243745113, 667153916, 1832553339, 5048767393, 13950607375, 38649239592, 107345311219, 298820158401, 833680894927
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 23 2024

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Coefficient[Product[(x^(k^2) + 1 + 1/x^(k^2)), {k, 1, n}], x, n^2], {n, 0, 33}]

A368478 a(n) = [x^n] Product_{k=1..n} (x^(k^4) + 1 + 1/x^(k^4)).

Original entry on oeis.org

1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 22, 88, 236, 568, 1147, 1999, 3030, 4333, 4793, 5620, 4628, 9353, 40048, 312436, 1638550, 7894061, 30866741, 105342660, 323671449, 863529149, 2152428536, 4750103818, 9796453345, 18572505806, 32181800057, 55712628236
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 25 2024

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; (m-> `if`(n>m, 0, `if`(n=m, 1, b(n, i-1)+
          b(abs(n-i^4), i-1)+b(n+i^4, i-1))))(i*(i+1)*(2*i+1)*(3*i^2+3*i-1)/30)
        end:
    a:= n-> b(n$2):
    seq(a(n), n=0..33);  # Alois P. Heinz, Jan 25 2024

Extensions

a(34)-a(38) from Alois P. Heinz, Jan 25 2024

A369438 a(n) = [x^(n^3)] Product_{k=1..n} (x^(k^3) + 1 + 1/x^(k^3)).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 2, 3, 4, 11, 24, 46, 106, 238, 537, 1318, 3007, 7027, 18199, 43202, 105900, 279860, 688474, 1741235, 4641670, 11790546, 30529486, 82306963, 213852619, 563866091, 1531711961, 4047719392, 10835966180, 29624064007, 79423421277, 215083283638
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 23 2024

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n>(i*(i+1)/2)^2, 0,
         `if`(i=0, 1, b(n, i-1)+b(n+i^3, i-1)+b(abs(n-i^3), i-1)))
        end:
    a:= n-> b(n^3, n):
    seq(a(n), n=0..35);  # Alois P. Heinz, Jan 23 2024
  • Mathematica
    Table[Coefficient[Product[(x^(k^3) + 1 + 1/x^(k^3)), {k, 1, n}], x, n^3], {n, 0, 34}]

A369496 a(n) = [x^(n*(n+1)/2)] Product_{k=1..n} (x^(k*(k+1)/2) + 1 + 1/x^(k*(k+1)/2)).

Original entry on oeis.org

1, 1, 1, 1, 2, 4, 8, 20, 47, 104, 246, 607, 1496, 3751, 9579, 24720, 64327, 168932, 446830, 1188030, 3177198, 8541152, 23063100, 62550085, 170337684, 465564180, 1276779917, 3512617527, 9692054125, 26815357935, 74381739478, 206820705565, 576371104028
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 24 2024

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; (m-> `if`(n>m, 0,
         `if`(n=m, 1, b(abs(n-i*(i+1)/2), i-1)+b(n, i-1)+
            b(n+i*(i+1)/2, i-1))))((2+(3+i)*i)*i/6)
        end:
    a:= n-> b(n*(n+1)/2, n):
    seq(a(n), n=0..32);  # Alois P. Heinz, Jan 24 2024
  • Mathematica
    Table[Coefficient[Product[x^(k (k + 1)/2) + 1 + 1/x^(k (k + 1)/2), {k, 1, n}], x, n (n + 1)/2], {n, 0, 32}]

A369560 a(n) = [x^n] Product_{k=1..n} (x^prime(k) + 1 + 1/x^prime(k)).

Original entry on oeis.org

1, 0, 1, 2, 3, 6, 16, 38, 91, 225, 547, 1407, 3570, 9250, 24578, 65740, 175626, 470084, 1279101, 3482419, 9547953, 26445796, 73251187, 203818706, 567543095, 1577629707, 4408095456, 12400615844, 34995570604, 99241500366, 282037360250, 795846583187
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 25 2024

Keywords

Comments

a(n) is the number of solutions to n = Sum_{i=1..n} c_i * prime(i) with c_i in {-1,0,1}.

Crossrefs

Programs

  • Maple
    s:= proc(n) s(n):= `if`(n<1, 0, ithprime(n)+s(n-1)) end:
    b:= proc(n, i) option remember; `if`(n>s(i), 0, `if`(i=0, 1,
          b(n, i-1)+b(n+ithprime(i), i-1)+b(abs(n-ithprime(i)), i-1)))
        end:
    a:= n-> b(n$2):
    seq(a(n), n=0..32);  # Alois P. Heinz, Jan 25 2024
  • Mathematica
    Table[Coefficient[Product[x^Prime[k] + 1 + 1/x^Prime[k], {k, 1, n}], x, n], {n, 0, 31}]

A369875 a(n) = [x^n] Product_{d|n} (x^d + 1 + 1/x^d).

Original entry on oeis.org

1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 19, 1, 1, 1, 1, 1, 11, 1, 11, 1, 1, 1, 85, 1, 1, 1, 6, 1, 64, 1, 1, 1, 1, 1, 145, 1, 1, 1, 54, 1, 41, 1, 1, 5, 1, 1, 382, 1, 1, 1, 1, 1, 34, 1, 34, 1, 1, 1, 2425, 1, 1, 3, 1, 1, 27, 1, 1, 1, 23, 1, 1943, 1, 1, 1, 1, 1, 20, 1, 225
Offset: 1

Views

Author

Ilya Gutkovskiy, Feb 03 2024

Keywords

Comments

a(n) is the number of solutions to n = Sum_{d|n} c_i * d with c_i in {-1,0,1}, i=1..tau(n), tau = A000005.

Crossrefs

Programs

  • Mathematica
    Table[Coefficient[Product[(x^d + 1 + 1/x^d), {d, Divisors[n]}], x, n], {n, 1, 80}]
  • Python
    from collections import Counter
    from sympy import divisors
    def A369875(n):
        c = {0:1}
        for d in divisors(n,generator=True):
            b = Counter(c)
            for j in c:
                a = c[j]
                b[j+d] += a
                b[j-d] += a
            c = b
        return c[n] # Chai Wah Wu, Feb 05 2024
Showing 1-10 of 13 results. Next