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

A238352 Irregular triangle T(n,k) read by rows: T(n,k) is the number of partitions p(1), p(2), ..., p(m) of n (as weakly ascending list of parts) with k parts p at position p (fixed points), n>=0, 0<=k<= (column index of last nonzero term in row n).

Original entry on oeis.org

1, 0, 1, 1, 1, 1, 1, 1, 1, 4, 2, 3, 2, 3, 7, 0, 1, 3, 7, 5, 4, 14, 4, 5, 19, 3, 3, 8, 24, 9, 0, 1, 9, 32, 11, 4, 12, 46, 15, 4, 13, 60, 21, 7, 17, 85, 28, 1, 4, 22, 109, 28, 16, 0, 1, 28, 140, 51, 7, 5, 34, 179, 57, 26, 1, 42, 239, 74, 25, 5, 48, 300, 107, 24
Offset: 0

Views

Author

Joerg Arndt and Alois P. Heinz, Feb 26 2014

Keywords

Comments

Row sums are A000041.
Column k=0 is A238394, row sums over columns k>=1 give A238395.
T(A000217(k),k) = 1,
T(A000217(k),k-1) = 0 for k in {1, 3, 4, 5, ... },
T(A000217(k)-1,k-1) = k-1 for k>1.

Examples

			Triangle starts:
00:   1;
01:   0,   1;
02:   1,   1;
03:   1,   1,   1;
04:   1,   4;
05:   2,   3,   2;
06:   3,   7,   0,  1;
07:   3,   7,   5;
08:   4,  14,   4;
09:   5,  19,   3,  3;
10:   8,  24,   9,  0,  1;
11:   9,  32,  11,  4;
12:  12,  46,  15,  4;
13:  13,  60,  21,  7;
14:  17,  85,  28,  1,  4;
15:  22, 109,  28, 16,  0, 1;
16:  28, 140,  51,  7,  5;
17:  34, 179,  57, 26,  1;
18:  42, 239,  74, 25,  5;
19:  48, 300, 107, 24, 11;
20:  59, 397, 122, 43,  1, 5;
21:  71, 495, 167, 37, 21, 0, 1;
...
The 11 partitions of 6 together with their number of fixed points are:
01:  [ 1 1 1 1 1 1 ]   1
02:  [ 1 1 1 1 2 ]   1
03:  [ 1 1 1 3 ]   1
04:  [ 1 1 2 2 ]   1
05:  [ 1 1 4 ]   1
06:  [ 1 2 3 ]   3
07:  [ 1 5 ]   1
08:  [ 2 2 2 ]   1
09:  [ 2 4 ]   0
10:  [ 3 3 ]   0
11:  [ 6 ]   0
There are 3 partitions with no fixed points, 7 with one, none with 2, and one with 3, giving row 6.
		

Crossrefs

Cf. A238349 (and A238350) for the same statistics for compositions.

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
          expand(b(n, i-1) +`if`(i>n, 0, (p-> add((c->c*x^j*
          `if`(j=i, z, 1))(coeff(p, x, j)), j=0..degree(p,x)))
          (x*b(n-i, i))))))
        end:
    T:= n-> (p->seq((q->add(coeff(q, x, j), j=0..degree(q, x)))
        (coeff(p, z, i)), i=0..degree(p, z)))(b(n$2)):
    seq(T(n), n=0..25);
  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0, 1, If[i<1, 0, Expand[b[n, i-1] + If[i>n, 0, Function[{p}, Sum[Function[{c}, c*x^j* If[j == i, z, 1]][Coefficient[p, x, j]], {j, 0, Exponent[p, x]}]] [x*b[n-i, i]]]]]]; T[n_] := Function[{p}, Table[ Function[{q},  Sum[Coefficient[q, x, j], {j, 0, Exponent[q, x]}]][Coefficient[p, z, i]], {i, 0, Exponent[p, z]}]][b[n, n]]; Table[T[n], {n, 0, 25}] // Flatten (* Jean-François Alcover, Feb 11 2015, after Maple *)

A238349 Triangle T(n,k) read by rows: T(n,k) is the number of compositions of n with k parts p at position p (fixed points), n>=0, 0<=k<=n.

