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 21 results. Next

A086821 Duplicate of A007576.

Original entry on oeis.org

1, 1, 1, 3, 7, 15, 35, 87, 217, 547, 1417, 3735, 9911, 26513, 71581, 194681, 532481
Offset: 0

Views

Author

Keywords

A123762 Number of ways, counted up to symmetry, to build a contiguous building with n LEGO blocks of size 1 X 2.

Original entry on oeis.org

1, 4, 37, 375, 4493, 56848, 753536, 10283622, 143607345, 2041497919, 29446248496, 429858432108
Offset: 1

Views

Author

Søren Eilers, Oct 29 2006

Keywords

Crossrefs

A316706 Number of solutions to k_1 + 2*k_2 + ... + n*k_n = n, where k_i are from {-1,0,1}, i=1..n.

Original entry on oeis.org

1, 1, 1, 2, 5, 12, 27, 69, 178, 457, 1194, 3178, 8538, 23062, 62726, 171804, 473069, 1308397, 3634075, 10133154, 28352421, 79575702, 223981549, 632101856, 1788172541, 5069879063, 14403962756, 41001479103, 116921037003, 333971884899, 955443681814, 2737387314548, 7853533625522, 22560919253095, 64890249175438, 186854616134794
Offset: 0

Views

Author

Paul D. Hanna, Jul 10 2018

Keywords

Comments

a(n) is the coefficient of both x^n and 1/x^n in Product_{k=1..n} (1/x^k + 1 + x^k), while A007576 gives the constant term in the symmetric product.

Crossrefs

Programs

  • Mathematica
    nmax = 40; p = 1; Flatten[{1, Table[Coefficient[p = Expand[p*(1/x^n + 1 + x^n)], x^n], {n, 1, nmax}]}] (* Vaclav Kotesovec, Jul 11 2018 *)
  • PARI
    {a(n) = polcoeff( prod(k=1,n, 1/x^k + 1 + x^k) + x*O(x^n),n)}
    for(n=0,40, print1(a(n),", "))
    
  • Python
    from collections import Counter
    def A316706(n):
        c = {0:1}
        for k in range(1,n+1):
            b = Counter(c)
            for j in c:
                a = c[j]
                b[j+k] += a
                b[j-k] += a
            c = b
        return c[n] # Chai Wah Wu, Feb 05 2024

Formula

a(n) = [x^n] Product_{k=1..n} (1/x^k + 1 + x^k).
a(n) = [x^(n*(n-1)/2)] Product_{k=1..n} (1 + x^k + x^(2*k)).
a(n) = [x^(n*(n+3)/2)] Product_{k=1..n} (1 + x^k + x^(2*k)).
a(n) ~ 3^(n + 1) / (2 * sqrt(Pi) * n^(3/2)). - Vaclav Kotesovec, Jul 11 2018

A225310 T(n,k)=Number of nXk -1,1 arrays such that the sum over i=1..n,j=1..k of i*x(i,j) is zero and rows are nondecreasing (ways to put k thrusters pointing east or west at each of n positions 1..n distance from the hinge of a south-pointing gate without turning the gate).

Original entry on oeis.org

0, 1, 0, 0, 1, 2, 1, 0, 3, 2, 0, 3, 6, 7, 0, 1, 0, 9, 16, 15, 0, 0, 3, 12, 31, 0, 35, 8, 1, 0, 17, 52, 113, 0, 87, 14, 0, 5, 22, 83, 0, 443, 474, 217, 0, 1, 0, 27, 122, 427, 0, 1787, 1576, 547, 0, 0, 5, 34, 175, 0, 2341, 5304, 7445, 0, 1417, 70, 1, 0, 41, 238, 1165, 0, 13333, 26498
Offset: 1

Views

Author

R. H. Hardin May 05 2013

Keywords

Comments

