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 21-26 of 26 results.

A216235 Square array T, read by antidiagonals: T(n,k) = 0 if n-k >= 2 or if k-n >= 5, T(1,0) = T(0,0) = T(0,1) = T(0,2) = T(0,3) = T(0,4) = 1, T(n,k) = T(n-1,k) + T(n,k-1).

Original entry on oeis.org

1, 1, 1, 1, 2, 0, 1, 3, 2, 0, 1, 4, 5, 0, 0, 0, 5, 9, 5, 0, 0, 0, 5, 14, 14, 0, 0, 0, 0, 0, 19, 28, 14, 0, 0, 0, 0, 0, 19, 47, 42, 0, 0, 0, 0, 0, 0, 0, 66, 89, 42, 0, 0, 0, 0, 0, 0, 0, 66, 155, 131, 0, 0, 0, 0, 0, 0, 0, 0, 0, 221, 286, 131, 0, 0, 0, 0, 0, 0, 0, 0, 0, 221, 507, 417, 0, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Philippe Deléham, Mar 14 2013

Keywords

Comments

Arithmetic hexagon of E. Lucas.

Examples

			Square array begins:
  1, 1, 1,  1,  1,   0,   0,   0,   0,   0, ... row n=0
  1, 2, 3,  4,  5,   5,   0,   0,   0,   0, ... row n=1
  0, 2, 5,  9, 14,  19,  19,   0,   0,   0, ... row n=2
  0, 0, 5, 14, 28,  47,  66,  66,   0,   0, ... row n=3
  0, 0, 0, 14, 42,  89, 155, 221, 221,   0, ... row n=4
  0, 0, 0,  0, 42, 131, 286, 507, 728, 728, ... row n=5
  ...
		

Crossrefs

Formula

T(n,n) = T(n+1,n) = A080937(n+1).
T(n,n+1) = A094790(n+1).
T(n,n+2) = A094789(n+1).
T(n,n+3) = T(n,n+4) = A005021(n).
Sum_{k=0..n} T(n-k,k) = A028495(n+1). - Philippe Deléham, Mar 23 2013

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

Original entry on oeis.org

1, 1, 2, 1, 2, 4, 2, 2, 8, 7, 8, 4, 3, 26, 4, 13, 24, 24, 6, 66, 28, 8, 23, 62, 104, 8, 10, 158, 120, 64, 42, 148, 352, 80, 16, 19, 350, 416, 344, 16, 75, 334, 1052, 448, 160, 33, 756, 1252, 1440, 208, 32, 136, 726, 2860, 1936, 1024, 32, 61, 1578, 3448, 5176, 1440, 384, 244, 1534, 7312, 7056, 5072, 512, 64
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 A028495(n).
T(n,0) = A276055(n)
Sum_{k>=0} k*T(n,k) = A276054(n).

Examples

			Row 4 is [4,2] because the compositions of 4 with parts in {1,2,4,6,8,...} are 4, 22, 211, 121, 112, and 1111, having asymmetry degrees 0, 0, 1, 0, 1, and 0, respectively.