Original entry on oeis.org

1, 0, 1, 1, 1, 0, 2, 1, 1, 0, 3, 4, 1, 0, 0, 6, 7, 3, 0, 0, 0, 11, 16, 4, 1, 0, 0, 0, 22, 29, 12, 1, 0, 0, 0, 0, 42, 60, 23, 3, 0, 0, 0, 0, 0, 82, 120, 47, 7, 0, 0, 0, 0, 0, 0, 161, 238, 100, 12, 1, 0, 0, 0, 0, 0, 0, 316, 479, 198, 30, 1, 0, 0, 0, 0, 0, 0, 0, 624, 956, 404, 61, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1235, 1910, 818, 126, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Joerg Arndt and Alois P. Heinz, Feb 25 2014

Keywords

Comments

T(n*(n+3)/2,n) = A227682(n).
From Vaclav Kotesovec, Sep 07 2014: (Start)
In general, column k is asymptotic to c(k) * 2^n. The constants c(k) numerically:
c(0) = 0.144394047543301210639449860964615390044455952420342... = A048651/2
c(1) = 0.231997216225445223894202367545783700531838988546098... = c(0)*A065442
c(2) = 0.104261929557371534733906196116707679501974368826074...
c(3) = 0.017956317806894073430249112172514186063327165575720...
c(4) = 0.001343254222922697613125145839110293324517874530073...
c(5) = 0.000046459767012163920051487037952792359225887287888...
c(6) = 0.000000768651747857094917953943327540619110335556499...
c(7) = 0.000000006200599904985793344094393321042983316604040...
c(8) = 0.000000000024656652167851516076173236693314090168122...
c(9) = 0.000000000000048633746319332356416193899916110113745...
c(10)= 0.000000000000000047750743608910618576944191079881479...
c(20)= 1.05217230403079700467566...*10^(-63)
For big k is c(k) ~ m * 2^(-k*(k+1)/2), where m = 1/(4*c(0)) = 1/(2*A048651) = 1.7313733097275318...
(End)

Examples

			Triangle starts:
00:  1,
01:  0, 1,
02:  1, 1, 0,
03:  2, 1, 1, 0,
04:  3, 4, 1, 0, 0,
05:  6, 7, 3, 0, 0, 0,
06:  11, 16, 4, 1, 0, 0, 0,
07:  22, 29, 12, 1, 0, 0, 0, 0,
08:  42, 60, 23, 3, 0, 0, 0, 0, 0,
09:  82, 120, 47, 7, 0, 0, 0, 0, 0, 0,
10:  161, 238, 100, 12, 1, 0, 0, 0, 0, 0, 0,
11:  316, 479, 198, 30, 1, 0, 0, 0, 0, 0, 0, 0,
12:  624, 956, 404, 61, 3, 0, 0, 0, 0, 0, 0, 0, 0,
13:  1235, 1910, 818, 126, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0,
14:  2449, 3817, 1652, 258, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
15:  4864, 7633, 3319, 537, 30, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
...
From _Gus Wiseman_, Apr 03 2022: (Start)
Row n = 5 counts the following compositions (empty columns indicated by dots):
  (5)     (14)     (113)   .  .  .
  (23)    (32)     (122)
  (41)    (131)    (1211)
  (212)   (221)
  (311)   (1112)
  (2111)  (1121)
          (11111)
(End)
		

References

  • M. Archibald, A. Blecher and A. Knopfmacher, Fixed points in compositions and words, accepted by the Journal of Integer Sequences.

Crossrefs

