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.

Previous Showing 11-20 of 46 results. Next

A106195 Riordan array (1/(1-2*x), x*(1-x)/(1-2*x)).

Original entry on oeis.org

1, 2, 1, 4, 3, 1, 8, 8, 4, 1, 16, 20, 13, 5, 1, 32, 48, 38, 19, 6, 1, 64, 112, 104, 63, 26, 7, 1, 128, 256, 272, 192, 96, 34, 8, 1, 256, 576, 688, 552, 321, 138, 43, 9, 1, 512, 1280, 1696, 1520, 1002, 501, 190, 53, 10, 1, 1024, 2816, 4096, 4048, 2972, 1683, 743, 253, 64, 11
Offset: 0

Views

Author

Gary W. Adamson, Apr 24 2005; Paul Barry, May 21 2006

Keywords

Comments

Extract antidiagonals from the product P * A, where P = the infinite lower triangular Pascal's triangle matrix; and A = the Pascal's triangle array:
1, 1, 1, 1, ...
1, 2, 3, 4, ...
1, 3, 6, 10, ...
1, 4, 10, 20, ...
...
Row sums are Fibonacci(2n+2). Diagonal sums are A006054(n+2). Row sums of inverse are A105523. Product of Pascal triangle A007318 and A046854.
A106195 with an appended column of ones = A055587. Alternatively, k-th column (k=0, 1, 2) is the binomial transform of bin(n, k).
T(n,k) is the number of ideals in the fence Z(2n) having k elements of rank 1. - Emanuele Munarini, Mar 22 2011
Subtriangle of the triangle given by (0, 2, 0, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (1, 0, -1/2, 1/2, 0, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938. - Philippe Deléham, Mar 22 2012

Examples

			Triangle begins
   1;
   2,   1;
   4,   3,   1;
   8,   8,   4,  1;
  16,  20,  13,  5,  1;
  32,  48,  38, 19,  6, 1;
  64, 112, 104, 63, 26, 7, 1;
(0, 2, 0, 0, 0, ...) DELTA (1, 0, -1/2, 1/2, 0, 0, ...) begins :
  1;
  0,  1;
  0,  2,   1;
  0,  4,   3,   1;
  0,  8,   8,   4,  1;
  0, 16,  20,  13,  5,  1;
  0, 32,  48,  38, 19,  6, 1;
  0, 64, 112, 104, 63, 26, 7, 1. - _Philippe Deléham_, Mar 22 2012
		

Crossrefs

Column 0 = 1, 2, 4...; (binomial transform of 1, 1, 1...); column 1 = 1, 3, 8, 20...(binomial transform of 1, 2, 3...); column 2: 1, 4, 13, 38...= binomial transform of bin(n, 2): 1, 3, 6...

Programs

  • Haskell
    a106195 n k = a106195_tabl !! n !! k
    a106195_row n = a106195_tabl !! n
    a106195_tabl = [1] : [2, 1] : f [1] [2, 1] where
       f us vs = ws : f vs ws where
         ws = zipWith (-) (zipWith (+) ([0] ++ vs) (map (* 2) vs ++ [0]))
                          ([0] ++ us ++ [0])
    -- Reinhard Zumkeller, Dec 16 2013
    
  • Magma
    [ (&+[Binomial(n-k, n-j)*Binomial(j, k): j in [0..n]]): k in [0..n], n in [0..10]]; // G. C. Greubel, Mar 15 2020
    
  • Maple
    T := (n, k) -> hypergeom([-n+k, k+1],[1],-1):
    seq(lprint(seq(simplify(T(n, k)), k=0..n)), n=0..7); # Peter Luschny, May 20 2015
  • Mathematica
    u[1, x_] := 1; v[1, x_] := 1; z = 16;
    u[n_, x_] := u[n - 1, x] + v[n - 1, x]
    v[n_, x_] := u[n - 1, x] + (x + 1) v[n - 1, x]
    Table[Factor[u[n, x]], {n, 1, z}]
    Table[Factor[v[n, x]], {n, 1, z}]
    cu = Table[CoefficientList[u[n, x], x], {n, 1, z}];
    TableForm[cu]
    Flatten[%]  (* A207605 *)
    Table[Expand[v[n, x]], {n, 1, z}]
    cv = Table[CoefficientList[v[n, x], x], {n, 1, z}];
    TableForm[cv]
    Flatten[%]  (* A106195 *)
    (* Clark Kimberling, Feb 19 2012 *)
    Table[Hypergeometric2F1[-n+k, k+1, 1, -1], {n, 0, 12}, {k, 0, n}]//Flatten (* G. C. Greubel, Mar 15 2020 *)
  • Maxima
    create_list(sum(binomial(i,k)*binomial(n-k,n-i),i,0,n),n,0,8,k,0,n); /* Emanuele Munarini, Mar 22 2011 */
    
  • Python
    from sympy import Poly, symbols
    x = symbols('x')
    def u(n, x): return 1 if n==1 else u(n - 1, x) + v(n - 1, x)
    def v(n, x): return 1 if n==1 else u(n - 1, x) + (x + 1)*v(n - 1, x)
    def a(n): return Poly(v(n, x), x).all_coeffs()[::-1]
    for n in range(1, 13): print(a(n)) # Indranil Ghosh, May 28 2017
    
  • Python
    from mpmath import hyp2f1, nprint
    def T(n, k): return hyp2f1(k - n, k + 1, 1, -1)
    for n in range(13): nprint([int(T(n, k)) for k in range(n + 1)]) # Indranil Ghosh, May 28 2017, after formula from Peter Luschny
    
  • Sage
    [[sum(binomial(n-k,n-j)*binomial(j,k) for j in (0..n)) for k in (0..n)] for n in (0..10)] # G. C. Greubel, Mar 15 2020

Formula

T(n,k) = Sum_{j=0..n} C(n-k,n-j)*C(j,k).
From Emanuele Munarini, Mar 22 2011: (Start)
T(n,k) = Sum_{i=0..n-k} C(k,i)*C(n-k,i)*2^(n-k-i).
T(n,k) = Sum_{i=0..n-k} C(k,i)*C(n-i,k)*(-1)^i*2^(n-k-i).
Recurrence: T(n+2,k+1) = 2*T(n+1,k+1)+T(n+1,k)-T(n,k). (End)
From Clark Kimberling, Feb 19 2012: (Start)
Define u(n,x) = u(n-1,x)+v(n-1,x), v(n,x) = u(n-1,x)+(x+1)*v(n-1,x),
where u(1,x)=1, v(1,x)=1. Then v matches A106195 and u matches A207605. (End)
T(n,k) = 2*T(n-1,k) + T(n-1,k-1) - T(n-2,k-1). - Philippe Deléham, Mar 22 2012
T(n+k,k) is the coefficient of x^n y^k in 1/(1-2x-y+xy). - Ira M. Gessel, Oct 30 2012
T(n, k) = A208341(n+1,n-k+1), k = 0..n. - Reinhard Zumkeller, Dec 16 2013
T(n, k) = hypergeometric_2F1(-n+k, k+1, 1 , -1). - Peter Luschny, May 20 2015
G.f. 1/(1-2*x+x^2*y-x*y). - R. J. Mathar, Aug 11 2015
Sum_{k=0..n} T(n, k) = Fibonacci(2*n+2) = A088305(n+1). - G. C. Greubel, Mar 15 2020

Extensions

Edited by N. J. A. Sloane, Apr 09 2007, merging two sequences submitted independently by Gary W. Adamson and Paul Barry

A032287 "DIK" (bracelet, indistinct, unlabeled) transform of 1,2,3,4,...

Original entry on oeis.org

1, 3, 6, 13, 24, 51, 97, 207, 428, 946, 2088, 4831, 11209, 26717, 64058, 155725, 380400, 936575, 2314105, 5744700, 14300416, 35708268, 89359536, 224121973, 563126689, 1417378191, 3572884062, 9019324297, 22797540648
Offset: 1

Views

Author

Keywords

Comments

From Petros Hadjicostas, Jun 21 2019: (Start)
Under Bower's transforms, the input sequence c = (c(m): m >= 1) describes how each part of size m in a composition is colored. In a composition (ordered partition) of n >= 1, a part of size m is assumed to be colored with one of c(m) colors.
Under the DIK transform, we are dealing with "dihedral compositions" of n >= 1. These are equivalence classes of ordered partitions of n such that two such ordered partitions are equivalent if one can be obtained from the other by rotation or reflection.
If the input sequence is c = (c(m): m >= 1), denote the output sequence under the DIK transform by b = (b(n): n >= 1); i.e., b(n) = (DIK c)(n) for n >= 1. If C(x) = Sum_{m >= 1} c(m)*x^m is the g.f. of the input sequence c, then the g.f. of b = DIK c is Sum_{n >= 1} b(n)*x^n = -(1/2) * Sum_{d >= 1} (phi(d)/d) * log(1 - C(x^d)) + (1 + C(x))^2/(4 * (1 - C(x^2))) - (1/4).
For the current sequence (a(n): n >= 1), the input sequence is c(m) = m for all m >= 1. That is, we are dealing with the so-called "m-color dihedral compositions". Here, a(n) is the number of dihedral compositions of n where each part of size m may be colored with one of m colors. For the linear and cyclic versions of such m-color compositions, see Agarwal (2000), Gibson (2017), and Gibson et al. (2018).
Since C(x) = x/(1 - x)^2, we have Sum_{n >= 1} a(n) * x^n = (1/2) * Sum_{d >= 1} (phi(d)/d) * log((1 - x^d)^2 / (1 - 3*x^d + x^(2*d))) + (1/2) * x * (1 + x - 2*x^2 + x^3 + x^4)/((1 - x)^2 * (1 + x - x^2) * (1 - x - x^2)), which is the g.f. given by Andrew Howroyd in the PARI program below.
Note that -Sum_{d >= 1} (phi(d)/d) * log (1 - C(x^d)) = Sum_{d >= 1} (phi(d)/d) * log((1 - x^d)^2 / (1 - 3*x^d + x^(2*d))) is the g.f. of the "m-color cyclic compositions" that appear in Gibson (2017) and Gibson et al. (2018). See sequence A032198, which is the CIK transform of sequence (c(m): m >= 1) = (m: m >= 1).
(End)

Crossrefs

Programs

  • Maple
    DIK := proc(L::list)
        local  x,cidx,ncyc,d,gd,g,g2,n ;
        n := nops(L) ;
        g := add(op(i,L)*x^i,i=1..n) ;
        # wrap into the cycle index of the cyclic group C_n
        cidx := 0 ;
        for ncyc from 1 to n do
            for d in numtheory[divisors](ncyc) do
                gd := subs(x=x^d,g) ;
                cidx := cidx+1/ncyc*numtheory[phi](d)*gd^(ncyc/d) ;
            end do:
        end do:
        # cycle index is half of th eone for the cyclic group plus two
        # different branches or D_n with even or odd n
        cidx := cidx/2 ;
        g2 := subs(x=x^2,g) ;
        for ncyc from 1 to n do
            if type(ncyc,'odd') then
                cidx := cidx+ g*g2^((ncyc-1)/2)/2 ;
            else
                cidx := cidx+ (g^2*g2^((ncyc-2)/2) + g2^(ncyc/2))/4 ;
            end if;
        end do:
        taylor(cidx,x=0,nops(L)) ;
        gfun[seriestolist](%) ;
    end proc:
    A032287_list := proc(n)
            local ele ;
            ele := [seq(i,i=1..40)] ;
            DIK(ele) ;
    end proc:
    A032287_list(50) ; # R. J. Mathar, Feb 14 2025
  • Mathematica
    seq[n_] := x(1 + x - 2 x^2 + x^3 + x^4)/((1 - x)^2 (1 - x - x^2)(1 + x - x^2)) + Sum[EulerPhi[d]/d Log[(1 - x^d)^2/(1 - 3 x^d + x^(2d)) + O[x]^(n+1)], {d, 1, n}] // CoefficientList[#, x]& // Rest // #/2&;
    seq[30] (* Jean-François Alcover, Sep 17 2019, from PARI *)
  • PARI
    seq(n)={Vec(x*(1 + x - 2*x^2 + x^3 + x^4)/((1 - x)^2*(1 - x - x^2)*(1 + x - x^2)) + sum(d=1, n, eulerphi(d)/d*log((1 - x^d)^2/(1 - 3*x^d + x^(2*d)) + O(x*x^n))))/2} \\ Andrew Howroyd, Jun 20 2018

Formula

From Petros Hadjicostas, Jun 21 2019: (Start)
a(n) = ( F(n+4) + (-1)^n * F(n-4) - 2 * (n + 1) + (1/n) * Sum_{d|n} phi(n/d) * L(2*d) )/2 for n >= 4, where F(n) = A000045(n) and L(n) = A000032(n) are the usual n-th Fibonacci and n-th Lucas numbers, respectively.
a(n) = (A032198(n) + A308747(n))/2 for n >= 1.
G.f.: (1/2) * Sum_{d >= 1} (phi(d)/d) * log((1 - x^d)^2 / (1 - 3*x^d + x^(2*d))) + (1/2) * x * (1 + x - 2*x^2 + x^3 + x^4)/((1 - x)^2 * (1 + x - x^2) * (1 - x - x^2)).
(End)

A329156 Expansion of Product_{k>=1} 1 / (1 - Sum_{j>=1} j * x^(k*j)).

Original entry on oeis.org

1, 1, 4, 10, 29, 72, 200, 510, 1364, 3546, 9348, 24400, 64090, 167562, 439200, 1149360, 3010349, 7879832, 20633304, 54014950, 141422328, 370239300, 969323000, 2537696160, 6643839400, 17393731933, 45537549048, 119218684970, 312119004990, 817137724392, 2139295489200, 5600747143950
Offset: 0

Views

Author

Ilya Gutkovskiy, Nov 06 2019

Keywords

Comments

Euler transform of A032198.

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i>1, b(n, i-1), 0)-
          add(b(n-i*j, min(n-i*j, i-1))*j, j=`if`(i=1, n, 1..n/i)))
        end:
    a:= proc(n) option remember; `if`(n=0, 1,
          -add(a(j)*b(n-j$2), j=0..n-1))
        end:
    seq(a(n), n=0..31);  # Alois P. Heinz, Jul 25 2025
  • Mathematica
    nmax = 31; CoefficientList[Series[Product[1/(1 - Sum[j x^(k j), {j, 1, nmax}]), {k, 1, nmax}], {x, 0, nmax}], x]
    nmax = 31; CoefficientList[Series[Product[1/(1 - x^k/(1 - x^k)^2), {k, 1, nmax}], {x, 0, nmax}], x]

