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

A103631 Triangle read by rows: T(n,k) = abs(qStirling2(n,k,q)) for q = -1, with 0 <= k <= n.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 2, 1, 0, 1, 1, 3, 2, 1, 0, 1, 1, 4, 3, 3, 1, 0, 1, 1, 5, 4, 6, 3, 1, 0, 1, 1, 6, 5, 10, 6, 4, 1, 0, 1, 1, 7, 6, 15, 10, 10, 4, 1, 0, 1, 1, 8, 7, 21, 15, 20, 10, 5, 1, 0, 1, 1, 9, 8, 28, 21, 35, 20, 15, 5, 1, 0, 1, 1, 10, 9, 36, 28, 56, 35, 35, 15, 6, 1
Offset: 0

Views

Author

Paul Barry, Feb 11 2005

Keywords

Comments

Previous name: An invertible triangle whose row sums are F(n+1).
Triangle inverse has general term (-1)^(n-k)*binomial(floor(n/2),n-k). Diagonal sums are A103632.
Triangle T(n,k), 0 <= k <= n, read by rows, given by [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...] DELTA [1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, ...] where DELTA is the operator defined in A084938. - Philippe Deléham, Oct 08 2005
Row sums are Fibonacci numbers (A000045).
Another version of triangle in A065941. - Philippe Deléham, Jan 01 2009
From Johannes W. Meijer, Aug 11 2011: (Start)
The T(n,k) coefficients appear in appendix 2 of Parks's remarkable article "A new proof of the Routh-Hurwitz stability criterion using the second method of Liapunov" if we assume that the b(r) coefficients are all equal to 1; see the second Maple program.
The T(n,k) triangle is related to a linear (n+1)-th order differential equation with coefficients a(n,k), see triangle A194005.
Parks's triangle appears to be an appropriate name for the triangle given above. (End)

Examples

			From _Paul Barry_, Oct 02 2009: (Start)
Triangle begins:
  1,
  0, 1,
  0, 1, 1,
  0, 1, 1, 1,
  0, 1, 1, 2, 1,
  0, 1, 1, 3, 2,  1,
  0, 1, 1, 4, 3,  3,  1,
  0, 1, 1, 5, 4,  6,  3,  1,
  0, 1, 1, 6, 5, 10,  6,  4, 1,
  0, 1, 1, 7, 6, 15, 10, 10, 4, 1
Production matrix is:
  0, 1,
  0, 1, 1,
  0, 0, 0, 1,
  0, 0, 0, 1, 1,
  0, 0, 0, 0, 0, 1,
  0, 0, 0, 0, 0, 1, 1,
  0, 0, 0, 0, 0, 0, 0, 1,
  0, 0, 0, 0, 0, 0, 0, 1, 1,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 1 (End)
		

Crossrefs

Cf. A103633 (signed version).