Row sums are A011782.
The version for permutations is A008290.
The version with all zeros removed is A238350.
The version for reversed partitions is A238352.
The corresponding rank statistic is A352512, nonfixed A352513.
The version for nonfixed points is A352523, A352520 (k=1).
Below: comps = compositions, first = column k=0, stat = rank statistic.
- A352521 counts comps by strong nonexcedances, first A219282, stat A352514.
- A352522 counts comps by weak nonexcedances, first A238874, stat A352515.
- A352524 counts comps by strong excedances, first A008930, stat A352516.
- A352525 counts comps by weak excedances, A177510 (k=1), stat A352517.

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1, expand(
           add(b(n-j, i+1)*`if`(i=j, x, 1), j=1..n)))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n, 1)):
    seq(T(n), n=0..15);
  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0, 1, Expand[Sum[b[n-j, i+1]*If[i == j, x, 1], {j, 1, n}]]]; T[n_] := Function[{p}, Table[Coefficient[p, x, i], {i, 0, n}]][b[n, 1]]; Table[T[n], {n, 0, 15}] // Flatten (* Jean-François Alcover, Jan 06 2015, after Alois P. Heinz *)
    pq[y_]:=Length[Select[Range[Length[y]],#==y[[#]]&]];
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],pq[#]==k&]],{n,0,9},{k,0,n}] (* Gus Wiseman, Apr 03 2022 *)

A238351 Number of compositions p(1)+p(2)+...+p(k) = n such that for no part p(i) = i (compositions without fixed points).

Original entry on oeis.org

1, 0, 1, 2, 3, 6, 11, 22, 42, 82, 161, 316, 624, 1235, 2449, 4864, 9676, 19267, 38399, 76582, 152819, 305085, 609282, 1217140, 2431992, 4860306, 9714696, 19419870, 38824406, 77624110, 155208405, 310352615, 620601689, 1241036325, 2481803050, 4963170896
Offset: 0

Views

Author

Joerg Arndt and Alois P. Heinz, Feb 25 2014

Keywords

Comments

Column k=0 of A238349 and of A238350.

Examples

			The a(7) = 22 such compositions are:
01:  [ 2 1 1 1 1 1 ]
02:  [ 2 1 1 1 2 ]
03:  [ 2 1 1 2 1 ]
04:  [ 2 1 1 3 ]
05:  [ 2 1 2 1 1 ]
06:  [ 2 1 2 2 ]
07:  [ 2 1 4 ]
08:  [ 2 3 1 1 ]
09:  [ 2 3 2 ]
10:  [ 2 4 1 ]
11:  [ 2 5 ]
12:  [ 3 1 1 1 1 ]
13:  [ 3 1 1 2 ]
14:  [ 3 1 2 1 ]
15:  [ 3 3 1 ]
16:  [ 3 4 ]
17:  [ 4 1 1 1 ]
18:  [ 4 1 2 ]
19:  [ 4 3 ]
20:  [ 5 1 1 ]
21:  [ 6 1 ]
22:  [ 7 ]
		

References

  • M. Archibald, A. Blecher and A. Knopfmacher, Fixed points in compositions and words, accepted by the Journal of Integer Sequences

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1,
           add(`if`(i=j, 0, b(n-j, i+1)), j=1..n))
        end:
    a:= n-> b(n, 1):
    seq(a(n), n=0..50);
  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0, 1, Sum[If[i == j, 0, b[n-j, i+1]], {j, 1, n}]]; a[n_] := b[n, 1]; Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Nov 06 2014, after Maple *)

Formula

a(n) ~ c * 2^n, where c = A048651/2 = 0.14439404754330121... - Vaclav Kotesovec, May 01 2014

A352523 Number of integer compositions of n with exactly k nonfixed points (parts not on the diagonal).

Original entry on oeis.org

1, 1, 0, 0, 2, 0, 1, 1, 2, 0, 0, 4, 2, 2, 0, 0, 5, 5, 4, 2, 0, 1, 3, 12, 8, 6, 2, 0, 0, 7, 14, 19, 14, 8, 2, 0, 0, 8, 21, 33, 32, 22, 10, 2, 0, 0, 9, 30, 54, 63, 54, 32, 12, 2, 0, 1, 6, 47, 80, 116, 116, 86, 44, 14, 2, 0, 0, 11, 53, 129, 194, 229, 202, 130, 58, 16, 2, 0
Offset: 0

Views

Author

Gus Wiseman, Mar 26 2022

Keywords

Comments

A nonfixed point in a composition c is an index i such that c_i != i.

Examples

			Triangle begins:
   1
   1   0
   0   2   0
   1   1   2   0
   0   4   2   2   0
   0   5   5   4   2   0
   1   3  12   8   6   2   0
   0   7  14  19  14   8   2   0
   0   8  21  33  32  22  10   2   0
   0   9  30  54  63  54  32  12   2   0
   1   6  47  80 116 116  86  44  14   2   0
   ...