Formula

G.f.: Product_{k>=1} 1 / (1 - x^k / (1 - x^k)^2).
G.f.: exp(Sum_{k>=1} ( Sum_{d|k} 1 / (d * (1 - x^(k/d))^(2*d)) ) * x^k).
G.f.: Product_{k>=1} 1 / (1 - x^k)^A032198(k).
G.f.: A(x) = Product_{k>=1} B(x^k), where B(x) = g.f. of A088305.
a(n) ~ phi^(2*n-1), where phi = A001622 = (1+sqrt(5))/2 is the golden ratio. - Vaclav Kotesovec, Nov 07 2019
a(2^k) = A002878(2^k-1) for all nonnegative integers k. Follows from Cor. 4.5 on page 11 of Kassel-Reutenauer paper. - Michael De Vlieger, Jul 28 2025

A093960 a(1) = 1, a(2) = 2, a(n+1) = n*a(1) + (n-1)*a(2) + ... + (n-r)*a(r+1) + ... + a(n).

Original entry on oeis.org

1, 2, 4, 11, 29, 76, 199, 521, 1364, 3571, 9349, 24476, 64079, 167761, 439204, 1149851, 3010349, 7881196, 20633239, 54018521, 141422324, 370248451, 969323029, 2537720636, 6643838879, 17393796001, 45537549124, 119218851371, 312119004989, 817138163596
Offset: 1