Table starts
..0....1....0......1.....0.......1......0........1......0.........1.......0
..0....1....0......3.....0.......3......0........5......0.........5.......0
..2....3....6......9....12......17.....22.......27.....34........41......48
..2....7...16.....31....52......83....122......175....238.......317.....410
..0...15....0....113.....0.....427......0.....1165......0......2591.......0
..0...35....0....443.....0....2341......0.....8221......0.....22351.......0
..8...87..474...1787..5304...13333..29638....60007.112790....199669..336342
.14..217.1576...7445.26498...77721.197440...449693.939130...1828785.3360554
..0..547....0..31593.....0..461973......0..3437315......0..17085339.......0
..0.1417....0.136351.....0.2791167......0.26700429......0.162204059.......0

Examples

			Some solutions for n=4 k=4
..1..1..1..1...-1.-1..1..1...-1.-1.-1..1....1..1..1..1...-1..1..1..1
..1..1..1..1...-1..1..1..1...-1.-1.-1..1...-1.-1.-1.-1...-1.-1..1..1
.-1.-1.-1.-1....1..1..1..1...-1..1..1..1....1..1..1..1...-1..1..1..1
.-1.-1..1..1...-1.-1.-1.-1...-1.-1..1..1...-1.-1.-1..1...-1.-1.-1..1
		

Crossrefs

Column 1 is A063865
Column 2 is A007576
Row 3 is A008810(n+1)

Formula

Empirical for row n:
n=1: a(n) = a(n-2)
n=2: a(n) = a(n-2) +a(n-4) -a(n-6)
n=3: a(n) = 2*a(n-1) -a(n-2) +a(n-3) -2*a(n-4) +a(n-5)
n=4: a(n) = a(n-1) +a(n-2) -2*a(n-5) +a(n-8) +a(n-9) -a(n-10)
n=5: [order 18]
n=6: [order 42]
n=7: [order 24]
n=8: [order 36]

A350249 a(n) is the constant term in expansion of Product_{k=1..n} (x^(k^2) + 1 + 1/x^(k^2)).

Original entry on oeis.org

1, 1, 1, 1, 1, 3, 7, 19, 43, 95, 189, 429, 1003, 2457, 6319, 16165, 41601, 107969, 280253, 737065, 1950865, 5201941, 13954313, 37593679, 101695957, 276296549, 753191093, 2061201397, 5658850121, 15583938539, 43040609115, 119182143639, 330841253283, 920550527585
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 28 2022

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; `if`(n=0, 1,
          expand((x^(n^2)+1+1/x^(n^2))*b(n-1)))
        end:
    a:= n-> coeff(b(n),x,0):
    seq(a(n), n=0..33);  # Alois P. Heinz, Jan 28 2022
  • Mathematica
    Table[Coefficient[Product[x^(k^2) + 1 + 1/x^(k^2), {k, 1, n}], x, 0], {n, 0, 30}] (* Vaclav Kotesovec, Feb 05 2022 *)

Formula

Conjecture: a(n) ~ sqrt(5) * 3^(n + 1/2) / (2*sqrt(Pi)*n^(5/2)). - Vaclav Kotesovec, Feb 04 2022

A156181 Number of solutions to e(1)*1 + e(2)*2 + ... + e(n)*n = e(-1)*1 + e(-2)*2 + ... + e(-n)*n, where e(j) are from {-1,0,1}, j=-n,...,n.

Original entry on oeis.org

1, 3, 13, 65, 403, 2669, 18759, 136477, 1020373, 7785741, 60395165, 474817833, 3775005799, 30298719855, 245167429681, 1997854542163, 16381233095985, 135050690760831, 1118800428892925, 9308791880014333, 77755512086256649
Offset: 0

Views

Author

Steven Finch, Feb 05 2009

Keywords

Comments

a(n) = coefficient of x^(n*(n+1)) in the polynomial Product_{k=1..n} (1 + x^k + x^(2*k))^2, and is the maximal such coefficient as well.

Crossrefs