For example, row n = 6 counts the following compositions (empty column indicated by dot):
  (123)  (6)   (24)    (231)    (2112)   (21111)    .
         (15)  (33)    (312)    (2121)   (111111)
         (42)  (51)    (411)    (3111)
               (114)   (1113)   (11112)
               (132)   (1122)   (11121)
               (141)   (1311)   (11211)
               (213)   (2211)
               (222)   (12111)
               (321)
               (1131)
               (1212)
               (1221)
		

Crossrefs

Column k = 0 is A010054.
Row sums are A011782.
The version for permutations is A098825.
The corresponding rank statistic is A352513.
Column k = 1 is A352520.
A238349 and A238350 count comps by fixed points, first col A238351, rank stat A352512.
A352486 gives the nonfixed points of A122111, counted by A330644.
A352521 counts comps by strong nonexcedances, first A219282, stat A352514.
A352522 counts comps by weak nonexcedances, first col A238874, stat A352515.
A352524 counts comps by strong excedances, first col A008930, stat A352516.
A352525 counts comps by weak excedances, first col A177510, stat A352517.

Programs

  • Maple
    b:= proc(n, i) option remember; expand(`if`(n=0, 1,
          add(`if`(i=j, 1, x)*b(n-j, i+1), j=1..n)))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n, 1)):
    seq(T(n), n=0..12);  # Alois P. Heinz, Mar 19 2025
  • Mathematica
    pnq[y_]:=Length[Select[Range[Length[y]],#!=y[[#]]&]];
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],pnq[#]==k&]],{n,0,9},{k,0,n}]
  • PARI
    T_xy(max_row) = {my(N=max_row+1, x='x+O('x^N), h= sum(i=0, N, prod(j=1, i, y*(x/(1-x)-x^j)+x^j))); vector(N, n, my(r=Vecrev(polcoeff(h, n-1))); if(n<2, r, concat(r,[0])))}
    T_xy(10) \\ John Tyler Rascoe, Mar 21 2025

Formula

G.f.: Sum_{i>=0} Product_{j=1..i} y*(x/(1-x) - x^j) + x^j. - John Tyler Rascoe, Mar 19 2025

A099036 a(n) = 2^n - Fibonacci(n).

Original entry on oeis.org

1, 1, 3, 6, 13, 27, 56, 115, 235, 478, 969, 1959, 3952, 7959, 16007, 32158, 64549, 129475, 259560, 520107, 1041811, 2086206, 4176593, 8359951, 16730848, 33479407, 66987471, 134021310, 268117645, 536356683, 1072909784, 2146137379, 4292788987, 8586410014
Offset: 0

Views

Author

Paul Barry, Sep 23 2004

Keywords

Comments

Binomial transform of (-1)^n*A000045(n) + 1 = (-1)^n*A008346(n).
Number of compositions of n+1 that contain 1 as a part. - Vladeta Jovovic, Sep 26 2004
Generated from iterates of M * [1,1,1,...], where M = a tridiagonal matrix with [0,1,1,1,...] as the main diagonal, [1,1,1,...] as the superdiagonal and [1,0,0,0,...] as the subdiagonal. - Gary W. Adamson, Jan 05 2009
Starting with offset 1, generated from iterates of M * [1,1,1,...], M*ANS -> M*ANS,...; where M = = a tridiagonal matrix with (0,1,1,1,...) in the main diagonal, (1,1,1,...) in the superdiagonal and (1,0,0,0,...) in the subdiagonal. - Gary W. Adamson, Jan 04 2009
An elephant sequence, see A175655. For the central square 24 A[5] vectors, with decimal values between 11 and 416, lead to this sequence (without the first leading 1). For the corner squares these vectors lead to the companion sequence A027934 (without the leading 0). - Johannes W. Meijer, Aug 15 2010
Number of fixed points in all compositions of n+1. - Alois P. Heinz, Jun 18 2020

Crossrefs

Programs

Formula

G.f.: (1 - x)^2/((1 - 2*x)*(1 - x - x^2)).
a(n) = 3*a(n-1) - a(n-2) - 2*a(n-3).
a(n) = A101220(1,2,n+1) - A101220(1,2,n). - Ross La Haye, Aug 05 2005
a(n) = A000079(n+1) - A117591(n) = A117591(n) - 2 * A000045(n). - Reinhard Zumkeller, Aug 15 2013
a(n) = Sum_{t_1+2*t_2+...+n*t_n = n} multinomial(1+t_1+t_2+...+t_n, 1+t_1, t_2, ..., t_n). - Mircea Merca, Oct 09 2013
a(n) = Sum_{k=0..A003056(n+1)} k * A238350(n+1,k). - Alois P. Heinz, Jun 18 2020
E.g.f.: cosh(2*x) + sinh(2*x) - 2*exp(x/2)*sinh(sqrt(5)*x/2)/sqrt(5). - Stefano Spezia, Jan 31 2023

Extensions

More terms from Ross La Haye, Aug 05 2005

A240736 Number of compositions of n having exactly one fixed point.

Original entry on oeis.org

1, 1, 1, 4, 7, 16, 29, 60, 120, 238, 479, 956, 1910, 3817, 7633, 15252, 30491, 60955, 121865, 243650, 487165, 974112, 1947851, 3895086, 7789153, 15576624, 31150481, 62296424, 124585395, 249158607, 498297297, 996562085, 1993071152, 3986055928, 7971971230
Offset: 1

Views

Author

Joerg Arndt and Alois P. Heinz, Apr 11 2014

Keywords

Examples

			a(4) = 4: 13, 22, 112, 1111.
a(5) = 7: 14, 32, 131, 221, 1112, 1121, 11111.
		

References

  • M. Archibald, A. Blecher and A. Knopfmacher, Fixed points in compositions and words, accepted by the Journal of Integer Sequences.

Crossrefs

Column k=1 of A238349 and of A238350.

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1, series(
          add(b(n-j, i+1)*`if`(i=j, x, 1), j=1..n), x, 2))
        end:
    a:= n-> coeff(b(n, 1), x, 1):
    seq(a(n), n=1..40);
  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0, 1, Series[Sum[b[n - j, i + 1]*If[i == j, x, 1], {j, 1, n}], {x, 0, 2}]]; a[n_] := SeriesCoefficient[b[n, 1], {x, 0, 1}]; Table[a[n], {n, 1, 40}] (* Jean-François Alcover, Nov 06 2014, after Maple *)