Views

Author

Amarnath Murthy, May 22 2004

Keywords

Comments

a(1) = a(2) = 1 gives A088305, i.e., Fibonacci numbers with even indices. This can be called 'fake Fibonacci sequence'. 4 = 3+1, 11 = 8+3, 29 = 21+8, 76 = 55+21, etc. a(n) = F(2n-2) + F(2n-4).
Except for the initial terms, this is the same as the bisection of the Lucas sequence (A002878). - Franklin T. Adams-Watters, Jul 17 2006

Crossrefs

Programs

  • Magma
    [1,2] cat [Lucas(2*n-3): n in [3..30]]; // G. C. Greubel, Dec 30 2021
    
  • Maple
    a[1]:=1: a[2]:=2: for n from 2 to 33 do a[n+1]:=sum((n-r)*a[r+1],r=0..n-1) od: seq(a[n],n=1..33); # Emeric Deutsch, Aug 01 2005
    A093960List := proc(m) local A, P, n; A := [1,2]; P := [1];
    for n from 1 to m - 2 do P := ListTools:-PartialSums([op(A), P[-1]]);
    A := [op(A), P[-1]] od; A end: A093960List(30); # Peter Luschny, Mar 24 2022
  • Mathematica
    Print[1]; Print[2]; Do[Print[Fibonacci[2*n - 2] + Fibonacci[2*n - 4]], {n, 3, 20}] (* Ryan Propper, Jun 19 2005 *)
    LinearRecurrence[{3,-1},{1,2,4,11},30] (* Harvey P. Dale, Nov 17 2018 *)
  • PARI
    Vec(x*(x-1)^2*(x+1)/(x^2-3*x+1) + O(x^100)) \\ Colin Barker, Mar 26 2015
    
  • Sage
    [2^(2-n)*bool(n<3) + lucas_number2(2*n-3, 1, -1) for n in (1..30)] # G. C. Greubel, Dec 30 2021