Triangle starts:
  1;
  1;
  2;
  1,2;
  4,2;
  2,8;
  7,8,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^3)/(1-2*z^2-2*t*z^3-z^4+(3-2*t)*z^6+2*t*z^7-z^8): 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[TakeWhile[BinCounts[#, {0, 1 + Floor[n/3], 1}], # != 0 &] &@ 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_, _} /; Nor[a == 1, EvenQ@ a]]], 1]]], {n, 0, 18}] // Flatten (* Michael De Vlieger, Aug 28 2016 *)

Formula

G.f.: G(t,z) = (1-z^4)*(1+z-z^3)/(1-2*z^2-2*t*z^3-z^4+(3-2*t)*z^6+2*t*z^7-z^8). 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.

A336675 Number of paths of length n starting at initial node of the path graph P_10.

Original entry on oeis.org

1, 1, 2, 3, 6, 10, 20, 35, 70, 126, 251, 460, 911, 1690, 3327, 6225, 12190, 22950, 44744, 84626, 164407, 312019, 604487, 1150208, 2223504, 4239225, 8181175, 15621426, 30108147, 57556155, 110820165, 212037241, 407946421, 781074572, 1501844193, 2877011660, 5529362694
Offset: 0

Views

Author

Nachum Dershowitz, Jul 30 2020

Keywords

Comments

Also the number of paths along a corridor width 10, starting from one side.
In general, a(n,m) = (2^n/(m+1))*Sum_{r=1..m} (1-(-1)^r)*cos(Pi*r/(m+1))^n*(1+cos(Pi*r/(m+1))) gives the number of paths of length n starting at the initial node on the path graph P_m. Here we have m=10. - Herbert Kociemba, Sep 14 2020

Crossrefs

This is row 10 of A094718. Bisections give A224514 (even part), A216710 (odd part).
Cf. A000004 (row 0), A000007 (row 1), A000012 (row 2), A016116 (row 3), A000045 (row 4), A038754 (row 5), A028495 (row 6), A030436 (row 7), A061551 (row 8), A178381 (row 9), this sequence (row 10), A336678 (row 11), A001405 (limit).

Programs

  • Maple
    X := j -> (-1)^(j/11) - (-1)^(1-j/11):
    a := k -> add((2 + X(j))*X(j)^k, j in [1, 3, 5, 7, 9])/11:
    seq(simplify(a(n)), n=0..30); # Peter Luschny, Sep 17 2020
  • Mathematica
    a[n_,m_]:=2^(n+1)/(m+1) Module[{x=(Pi r)/(m+1)},Sum[Cos[x]^n (1+Cos[x]),{r,1,m,2}]]
    Table[a[n,10],{n,0,40}]//Round (* Herbert Kociemba, Sep 14 2020 *)
  • PARI
    my(x='x+O('x^44)); Vec((1 - 3*x^2 + x^4)/(1 - x - 4*x^2 + 3*x^3 + 3*x^4 - x^5)) \\ Joerg Arndt, Jul 31 2020

Formula

From Stefano Spezia, Jul 30 2020: (Start)
G.f.: (1 - 3*x^2 + x^4)/(1 - x - 4*x^2 + 3*x^3 + 3*x^4 - x^5).
a(n) = a(n-1) + 4*a(n-2) - 3*a(n-3) - 3*a(n-4) + a(n-5) for n > 4. (End)
a(n) = (2^n/11)*Sum_{r=1..10} (1-(-1)^r)*cos(Pi*r/11)^n*(1+cos(Pi*r/11)). - Herbert Kociemba, Sep 14 2020

A336678 Number of paths of length n starting at initial node of the path graph P_11.

Original entry on oeis.org

1, 1, 2, 3, 6, 10, 20, 35, 70, 126, 252, 461, 922, 1702, 3404, 6315, 12630, 23494, 46988, 87533, 175066, 326382, 652764, 1217483, 2434966, 4542526, 9085052, 16950573, 33901146, 63255670, 126511340, 236063915, 472127830, 880983606, 1761967212, 3287837741
Offset: 0

Views

Author

Nachum Dershowitz, Jul 30 2020

Keywords

Comments

Also the number of paths along a corridor width 11, starting from one side.
In general, a(n,m) = (2^n/(m+1))*Sum_{r=1..m} (1-(-1)^r)*cos(Pi*r/(m+1))^n*(1+cos(Pi*r/(m+1))) gives the number of paths of length n starting at the initial node on the path graph P_m. Here we have m=11. - Herbert Kociemba, Sep 14 2020

Crossrefs

This is row 11 of A094718. Bisections give A087944 (even part), A087946 (odd part).
Cf. A000004 (row 0), A000007 (row 1), A000012 (row 2), A016116 (row 3), A000045 (row 4), A038754 (row 5), A028495 (row 6), A030436 (row 7), A061551 (row 8),
A178381 (row 9), A336675 (row 10), this sequence (row 11), A001405 (limit).

Programs

  • Maple
    X := j -> (-1)^(j/12) - (-1)^(1-j/12):
    a := k -> add((2 + X(j))*X(j)^k, j in [1, 3, 5, 7, 9, 11])/12:
    seq(simplify(a(n)), n=0..30); # Peter Luschny, Sep 17 2020
  • Mathematica
    LinearRecurrence[{0, 6, 0, -9, 0, 2}, {1, 1, 2, 3, 6, 10}, 40] (* Harvey P. Dale, Sep 08 2020 *)
    a[n_,m_]:=2^(n+1)/(m+1) Module[{x=(Pi r)/(m+1)},Sum[Cos[x]^n (1+Cos[x]),{r,1,m,2}]]
    Table[a[n,11], {n,0,40}]//Round (* Herbert Kociemba, Sep 14 2020 *)
  • PARI
    my(x='x+O('x^44)); Vec(-(x^5+3*x^4-3*x^3-4*x^2+x+1)/((2*x^2-1)*(x^4-4*x^2+1))) \\ Joerg Arndt, Jul 31 2020

Formula

G.f.: -(x^5+3*x^4-3*x^3-4*x^2+x+1)/((2*x^2-1)*(x^4-4*x^2+1)).
a(n) = (2^n/12)*Sum_{r=1..11} (1-(-1)^r)*cos(Pi*r/12)^n*(1+cos(Pi*r/12)). - Herbert Kociemba, Sep 14 2020

A078805 Triangular array T given by T(n,k) = number of 01-words of length n having exactly k 1's, every runlength of 1's odd and initial letter 0.

Original entry on oeis.org

1, 1, 1, 1, 2, 0, 1, 3, 1, 1, 1, 4, 3, 2, 0, 1, 5, 6, 4, 2, 1, 1, 6, 10, 8, 6, 2, 0, 1, 7, 15, 15, 13, 6, 3, 1, 1, 8, 21, 26, 25, 16, 9, 2, 0, 1, 9, 28, 42, 45, 36, 22, 9, 4, 1, 1, 10, 36, 64, 77, 72, 50, 28, 12, 2, 0, 1, 11, 45, 93, 126, 133, 106, 70, 34, 13, 5, 1, 1, 12, 55, 130, 198, 232
Offset: 1

Views

Author

Clark Kimberling, Dec 07 2002

Keywords

Examples

			T(5,2) counts the words 01010, 01001, 00101.
Top of triangle T:
  1 = T(1,0)
  1 1 = T(2,0) T(2,1)
  1 2 0 = T(3,0) T(3,1) T(3,2)
  1 3 1 1
  1 4 3 2 0
		

References

  • Clark Kimberling, Binary words with restricted repetitions and associated compositions of integers, in Applications of Fibonacci Numbers, vol.10, Proceedings of the Eleventh International Conference on Fibonacci Numbers and Their Applications, William Webb, editor, Congressus Numerantium, Winnipeg, Manitoba 194 (2009) 141-151.

Crossrefs

Row sums: A028495.

Programs

  • Mathematica
    Clear[t];
    t[n_,k_]:=0/;Not[0<=n<=200&&0<=k<=200];
    t[1,0]=1;t[2,0]=1;t[2,1]=1;
    t[3,0]=1;t[3,1]=2;t[3,2]=0; t[4,2]=1;
    t[n_,k_]:=t[n,k]=t[n-2,k]+t[n-2,k-1]+t[n-2,k-2]+t[n-3,k-1]-t[n-4,k-2]
    u=Table[t[n,k],{n,1,12},{k,0,n-1}]
    Grid[u] (* triangle *)
    Flatten[u] (* sequence *)
    (* Clark Kimberling Jul 18 2025 *)

Formula

T(n, k)=T(n-2, k)+T(n-2, k-1)+T(n-2, k-2)+T(n-3, k-1)-T(n-4, k-2) for 0<=k<=n, n>=4. (All numbers T(i, j) not in the array are 0, by definition of T.)

A276055 Number of palindromic compositions of n with parts in {1,2,4,6,8,10,...}.

Original entry on oeis.org

1, 1, 2, 1, 4, 2, 7, 3, 13, 6, 23, 10, 42, 19, 75, 33, 136, 61, 244, 108, 441, 197, 793, 352, 1431, 638, 2576, 1145, 4645, 2069, 8366, 3721, 15080, 6714, 27167, 12087, 48961, 21794, 88215, 39254, 158970, 70755, 286439, 127469, 516164, 229725, 930072
Offset: 0

Views

Author

Emeric Deutsch, Aug 17 2016

Keywords

Examples

			a(6) = 7 because the palindromic compositions of 6 with parts in {1,2,4,6,8,...} are 6, 141, 222, 2112, 1221, 11211, and 111111.
		

References

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

Crossrefs

Programs

  • Maple
    g := (1+z^2)*(1+z-z^3)/(1-z^2-2*z^4+z^6): gser:= series(g,z=0,55): seq(coeff(gser,z,n),n=0..50);
  • Mathematica
    CoefficientList[Series[(1 + x^2) (1 + x - x^3)/(1 - x^2 - 2 x^4 + x^6), {x, 0, 50}], x] (* Vincenzo Librandi, Aug 18 2016 *)
    LinearRecurrence[{0,1,0,2,0,-1},{1,1,2,1,4,2},50] (* Harvey P. Dale, Jul 03 2021 *)

Formula

G.f.: g(z) = (1+z^2)*(1+z-z^3)/(1-z^2-2*z^4+z^6). In the more general situation of compositions into a[1]=1} z^(a[j]), we have g(z) = (1+F(z))/(1-F(z^2)) (see Theorem 1.2 in the Hoggatt et al. reference).
a(2*n) = |A078038(n)|. a(2*n+1) = A028495(n). - R. J. Mathar, Jan 13 2023
Previous Showing 21-26 of 26 results.