Formula

a(n) ~ c * 2^n, where c = A065442 * A048651 / 2 = 0.2319972162254452238942023675457837005318389885... - Vaclav Kotesovec, Sep 06 2014

A227682 G.f.: exp( Sum_{n>=1} x^n / (n*(1-x)^n * (1-x^n)) ).

Original entry on oeis.org

1, 1, 3, 7, 16, 35, 76, 162, 342, 715, 1484, 3060, 6278, 12824, 26102, 52969, 107224, 216601, 436798, 879584, 1769117, 3554726, 7136736, 14318524, 28711315, 57544864, 115290624, 230910993, 462362571, 925610398, 1852669016, 3707705019, 7419275371, 14844857959
Offset: 0

Views

Author

Paul D. Hanna, Jul 19 2013

Keywords

Comments

Number of compositions of n with k sorts of parts k where the sorts of parts are nondecreasing through the composition, see example. - Joerg Arndt, May 01 2014

Examples

			From _Joerg Arndt_, May 01 2014: (Start)
The a(5) = 35 compositions as described in the first comment are (here p:s stands for a part p of sort s)
01:  [ 1:0  1:0  1:0  1:0  1:0  ]
02:  [ 1:0  1:0  1:0  2:0  ]
03:  [ 1:0  1:0  1:0  2:1  ]
04:  [ 1:0  1:0  2:0  1:0  ]
05:  [ 1:0  1:0  3:0  ]
06:  [ 1:0  1:0  3:1  ]
07:  [ 1:0  1:0  3:2  ]
08:  [ 1:0  2:0  1:0  1:0  ]
09:  [ 1:0  2:0  2:0  ]
10:  [ 1:0  2:0  2:1  ]
11:  [ 1:0  2:1  2:1  ]
12:  [ 1:0  3:0  1:0  ]
13:  [ 1:0  4:0  ]
14:  [ 1:0  4:1  ]
15:  [ 1:0  4:2  ]
16:  [ 1:0  4:3  ]
17:  [ 2:0  1:0  1:0  1:0  ]
18:  [ 2:0  1:0  2:0  ]
19:  [ 2:0  1:0  2:1  ]
20:  [ 2:0  2:0  1:0  ]
21:  [ 2:0  3:0  ]
22:  [ 2:0  3:1  ]
23:  [ 2:0  3:2  ]
24:  [ 2:1  3:1  ]
25:  [ 2:1  3:2  ]
26:  [ 3:0  1:0  1:0  ]
27:  [ 3:0  2:0  ]
28:  [ 3:0  2:1  ]
29:  [ 3:1  2:1  ]
30:  [ 4:0  1:0  ]
31:  [ 5:0  ]
32:  [ 5:1  ]
33:  [ 5:2  ]
34:  [ 5:3  ]
35:  [ 5:4  ]
(End)
		