Formula

a(n) = F(2*n-2) + F(2*n-4), where F(k) is k-th Fibonacci number, n > 2.
a(n) = 3*a(n-1) - a(n-2) for n>4. - Colin Barker, Mar 26 2015
G.f.: x*(1-x)^2*(1+x) / (1-3*x+x^2). - Colin Barker, Mar 26 2015
a(n) = 2^(2-n)*[n<3] + LucasL(2*n-3). - G. C. Greubel, Dec 30 2021

Extensions

More terms from Ryan Propper, Jun 19 2005
More terms from Emeric Deutsch, Aug 01 2005

A273719 Triangle read by rows: T(n,k) is the number of bargraphs of semiperimeter n having k horizontal steps in the peaks (n>=2, k>=1).

Original entry on oeis.org

1, 1, 1, 3, 1, 1, 8, 3, 1, 1, 21, 9, 3, 1, 1, 55, 27, 10, 3, 1, 1, 144, 82, 33, 11, 3, 1, 1, 377, 251, 110, 39, 12, 3, 1, 1, 987, 770, 368, 139, 45, 13, 3, 1, 1, 2584, 2358, 1229, 495, 169, 51, 14, 3, 1, 1, 6765, 7191, 4085, 1755, 632, 200, 57, 15, 3, 1, 1
Offset: 2