Programs

  • Haskell
    a103631 n k = a103631_tabl !! n !! k
    a103631_row n = a103631_tabl !! n
    a103631_tabl = [1] : [0,1] : f [1] [0,1] where
       f xs ys = zs : f ys zs where
         zs = zipWith (+)  ([0,0] ++ xs)  (ys ++ [0])
    -- Reinhard Zumkeller, May 07 2012
    
  • Magma
    /* As triangle: */ [[Binomial(Floor((2*n-k-1)/2), n-k): k in [0..n]]: n in [0..15]]; // Vincenzo Librandi, Aug 28 2016
    
  • Maple
    From Johannes W. Meijer, Aug 11 2011: (Start)
    A103631 := proc(n,k): binomial(floor((2*n-k-1)/2),n-k) end: seq(seq(A103631(n,k), k=0..n), n=0..12);
    nmax:=12: for n from 0 to nmax+1 do b(n):=1 od: A103631 := proc(n,k) option remember: local j: if k=0 and n=0 then b(1) elif k=0 and n>=1 then 0 elif k=1 then b(n+1) elif k=2 then b(1)*b(n+1) elif k>=3 then expand(b(n+1)*add(procname(j,k-2), j=k-2..n-2)) fi: end: for n from 0 to nmax do seq(A103631(n,k), k=0..n) od: seq(seq(A103631(n,k),k=0..n), n=0..nmax); # (End)
  • Mathematica
    p[x, -1] = 0; p[x, 0] = 1; p[x, 1] = x; p[x, 2] = x + x^2; p[x_, n_] := p[x, n] = p[x, n - 1] + x^2*p[x, n - 2]; (* with *) Table[ExpandAll[p[x, n]], {n, 0, 10}]; (* or *) a = Table[CoefficientList[p[x, n], x], {n, 0, 10}]; Flatten[a] (* Roger L. Bagula, Apr 27 2008 *)
    Table[Binomial[Floor[(2*n - k - 1)/2], n - k], {n, 0, 10}, {k, 0, n}] // Flatten (* G. C. Greubel, Aug 27 2016 *)
    qStirling2[n_, k_, q_] /; 1 <= k <= n := q^(k - 1) qStirling2[n - 1, k - 1, q] + Sum[q^j, {j, 0, k - 1}] qStirling2[n - 1, k, q];
    qStirling2[n_, 0, _] := KroneckerDelta[n, 0];
    qStirling2[0, k_, _] := KroneckerDelta[0, k];
    qStirling2[, , _] = 0;
    Table[Abs[qStirling2[n, k, -1]], {n, 0, 12}, {k, 0, n}] // Flatten (* Jean-François Alcover, Mar 10 2020 *)
  • Sage
    from sage.combinat.q_analogues import q_stirling_number2
    for n in (0..9):
        print([abs(q_stirling_number2(n,k).substitute(q=-1)) for k in [0..n]])
    # Peter Luschny, Mar 09 2020

Formula

T(n,k) = binomial(floor((2*n-k-1)/2), n-k).
A polynomial recursion which produces this triangle: p(x, n) = p(x, n - 1) + x^2*p(x, n - 2). - Roger L. Bagula, Apr 27 2008
Sum_{k=0..n} T(n,k)*x^k = A152163(n), A000007(n), A000045(n+1), A026597(n), A122994(n+1), A158608(n), A122995(n+1), A158797(n), A122996(n+1), A158798(n), A158609(n) for x = -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 respectively. - Philippe Deléham, Jun 12 2009
G.f.: (1+(y-1)*x)/(1-x-y^2*x^2). - Philippe Deléham, Mar 09 2012
T(n,k) = T(n-1,k) + T(n-2,k-2), T(0,0) = 1, T(1,0) = 0, T(1,1) = 1, T(n,k) = 0 if k < 0 or if k > n. - Philippe Deléham, Mar 09 2012

Extensions

New name from Peter Luschny, Mar 09 2020

A226517 Number of (19,14)-reverse multiples with n digits.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 2, 1, 2, 1, 3, 2, 4, 3, 6, 4, 8, 5, 11, 7, 15, 10, 21, 14, 29, 19, 40, 26, 55, 36, 76, 50, 105, 69, 145, 95, 200, 131, 276, 181, 381, 250, 526, 345, 726, 476, 1002, 657, 1383, 907, 1909, 1252, 2635, 1728, 3637, 2385, 5020, 3292, 6929, 4544, 9564, 6272, 13201, 8657, 18221
Offset: 0

Views

Author

N. J. A. Sloane, Jun 16 2013

Keywords

Comments

Comment from Emeric Deutsch, Aug 21 2016 (Start):
Given an increasing sequence of positive integers S = {a0, a1, a2, ... }, let
F(x) = x^{a0} + x^{a1} + x^{a2} + ... .
Then the g. f. for the number of palindromic compositions of n with parts in S is (see Hoggatt and Bicknell, Fibonacci Quarterly, 13(4), 1975, 350 - 356):
(1 + F(x))/(1 - F(x^2))
Playing with this, I have found easily that
1. number of palindromic compositions of n into {3,4,5,...} = A226916(n+4);
2. number of palindromic compositions of n into {1,4,7,10,13,...} = A226916(n+6);
3. number of palindromic compositions of n into {1,4} = A226517(n+10);
4. number of palindromic compositions of n into {1,5} = A226516(n+11).
(End)

Crossrefs