Crossrefs

Programs

  • Mathematica
    Flatten[{1,Table[SeriesCoefficient[Exp[Sum[x^k / (k*(1-x)^k * (1-x^k)),{k,1,n}]],{x,0,n}], {n,1,40}]}] (* Vaclav Kotesovec, May 01 2014 *)
  • PARI
    {a(n)=polcoeff(exp(sum(m=1, n+1, x^m/(m*(1-x)^m*(1-x^m +x*O(x^n))) )), n)}
    for(n=0, 50, print1(a(n), ", "))
    
  • PARI
    {a(n)=polcoeff(exp(sum(m=1, n+1, x^m*sumdiv(m, d, 1/(1-x +x*O(x^n))^d/d) )), n)}
    for(n=0, 50, print1(a(n), ", "))

Formula

G.f.: exp( Sum_{n>=1} x^n * Sum_{d|n} 1/(d*(1-x)^d) ).
G.f.: A(x) = 1 + x + 3*x^2 + 7*x^3 + 16*x^4 + 35*x^5 + 76*x^6 + 162*x^7 +...
where
log(A(x)) = x/((1-x)*(1-x)) + x^2/(2*(1-x)^2*(1-x^2)) + x^3/(3*(1-x)^3*(1-x^3)) + x^4/(4*(1-x)^4*(1-x^4)) + x^5/(5*(1-x)^5*(1-x^5)) +...
Explicitly,
log(A(x)) = x + 5*x^2/2 + 13*x^3/3 + 29*x^4/4 + 56*x^5/5 + 107*x^6/6 + 197*x^7/7 + 365*x^8/8 + 679*x^9/9 + 1280*x^10/10 +...
a(n) = A238350(n*(n+3)/2,n), a(n) is the number of compositions of n*(n+3)/2 with exactly n fixed points. - Alois P. Heinz, Apr 11 2014
a(n) ~ c * 2^n, where c = 1/(2*A048651) = 1.73137330972753180576... - Vaclav Kotesovec, May 01 2014
G.f.: Product {n >= 1} 1/(1 - x^n/(1 - x)). Row sums of A253829. - Peter Bala, Jan 20 2015

A240737 Number of compositions of n having exactly two fixed points.

Original entry on oeis.org

1, 1, 3, 4, 12, 23, 47, 100, 198, 404, 818, 1652, 3319, 6686, 13426, 26947, 54043, 108331, 217059, 434731, 870472, 1742558, 3487710, 6979593, 13965902, 27942597, 55902624, 111833288, 223711791, 447496476, 895110536, 1790410758, 3581127635, 7162749398
Offset: 3

Views

Author

Joerg Arndt and Alois P. Heinz, Apr 11 2014

Keywords

Examples

			a(5) = 3: 113, 122, 1211.
a(6) = 4: 1131, 1212, 1221, 12111.
a(7) = 12: 124, 133, 223, 1114, 1132, 1213, 1222, 11311, 12112, 12121, 12211, 121111.
		

Crossrefs