Views

Author

Emeric Deutsch, Jun 01 2016

Keywords

Comments

Number of entries in row n is n-1.
Sum of entries in row n = A082582(n).
T(n,1) = A088305(n-2) = F(2n-4) where F(n) are the Fibonacci numbers A000045.
Sum(k*T(n,k), k>=0) = A273720(n).

Examples

			Row 4 is 3,1,1 because the 5 (=A082582(4)) bargraphs of semiperimeter 4 correspond to the compositions [1,1,1],[1,2],[2,1],[2,2],[3] and the corresponding drawings show that they have 3,1,1,2,1 horizontal steps in their peaks.
Triangle starts
1;
1,1;
3,1,1;
8,3,1,1;
21,9,3,1,1
		

Crossrefs

Programs

  • Maple
    eq := G = z^2*s+z*(G-z^2*s/(1-z*s)+z^2*s^2/(1-z*s))+z*G+z^2*G+z*G*(G-z^2*s/(1-z*s)+z^2/(1-z)): G := RootOf(eq, G): Gser := simplify(series(G, z = 0, 20)): for n from 2 to 16 do P[n] := sort(expand(coeff(Gser, z, n))) end do: for n from 2 to 16 do seq(coeff(P[n], s, j), j = 1 .. n-1) end do; # yields sequence in triangular form
    # second Maple program:
    b:= proc(n, y, t, h) option remember; expand(
          `if`(n=0, (1-t)*z^h, `if`(t<0, 0, b(n-1, y+1, 1, 0))+
          `if`(t>0 or y<2, 0, b(n, y-1, -1, 0)*z^h)+
          `if`(y<1, 0, b(n-1, y, 0, `if`(max(h, t)>0, h+1, 0)))))
        end:
    T:= n-> (p-> seq(coeff(p, z, i), i=1..n-1))(b(n, 0$3)):
    seq(T(n), n=2..16);  # Alois P. Heinz, Jun 06 2016
  • Mathematica
    b[n_, y_, t_, h_] := b[n, y, t, h] = Expand[If[n == 0, (1 - t)*z^h, If[t < 0, 0, b[n - 1, y + 1, 1, 0]] + If[t > 0 || y < 2, 0, b[n, y - 1, -1, 0]*z^h] + If[y < 1, 0, b[n - 1, y, 0, If[Max[h, t] > 0, h + 1, 0]]]]]; T[n_] := Function [p, Table[Coefficient[p, z, i], {i, 1, n - 1}]][b[n, 0, 0, 0]];  Table[T[n], {n, 2, 16}] // Flatten (* Jean-François Alcover, Nov 29 2016 after Alois P. Heinz *)

Formula

G.f.: G(s,z), where s marks number of horizontal steps in the peaks and z marks semiperimeter, satisfies the equation given in the Maple program.
G.f.: G(w,z), where w marks number of horizontal steps in the peaks and z marks semiperimeter, satisfies eq. (7) of the Blecher et al. reference, where one has to set x = z and y = z.
The trivariate g.f. G = G(t,s,z), where t marks number of peaks, s marks number of horizontal steps in the peaks, and z marks semiperimeter, satisfies z*(1-z)*(1-s*z)*G^2-(1-3*z-s*z+z^2+3*s*z^2-s*z^3+t*s*z^3-t*s*z^4)*G + t*s*z^2*(1-z)^2 = 0.

A308723 Total number of parts in all m-cyclic compositions of n (where each part of size m can be colored with one of m colors).

Original entry on oeis.org

1, 4, 10, 26, 59, 160, 383, 1018, 2606, 6836, 17721, 46580, 121405, 318212, 832190, 2179358, 5702903, 14933264, 39088187, 102341134, 267915110, 701426484, 1836311925, 4807575700, 12586269265, 32951401540, 86267576506, 225851752438, 591286729907, 1548009602240, 4052739537911
Offset: 1

Views

Author

Petros Hadjicostas, Jun 19 2019

Keywords

Comments