Programs

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

Formula

a(n) is the constant term in expansion of Product_{k=1..n} (x^k + 1 + 1/x^k)^2. - Ilya Gutkovskiy, Jan 22 2024

A350880 a(n) is the constant term in expansion of Product_{k=1..n} (x^prime(k) + 1 + 1/x^prime(k)).

Original entry on oeis.org

1, 1, 1, 3, 5, 7, 17, 39, 95, 233, 561, 1435, 3643, 9417, 24973, 66695, 177915, 475629, 1293017, 3517223, 9636365, 26676197, 73848517, 205382439, 571628347, 1588203787, 4435819313, 12474619295, 35194448271, 99782519701, 283514955585, 799783925547
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 20 2022

Keywords

Comments

a(n) is the number of solutions to 0 = Sum_{i=1..n} c_i * prime(i) with c_i in {-1,0,1}. a(3) = 3: -2-3+5, +2+3-5, 0+0+0. - Alois P. Heinz, Dec 28 2023

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(0, n):
    seq(a(n), n=0..40);  # Alois P. Heinz, Dec 28 2023
  • Mathematica
    s[n_] := s[n] = If[n < 1, 0, Prime[n] + s[n-1]];
    b[n_, i_] := b[n, i] = If[n > s[i], 0, If[i == 0, 1, b[n, i-1] + b[n + Prime[i], i-1] + b[Abs[n - Prime[i]], i-1]]];
    a[n_] := b[0, n];
    Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Apr 27 2025, after Alois P. Heinz *)
  • PARI
    a(n) = polcoef (prod(k=1, n, x^prime(k) + 1 + 1/x^prime(k)), 0); \\ Michel Marcus, Jan 21 2022

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

A350305 a(n) is the constant term in the expansion of Product_{k=1..n} (x^k + 1 + 1/x^k)^n.

Original entry on oeis.org

1, 1, 13, 1437, 1884211, 24657701475, 3111336932350947, 3710920324904591897521, 41323213770479673319301068309, 4261037235228828189774620497534270303, 4045313784246510024420372971256850718016451185
Offset: 0

Views

Author

Seiichi Manyama, Dec 23 2021

Keywords

Comments

a(n) is the coefficient of x^(n^2 * (n+1)/2) in Product_{k=0..n} (1 + x^k + x^(2*k))^n.

Crossrefs

Programs

  • Maple
    f:= n -> coeff(mul(x^k+1+1/x^k,k=1..n)^n,x,0):
    map(f, [$0..12]); # Robert Israel, Jan 15 2023
  • Mathematica
    a[n_] := Coefficient[Series[Product[(x^k + 1 + 1/x^k)^n, {k, 1, n}], {x, 0, 0}], x, 0]; Array[a, 11, 0] (* Amiram Eldar, Dec 24 2021 *)
  • PARI
    a(n) = polcoef(prod(k=1, n, x^k+1+1/x^k)^n, 0);
    
  • PARI
    a(n) = polcoef(prod(k=1, n, 1+x^k+x^(2*k))^n, n^2*(n+1)/2);

A369344 a(n) is the constant term in expansion of 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, 3, 5, 11, 27, 61, 133, 311, 761, 1839, 4575, 11573, 29641, 76487, 199617, 524067, 1384697, 3681069, 9841217, 26437741, 71369101, 193496241, 526685793, 1438816755, 3944034221, 10845006963, 29908325821, 82707648985, 229306378067, 637283978821
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 20 2024

Keywords

Comments

All terms are odd.
a(n) is the number of solutions to 0 = Sum_{i=1..n} c_i * i*(i+1)/2 with c_i in {-1,0,1}.

Crossrefs

Programs

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

Formula

a(n) ~ sqrt(5) * 3^(n + 1/2) / (sqrt(Pi) * n^(5/2)). - Vaclav Kotesovec, Jan 22 2024
Showing 1-10 of 21 results. Next