Column k=2 of A238349 and of A238350.

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1, series(
          add(b(n-j, i+1)*`if`(i=j, x, 1), j=1..n), x, 3))
        end:
    a:= n-> coeff(b(n, 1), x, 2):
    seq(a(n), n=3..40);
  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0, 1, Series[Sum[b[n-j, i+1]*If[i == j, x, 1], {j, 1, n}], {x, 0, 3}]]; a[n_] := SeriesCoefficient[b[n, 1], {x, 0, 2}]; Table[a[n], {n, 3, 40}] (* Jean-François Alcover, Nov 07 2014, after Maple *)

Formula

a(n) ~ c * 2^n, where c = 0.10426192955737153473390619611670767950197436882607451088699497466613223911... . - Vaclav Kotesovec, Sep 07 2014

A240738 Number of compositions of n having exactly three fixed points.

Original entry on oeis.org

1, 1, 3, 7, 12, 30, 61, 126, 258, 537, 1083, 2205, 4465, 9023, 18192, 36612, 73633, 147893, 296818, 595313, 1193351, 2391121, 4789448, 9590503, 19199906, 38430421, 76910470, 153901337, 307932963, 616076971, 1232495756, 2465545205, 4931986957, 9865425657
Offset: 6

Views

Author

Joerg Arndt and Alois P. Heinz, Apr 11 2014

Keywords

Examples

			a(8) = 3: 1214, 1232, 12311.
a(9) = 7: 1134, 1224, 1233, 12141, 12312, 12321, 123111.
a(10) = 12: 11341, 12115, 12142, 12241, 12313, 12322, 12331, 121411, 123112, 123121, 123211, 1231111.
		

Crossrefs

Column k=3 of A238349 and of A238350.

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1, series(
          add(b(n-j, i+1)*`if`(i=j, x, 1), j=1..n), x, 4))
        end:
    a:= n-> coeff(b(n, 1), x, 3):
    seq(a(n), n=6..45);
  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0, 1, Series[Sum[b[n-j, i+1]*If[i == j, x, 1], {j, 1, n}], {x, 0, 4}]]; a[n_] := SeriesCoefficient[b[n, 1], {x, 0, 3}]; Table[a[n], {n, 6, 45}] (* Jean-François Alcover, Nov 07 2014, after Maple *)

Formula

a(n) ~ c * 2^n, where c = 0.01795631780689407343024911217251418606332716557572090051127381129853009022... . - Vaclav Kotesovec, Sep 07 2014

A240739 Number of compositions of n having exactly four fixed points.

Original entry on oeis.org

1, 1, 3, 7, 16, 30, 70, 144, 299, 615, 1261, 2584, 5238, 10624, 21482, 43350, 87331, 175703, 353074, 708963, 1422445, 2852299, 5716668, 11453033, 22938117, 45928418, 91941762, 184021452, 368267172, 736898601, 1474388631, 2949737232, 5901032198, 11804591355
Offset: 10

Views

Author

Joerg Arndt and Alois P. Heinz, Apr 11 2014

Keywords

Examples

			a(12) = 3: 12315, 12342, 123411.
a(13) = 7: 12145, 12325, 12343, 123151, 123412, 123421, 1234111.
a(14) = 16: 11345, 12245, 12335, 12344, 121451, 123116, 123152, 123251, 123413, 123422, 123431, 1231511, 1234112, 1234121, 1234211, 12341111.
		

Crossrefs

Column k=4 of A238349 and of A238350.

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1, series(
          add(b(n-j, i+1)*`if`(i=j, x, 1), j=1..n), x, 5))
        end:
    a:= n-> coeff(b(n, 1), x, 4):
    seq(a(n), n=10..50);
  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0, 1, Series[Sum[b[n-j, i+1]*If[i == j, x, 1], {j, 1, n}], {x, 0, 5}]]; a[n_] := SeriesCoefficient[b[n, 1], {x, 0, 4}]; Table[a[n], {n, 10, 50}] (* Jean-François Alcover, Nov 07 2014, after Maple *)

Formula

a(n) ~ c * 2^n, where c = 0.00134325422292269761312514583911029332451787453007326095828843859220629510... . - Vaclav Kotesovec, Sep 07 2014
Showing 1-10 of 17 results. Next