Unmarked cyclic compositions (originally studied by Sommerville (1909)) are equivalence classes of ordered partitions of n such that two such partitions are equivalent iff one can be obtained from the other by rotation.
The so-called "m-cyclic compositions" of n are cyclic compositions of n such that each part of size m can be colored with any one of m colors. (Colored ordered partitions were originally introduced by Agarwal (2000). The theory of Bower about transforms in the web link below is a generalization of this idea.)
If b(n) is the number of m-colored compositions of n, then (b(n): n >= 1) is the CIK transform of the sequence 1, 2, 3, ... and it has the g.f. -Sum_{n >= 1} (phi(s)/s) * log(1 - C(x^s)), where C(x) = x + 2*x^2 + 3*x^3 + 4*x^4 + ... = x/(1-x)^2. (See Bower's link about transforms for information about the CIK transform.) Thus, b(n) = A032198(n) for n >= 1, and its g.f. and formula were also derived in Gibson (2017) and Gibson et al. (2018).
In general, if c = (c(m): m >= 1) is the input sequence and (b_k(n): n >= 1) is the output sequence under the CIK[k] transform of c, then b_n = (CIK c)n = Sum{k = 1..n} (CIK[k] c)n = Sum{k = 1..n} b_k(n) for all n >= 1 (see Bower's web link on transforms).
The g.f. of (b_k(n): n >= 1) is Sum_{n >= 1} b_k(n)*x^k = (1/k)*Sum_{d|k} phi(d) * A(x^d)^(k/d). It follows that Sum_{n >= 1, k >= 1} b_k(n)*x^n*y^k = -Sum_{d >= 1} (phi(d)/d) * log(1 - y^d *A(x^d)) (with the understanding that b_k(n) = 0 for k > n).
For n >= 1, let d(n) = Sum_{k >= 1} k*b_k(n) = total number of parts of in all compositions of n under the CIK transform of c = (c(m): m >= 1). Thus, d(n) is the total number of parts in all cyclic compositions of n where each part of size m can be colored with c(m) colors.
To obtain the g.f. of (d(n): n >= 1) = (Sum_{k = 1..n} k*b_k(n): n >= 1), we differentiate the bivariate g.f. Sum_{n >= 1, k >= 1} b_k(n)*x^n*y^k w.r.t. y and set y = 1. We get Sum_{n >= 1} d(n)*x^n = Sum_{d >= 1} phi(d) * A(x^d)/(1 - A(x^d)).
In our case, A(x) = x/(1 - x)^2, so Sum_{n >= 1} d(n)*x^n = -Sum_{d >=1} phi(d) * x^d/(1 - 3*x^d + x^(2*d)), which is exactly the g.f. of the current sequence that was proved in Gibson (2017) and Gibson et al. (2018).

Examples

			We have a(1) = 1 because 1_1 is the only m-color cyclic composition of n = 1 and the total number of parts is 1.
We have a(2) = 4 because 2_1, 2_2, 1_1 + 1_1 are all the m-color cyclic compositions of 2 and the total number of parts is 1 + 1 + 2 = 4.
We have a(3) = 10 because 3_1, 3_2, 3_3, 1_1 + 2_1, 1_1 + 2_2, 1_1 + 1_1 + 1_1 are all the m-color cyclic compositions of n = 3 and the total number of parts is 1 + 1 + 1 + 2 + 2 + 3 = 10.
We have a(4) = 26 because 4_1, 4_2, 4_3, 4_4, 1_1 + 3_1, 1_1 + 3_2, 1_1 + 3_3, 2_1 + 2_1, 2_1 + 2_2, 2_2 + 2_2, 1_1 + 2_1 + 1_1, 1_1 + 2_2 + 1_1, 1_1 + 1_1 + 1_1 + 1_1 are all the m-color cyclic compositions of n = 4 and the total number of parts is 1 + 1 + 1 + 1 + 2 + 2 + 2 + 2 + 2 + 2 + 3 + 3 + 4 = 26.
		

Crossrefs

Formula

a(n) = Sum_{s|n} phi(s)*A088305(n/s) = Sum_{s|n} phi(n/s)*Fibonacci(2*s) for n >= 1. (See Theorem 3.1 in Gibson et al. (2018).)
a(n) ~ (2/(3 - sqrt(5)))^n/sqrt(5) for large n. (See p. 3210 in Gibson et al. (2018).)
G.f.: Sum_{s >= 1} phi(s) * x^s/(1 - 3*x^s + x^(2*s)). (See Eq. (1.2) in Gibson et al. (2018).)

A382991 Number of compositions of n such that any part 1 at position k can be k different colors.

Original entry on oeis.org

1, 1, 3, 10, 40, 193, 1110, 7473, 57821, 505945, 4940354, 53248874, 627848885, 8037734930, 111017325473, 1645384681765, 26044845197881, 438499277779636, 7824114643731522, 147476551001255125, 2928074880767254238, 61078483577649288463, 1335438738400978511877
Offset: 0

Views

Author

John Tyler Rascoe, Apr 11 2025

Keywords

Examples

			a(3) = 10 counts: (3), (2,1_a), (2,1_b), (1_a,2), (1_a,1_a,1_a), (1_a,1_a,1_b), (1_a,1_a,1_c), (1_a,1_b,1_a), (1_a,1_b,1_b), (1_a,1_b,1_c).
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1,
          add(b(n-j, i+1)*`if`(j=1, i, 1), j=1..n))
        end:
    a:= n-> b(n, 1):
    seq(a(n), n=0..22);  # Alois P. Heinz, Apr 23 2025
  • PARI
    A_x(N) = {my(x='x+O('x^N)); Vec(1+ sum(i=1,N, prod(j=1,i, j*x + x^2/(1-x))))}
    A_x(30)

