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-2 of 2 results.

A348474 Number of compositions of n into exactly 2n nonnegative parts such that each positive i-th part is odd if i is odd.

Original entry on oeis.org

1, 2, 8, 41, 220, 1212, 6803, 38691, 222196, 1285610, 7482718, 43762754, 256972507, 1514020484, 8945944435, 52990732161, 314568593860, 1870939233546, 11146516959176, 66508200091575, 397375460647690, 2377167144881136, 14236462650026064, 85346464443885086
Offset: 0

Views

Author

Alois P. Heinz, Oct 19 2021

Keywords

Examples

			a(2) = 8: [0,0,0,2], [0,0,1,1], [0,1,0,1], [0,1,1,0], [0,2,0,0], [1,0,0,1], [1,0,1,0], [1,1,0,0].
		

Crossrefs

Programs

  • Maple
    b:= proc(n, t) option remember; `if`(t=0, 1-signum(n),
          add(b(n-j, t-1)*iquo(j+3, 2), j=0..n))
        end:
    a:= n-> b(n$2):
    seq(a(n), n=0..25);
  • Mathematica
    b[n_, t_] := b[n, t] = If[t == 0, 1 - Sign[n],
         Sum[b[n - j, t - 1]*Quotient[j + 3, 2], {j, 0, n}]];
    a[n_] := b[n, n];
    Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Apr 07 2022, after Alois P. Heinz *)

Formula

a(n) ~ c * d^n / sqrt(Pi*n), where d = 6.12846447590595003785095345916525... is the real root of the equation 32*d^4 - 195*d^3 + 12*d^2 - 112*d - 20 = 0 and c = 0.5667463795063214394117147185755881... is positive root of the equation 182464*c^8 - 45616*c^6 - 2108*c^4 - 601*c^2 - 20 = 0. - Vaclav Kotesovec, Nov 01 2021
From Peter Bala, Feb 22 2022: (Start)
Conjecture: a(n) = [x^n] ( (1 + x - x^2)/((1 + x)*(1 - x)^2) )^n.
If true, then the following hold:
a(n) = Sum_{i = 0..n} Sum_{j = 0..n} binomial(n,i+2*j)*binomial(2*i+2*j-1, i)*binomial(n+j-1,j).
exp( Sum_{n >= 1} a(n)*x^n/n ) = 1 + 2*x + 6*x^2 + 23*x^3 + 99*x^4 + ... is the g.f. of A133656.
The Gauss congruences a(n*p^k) == a(n*p^(k-1)) (mod p^k) hold for all primes p and positive integers n and k. (End)

A348478 Number of compositions of n into exactly n nonnegative parts such that each positive i-th part has the same parity as i.

Original entry on oeis.org

1, 1, 1, 4, 7, 23, 55, 164, 407, 1235, 3051, 9432, 23431, 72989, 182624, 571384, 1436855, 4511979, 11387467, 35866100, 90782837, 286622226, 727226578, 2300578392, 5848776767, 18533394763, 47197285045, 149769168304, 381956145802, 1213526310665, 3098742448230
Offset: 0

Views

Author

Alois P. Heinz, Oct 20 2021

Keywords

Examples

			a(0) = 1: [].
a(1) = 1: [1].
a(2) = 1: [0,2].
a(3) = 4: [1,2,0], [0,2,1], [3,0,0], [0,0,3].
a(4) = 7: [1,2,1,0], [1,0,1,2], [3,0,1,0], [1,0,3,0], [0,2,0,2], [0,4,0,0], [0,0,0,4].
		

Crossrefs

Programs

  • Maple
    b:= proc(n, t) option remember; `if`(t=0, 1-signum(n),
          add(`if`(j=0 or (t-j)::even, b(n-j, t-1), 0), j=0..n))
        end:
    a:= n-> b(n$2):
    seq(a(n), n=0..33);
  • Mathematica
    b[n_, t_] := b[n, t] = If[t == 0, 1 - Sign[n],
         Sum[If[j == 0 || EvenQ[t - j], b[n - j, t - 1], 0], {j, 0, n}]];
    a[n_] :=  b[n, n];
    Table[a[n], {n, 0, 33}] (* Jean-François Alcover, Apr 14 2022, after Alois P. Heinz *)
Showing 1-2 of 2 results.