Programs

  • Maple
    f:=proc(n) option remember;
    if
    n <= 5 then 0
    elif n=6 then 1
    elif n <= 9 then 0
    elif n <= 11 then 1
    else f(n-2)+f(n-8)
    fi;
    end;
    [seq(f(n),n=0..120)];
  • Mathematica
    CoefficientList[Series[x^6 (1 - x^2 + x^4 + x^5) / (1 - x^2 - x^8), {x, 0, 80}], x] (* Vincenzo Librandi, Jun 18 2013 *)
    LinearRecurrence[{0,1,0,0,0,0,0,1},{0,0,0,0,0,0,1,0,0,0,1,1},80] (* Harvey P. Dale, Aug 23 2019 *)

Formula

G.f.: x^6*(1+x)*(1-x+x^4)/(1-x^2-x^8).
a(n) = a(n-2) + a(n-8) for n>11, with initial values a(0)-a(11) = 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1. [Bruno Berselli, Jun 17 2013]
a(2n+1)=A003269(n-4). a(2n)=A103632(n-3). - R. J. Mathar, Dec 13 2022

A275446 Triangle read by rows: T(n,k) is the number of compositions of n with parts in {2,1,3,5,7,9,...} and having asymmetry degree equal to k (n>=0; 0<=k<=floor(n/3)).

Original entry on oeis.org

1, 1, 2, 2, 2, 3, 4, 4, 10, 6, 16, 4, 8, 30, 12, 11, 48, 36, 15, 82, 76, 8, 21, 128, 164, 32, 29, 204, 312, 112, 40, 312, 596, 288, 16, 55, 482, 1064, 704, 80, 76, 728, 1884, 1536, 320, 105, 1100, 3212, 3248, 960, 32, 145, 1640, 5428, 6464, 2624, 192
Offset: 0

Views

Author

Emeric Deutsch, Aug 17 2016

Keywords

Comments

The asymmetry degree of a finite sequence of numbers is defined to be the number of pairs of symmetrically positioned distinct entries. Example: the asymmetry degree of (2,7,6,4,5,7,3) is 2, counting the pairs (2,3) and (6,5).
number of entries in row n is 1+floor(n/3).
Sum of entries in row n is A052535(n).
T(n,0) = A103632(n+2).
Sum_{k>=0} k*T(n,k) = A275447(n).

Examples

			Row 4 is [3,4] because the compositions of 4 with parts in {2,1,3,5,7,...} are 22, 31, 13, 211, 121, 112, and 1111, having asymmetry degrees 0, 1, 1, 1, 0, 1, and 0, respectively.
Triangle starts:
  1;
  1;
  2;
  2,2;
  3,4;
  4,10;
  6,16,4.
		

References

  • S. Heubach and T. Mansour, Combinatorics of Compositions and Words, CRC Press, 2010.

Crossrefs

Programs

  • Maple
    G := (1-z^4)/(1-z-z^2+(1-2*t)*z^3-z^4+z^6): Gser := simplify(series(G, z = 0, 30)): for n from 0 to 25 do P[n] := sort(coeff(Gser, z, n)) end do: for n from 0 to 25 do seq(coeff(P[n], t, j), j = 0 .. degree(P[n])) end do; # yields sequence in triangular form
  • Mathematica
    Table[BinCounts[#, {0, 1 + Floor[n/3], 1}] &@ Map[Total, Map[Map[Boole[# >= 1] &, BitXor[Take[# - 1, Ceiling[Length[#]/2]], Reverse@ Take[# - 1, -Ceiling[Length[#]/2]]]] &, Flatten[Map[Permutations, DeleteCases[ IntegerPartitions@ n, {_, a_, _} /; And[EvenQ@ a, a != 2]]], 1]]], {n, 0, 16}] // Flatten (* Michael De Vlieger, Aug 17 2016 *)

Formula

G.f.: G(t,z) = (1-z^4)/(1-z-z^2+(1-2*t)*z^3-z^4+z^6). In the more general situation of compositions into a[1]=1} z^(a[j]), we have G(t,z) = (1 + F(z))/(1 - F(z^2) - t*(F(z)^2 - F(z^2))). In particular, for t=0 we obtain Theorem 1.2 of the Hoggatt et al. reference.
Showing 1-3 of 3 results.