Formula

G.f.: 1 + Sum_{i>0} Product_{j=1..i} ( j*x + x^2/(1-x) ).

A052567 E.g.f.: (1-x)^2/(1-3*x+x^2).

Original entry on oeis.org

1, 1, 6, 48, 504, 6600, 103680, 1900080, 39795840, 937681920, 24548832000, 706966444800, 22210346188800, 755916735974400, 27706219904563200, 1088037381150720000, 45576301518139392000, 2028445209752113152000, 95589693062063456256000, 4754884242802394308608000
Offset: 0

Views

Author

encyclopedia(AT)pommard.inria.fr, Jan 25 2000

Keywords

Crossrefs

Programs

  • Maple
    spec := [S,{S=Sequence(Prod(Z,Sequence(Z),Sequence(Z)))},labeled]: seq(combstruct[count](spec,size=n), n=0..20);
  • Mathematica
    With[{nn=20},CoefficientList[Series[(1-x)^2/(1-3x+x^2),{x,0,nn}],x] Range[0,nn]!] (* Harvey P. Dale, Jul 06 2021 *)

Formula

E.g.f.: (-1+x)^2/(1-3*x+x^2).
Recurrence: {a(1)=1, a(0)=1, a(2)=6, (n^2+3*n+2)*a(n)+(-6-3*n)*a(n+1)+a(n+2)=0}
Sum(-1/5*(3*_alpha-2)*_alpha^(-1-n), _alpha=RootOf(_Z^2-3*_Z+1))*n!
a(n) = n! * Fibonacci(2*n) for n > 0. - Ilya Gutkovskiy, Jul 17 2021

A242551 Number of n-length words on infinite alphabet {1,2,...} such that the maximal runs of consecutive equal integers have lengths that are at least as great as the integer.

Original entry on oeis.org

1, 1, 2, 5, 11, 24, 53, 118, 261, 577, 1276, 2823, 6246, 13819, 30572, 67635, 149630, 331029, 732344, 1620187, 3584388, 7929844, 17543415, 38811782, 85864379, 189960150, 420254129, 929739922, 2056889538, 4550514023, 10067228909, 22272010878, 49272989918, 109008007822, 241161451563, 533528195645
Offset: 0

Views

Author

Geoffrey Critzer, May 17 2014

Keywords

Comments

In other words, there is no restriction on the length of runs of 1's, the length of runs of 2's must be at least two, the length of runs of 3's must be at least three...
a(n) is the number of n-color integer compositions of n such that no adjacent parts are the same color. - John Tyler Rascoe, Jul 23 2024

Examples

			a(3)=5 because we have: 111, 122, 221, 222, 333.
a(4)=11 because we have:  1111, 1122, 1221, 1222, 2211, 2221, 2222, 3331, 1333, 3333, 4444.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, t) option remember; `if`(n=0, 1,
          `if`(t=0, 0, b(n-1, t)) +add(
          `if`(t=j, 0, b(n-j, j)), j=1..n))
        end:
    a:= n-> b(n, 0):
    seq(a(n), n=0..40);  # Alois P. Heinz, Oct 07 2015
  • Mathematica
    n=nn=35;CoefficientList[Series[1/(1-Sum[v[i]/(1+v[i])/.v[i]->z^i/(1-z),{i,1,n}]),{z,0,nn}],z]
  • PARI
    C_x(N)={my(x='x+O('x^N), h = 1/(1-sum(i=1,N, x^i/(1 - x + x^i)))); Vec(h)}
    C_x(40) \\ John Tyler Rascoe, Jul 23 2024

Formula

G.f.: 1/(1 - Sum_{i>0} x^i/(1 - x + x^i)). - John Tyler Rascoe, Jul 23 2024

A308747 Number of achiral m-color cyclic compositions of n (that is, number of cyclic compositions of n with reflection symmetry where each part of size m can be colored with one of m colors).

Original entry on oeis.org

1, 3, 6, 13, 23, 44, 73, 131, 210, 365, 575, 984, 1537, 2611, 4062, 6877, 10679, 18052, 28009, 47315, 73386, 123933, 192191, 324528, 503233, 849699, 1317558, 2224621, 3449495, 5824220, 9030985, 15248099, 23643522, 39920141, 61899647, 104512392, 162055489, 273617107
Offset: 1

Views

Author

Petros Hadjicostas, Jun 21 2019

Keywords

Comments

Cyclic compositions of a positive integer n are equivalence classes of ordered partitions of n such that two such partitions are equivalent if one can be obtained from the other by rotation. These were first studied by Sommerville (1909).
Symmetric cyclic compositions or circular palindromes or achiral cyclic compositions are those cyclic compositions that have at least one axis of symmetry. They were also studied by Sommerville (1909, pp. 301-304).
Let (c(m): m >= 1) be the input sequence and let b = (b(n): n >= 1) be the output sequence under the CPAL (circular palindrome) transform of c; that is, b(n) = (CPAC c)n for n >= 1. Hence, b(n) is the number of symmetric cyclic compositions of n where a part of size m can be colored with one of c(m) colors. If C(x) = Sum{m >= 1} c(m)*x^m is the g.f. of the input sequence c, then the g.f. of b = (CPAL c) is Sum_{n >= 1} b(n)*x^n = (1 + C(x))^2/(2 * (1 - C(x^2))) - (1/2).
For the current sequence, the input sequence is c(m) = m for m >= 1, and we are dealing with the so-called "m-color" compositions. m-color linear compositions were studied by Agarwal (2000), whereas m-color cyclic compositions were studied by Gibson (2017) and Gibson et al. (2018).
Thus, for the current sequence, a(n) is the number of symmetric (achiral) cyclic compositions of n where a part of size m may be colored with one of m colors (for each m >= 1).
The function A(x) = (exp(Pi*(x + 1)*I)*phi^(-x - 4) - exp(2*I*Pi*x)*phi^(4 - x) + exp(Pi*x*I)*phi^(x - 4) + phi^(x + 4))/sqrt(5) - 2*x, where phi is the golden ratio, shows that the sequence can be easily extended to all integers. - Peter Luschny, Aug 09 2020

Examples

			We have a(1) = 1 because we only have one symmetric cyclic composition of n = 1, namely 1_1 (and a part of size 1 can be colored with only one color).
We have a(2) = 3 because we have the following colored achiral cyclic compositions of n = 2: 2_1, 2_2, 1_1 + 1_1.
We have a(3) = 6 because we have the following colored achiral cyclic compositions of n = 3: 3_1, 3_2, 3_3, 1_1 + 2_1, 1_1 + 2_2, 1_1 + 1_1 + 1_1.
We have a(4) = 13 because we have the following colored achiral cyclic compositions of n = 4: 4_1, 4_2, 4_3, 4_4, 1_1 + 3_1, 1_1 + 3_2, 1_1 + 3_3, 2_1 + 2_1, 2_1 + 2_2, 2_2 + 2_2, 1_1 + 2_1 + 1_1, 1_1 + 2_2 + 1_1, 1_1 + 1_1 + 1_1 + 1_1.
We have a(5) = 23 because we have the following colored achiral cyclic compositions of n = 5:
(i) with one part: 5_1, 5_2, 5_3, 5_4, 5_5;
(ii) with two parts: 1_1 + 4_1, 1_1 + 4_2, 1_1 + 4_3, 1_1 + 4_4, 2_1 + 3_1, 2_1 + 3_2, 2_1 + 3_3, 2_2 + 3_1, 2_2 + 3_2, 2_2 + 3_3;
(iii) with three parts: 1_1 + 3_1 + 1_1, 1_1 + 3_2 + 1_1, 1_1 + 3_3 + 1_1, 2_1 + 1_1 + 2_1, 2_2 + 1_1 + 2_2;
(iv) with four parts: 1_1 + 1_1 + 2_1 + 1_1, 1_1 + 1_1 + 2_2 + 1_1 (here, the axis of symmetry passes through one of the 1's and through 2);
(v) with five parts: 1_1 + 1_1 + 1_1 + 1_1 + 1_1.
		

Crossrefs

Formula

CPAL (circular palindrome) transform of 1, 2, 3, 4, ...
a(n) = 2*a(n - 1) + 2*a(n - 2) - 6*a(n - 3) + 2*a(n - 4) + 2*a(n - 5) - a(n - 6) for n >= 7 with a(1) = 1, a(2) = 3, a(3) = 6, a(4) = 13, a(5) = 23, and a(6) = 44.
a(n) = 3*a(n - 2) - a(n - 4) + 2*(n - 2) for n >= 5 with a(1) = 1, a(2) = 3, a(3) = 6, and a(4) = 13.
a(n) = Fib(n + 4) + (-1)^n * Fib(n - 4) - 2*n for n >= 4, where Fib(n) = A000045(n).
G.f.: x * (1 + x - 2*x^2 + x^3 + x^4)/((1 - x)^2 * (1 - x - x^2) * (1 + x - x^2)).
Previous Showing 11-20 of 46 results. Next