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-30 of 31 results. Next

A034852 Rows of (Pascal's triangle - Losanitsch's triangle) (n >= 0, k >= 0).

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 2, 2, 2, 0, 0, 2, 4, 4, 2, 0, 0, 3, 6, 10, 6, 3, 0, 0, 3, 9, 16, 16, 9, 3, 0, 0, 4, 12, 28, 32, 28, 12, 4, 0, 0, 4, 16, 40, 60, 60, 40, 16, 4, 0, 0, 5, 20, 60, 100, 126, 100, 60, 20, 5, 0, 0, 5, 25, 80, 160, 226, 226, 160, 80, 25, 5, 0, 0, 6, 30, 110, 240
Offset: 0

Views

Author

Keywords

Comments

Also number of linear unbranched n-4-catafusenes of C_{2v} symmetry.
Number of n-bead black-white reversible strings with k black beads; also binary grids; string is not palindromic. - Yosu Yurramendi, Aug 08 2008
The first seven columns are A004526, A002620, A006584, A032091, A032092, A032093, A032094. Row sums give essentially A032085. - Yosu Yurramendi, Aug 08 2008
From Álvar Ibeas, Jun 01 2020: (Start)
T(n, k) is the sum of odd-degree coefficients of the Gaussian polynomial [n, k]_q. The area below a NE lattice path between (0,0) and (k, n-k) is even for A034851(n, k) paths and odd for T(n, k) of them.
For a (non-reversible) string of k black and n-k white beads, consider the minimum number of bead transpositions needed to place the black ones to the left and the white ones to the right (in other words, the number of inversions of the permutation obtained by labeling the black beads by integers 1,...,k and the white ones by k+1,...,n, in the same order they take on the string). It is even for A034851(n, k) strings and odd for T(n, k) cases.
(End)

Examples

			Triangle begins:
  0;
  0 0;
  0 1 0;
  0 1 1 0;
  0 2 2 2 0;
  0 2 4 4 2 0;
  ...
		

Crossrefs

Essentially the same as A034877.

Programs

  • Haskell
    a034852 n k = a034852_tabl !! n !! k
    a034852_row n = a034852_tabl !! n
    a034852_tabl = zipWith (zipWith (-)) a007318_tabl a034851_tabl
    -- Reinhard Zumkeller, Mar 24 2012
  • Mathematica
    nmax = 12; t[n_?EvenQ, k_?EvenQ] := (Binomial[n, k] - Binomial[n/2, k/2])/ 2; t[n_?EvenQ, k_?OddQ] := Binomial[n, k]/2; t[n_?OddQ, k_?EvenQ] := (Binomial[n, k] - Binomial[(n-1)/2, k/2])/2; t[n_?OddQ, k_?OddQ] := (Binomial[n, k] - Binomial[(n-1)/2, (k-1)/2])/2; Flatten[ Table[t[n, k], {n, 0, nmax}, {k, 0, n}]] (* Jean-François Alcover, Nov 15 2011, after Yosu Yurramendi *)

Formula

Equals (A007318-A051159)/2. - Yosu Yurramendi, Aug 08 2008
T(n, k) = T(n - 1, k - 1) + T(n - 1, k); except when n is even and k odd, in which case T(n, k) = A034851(n, k) = T(n - 1, k - 1) + A034841(n - 1, k) = A034841(n - 1, k - 1) + T(n - 1, k) = C(n, k) / 2. - Álvar Ibeas, Jun 01 2020

Extensions

More terms from James Sellers, May 04 2000

A179181 'PE(n,k)' triangle read by rows. PE(n,k) is the number of k-palindromes of n up to cyclic equivalence.

Original entry on oeis.org

1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 2, 0, 1, 1, 1, 2, 1, 1, 1, 1, 0, 3, 0, 3, 0, 1, 1, 1, 3, 2, 3, 2, 1, 1, 1, 0, 4, 0, 6, 0, 4, 0, 1, 1, 1, 4, 2, 6, 4, 4, 2, 1, 1, 1, 0, 5, 0, 10, 0, 10, 0, 5, 0, 1, 1, 1, 5, 3, 10, 6, 10, 5, 5, 3, 1, 1
Offset: 1

Views

Author

John P. McSorley, Jun 30 2010

Keywords

Comments

A k-composition of n is an ordered collection of k positive integers (parts) which sum to n.
Two k-compositions of n are cyclically equivalent if one can be obtained from the other by a cyclic permutation of its parts.
A k-palindrome of n is a k-composition of n which is a palindrome.
Let PE(n,k) denote the number of k-palindromes of n up to cyclic equivalence.
This sequence is the 'PE(n,k)' triangle read by rows.

Examples

			The triangle begins
  1
  1,1
  1,0,1
  1,1,1,1
  1,0,2,0,1
  1,1,2,1,1,1
  1,0,3,0,3,0,1
  1,1,3,2,3,2,1,1
  1,0,4,0,6,0,4,0,1
  1,1,4,2,6,4,4,2,1,1
For example, row 8 is 1,1,3,2,3,2,1,1.
We have PE(8,3)=3 because there are 3 3-palindromes of 8, namely: 161, 242, and 323, and none are cyclically equivalent to the others.
We have PE(8,4)=2 because there are 3 4-palindromes of 8, namely: 3113, 1331, and 2222, but 3113 and 1331 are cyclically equivalent.
		

References

  • John P. McSorley: Counting k-compositions with palindromic and related structures. Preprint, 2010.

Crossrefs

If we ignore cyclic equivalence then we have sequence A051159.
The row sums of the 'PE(n, k)' triangle give sequence A056503.

Programs

  • Mathematica
    T[n_, k_] := (3 - (-1)^k)/4*Sum[MoebiusMu[d]*QBinomial[n/d - 1, k/d - 1, -1], {d, Divisors@ GCD[n, k]}]; Table[DivisorSum[GCD[n, k], T[n/#, k/#] &], {n, 12}, {k, n}] // Flatten (* Michael De Vlieger, Oct 31 2021, after Jean-François Alcover at A179317 *)
  • PARI
    p(n, k) = if(n%2==1&&k%2==0, 0, binomial((n-1)\2, (k-1)\2));
    APE(n, k) = if(k%2,1,1/2) * sumdiv(gcd(n,k), d, moebius(d) * p(n/d, k/d));
    T(n, k) = sumdiv(gcd(n,k), d, APE(n/d, k/d));
    for(n=1, 10, for(k=1, n, print1(T(n,k), ", ")); print) \\ Andrew Howroyd, Oct 07 2017

Formula

PE(n, k) = Sum_{d | gcd(n,k)} A179317(n/d, k/d). - Andrew Howroyd, Oct 07 2017

Extensions

Terms a(56) and beyond from Andrew Howroyd, Oct 07 2017

A136482 Triangle read by rows: T(n,k) = 2*A007318(n,k) - A034851(n,k) (i.e., twice Pascal's triangle - the Losanitch triangle).

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 4, 4, 1, 1, 6, 8, 6, 1, 1, 7, 14, 14, 7, 1, 1, 9, 21, 30, 21, 9, 1, 1, 10, 30, 51, 51, 30, 10, 1, 1, 12, 40, 84, 102, 84, 40, 12, 1, 1, 13, 52, 124, 186, 186, 124, 52, 13, 1, 1, 15, 65, 180, 310, 378, 310, 180, 65, 15, 1, 1, 16, 80, 245, 490, 688, 688, 490, 245
Offset: 0

Views

Author

Gary W. Adamson, Dec 31 2007

Keywords

Comments

Row sums are apparently in A135098. - R. J. Mathar, May 01 2008

Examples

			Row n=3 is 2*(1,3,3,1) - (1,2,2,1) = (1,4,4,1).
		

Crossrefs

Programs

Extensions

Edited and corrected by R. J. Mathar, May 01 2008

A136489 Triangle T(n, k) = 3*A007318(n, k) - 2*A034851(n, k).

Original entry on oeis.org

1, 1, 1, 1, 4, 1, 1, 5, 5, 1, 1, 8, 10, 8, 1, 1, 9, 18, 18, 9, 1, 1, 12, 27, 40, 27, 12, 1, 1, 13, 39, 67, 67, 39, 13, 1, 1, 16, 52, 112, 134, 112, 52, 16, 1, 1, 17, 68, 164, 246, 246, 164, 68, 17, 1, 1, 20, 85, 240, 410, 504, 410, 240, 85, 20, 1
Offset: 0

Views

Author

Gary W. Adamson, Jan 01 2008

Keywords

Examples

			First few rows of the triangle are:
  1;
  1,   1;
  1,   4,   1;
  1,   5,   5,   1;
  1,   8,  10,   8,   1;
  1,   9,  18,  18,   9,   1;
  1,  12,  27,  40,  27,  12,   1;
  1,  13,  39,  67,  67,  39,  13,   1;
  1,  16,  52, 112, 134, 112,  52,  16,   1;
  1,  17,  68, 164, 246, 246, 164,  68,  17,   1;
  ...
		

Crossrefs

Cf. A034851, A042948, A077957, A122746 (row sums).

Programs

  • Magma
    A136489:= func< n,k | 2*Binomial(n,k) - Binomial(n mod 2, k mod 2)*Binomial(Floor(n/2), Floor(k/2)) >;
    [A136489(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Aug 01 2023
    
  • Mathematica
    T[n_, k_]:= 2*Binomial[n,k] -Binomial[Mod[n,2], Mod[k,2]]*Binomial[Floor[n/2], Floor[k/2]];
    Table[T[n,k], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Aug 01 2023 *)
  • SageMath
    def A136489(n,k): return 2*binomial(n,k) - binomial(n%2, k%2)*binomial(n//2, k//2)
    flatten([[A136489(n,k) for k in range(n+1)] for n in range(13)]) # G. C. Greubel, Aug 01 2023

Formula

T(n, k) = 3*A007318(n, k) - 2*A034851(n, k).
Sum_{k=0..n} T(n, k) = A122746(n).
From G. C. Greubel, Aug 01 2023: (Start)
T(n, k) = 2*A007318(n, k) - A051159(n, k).
T(n, k) = T(n-1, k) + T(n-1, k-1) if k is even.
T(n, n-k) = T(n, k).
T(n, n-1) = A042948(n).
Sum_{k=0..n} (-1)^k * T(n, k) = 2*[n=0] - A077957(n). (End)

A239632 Number of parts in all palindromic compositions of n.

Original entry on oeis.org

0, 1, 3, 4, 10, 12, 28, 32, 72, 80, 176, 192, 416, 448, 960, 1024, 2176, 2304, 4864, 5120, 10752, 11264, 23552, 24576, 51200, 53248, 110592, 114688, 237568, 245760, 507904, 524288, 1081344, 1114112, 2293760, 2359296, 4849664, 4980736, 10223616, 10485760, 21495808, 22020096, 45088768, 46137344
Offset: 0

Views

Author

Geoffrey Critzer, Mar 22 2014

Keywords

Examples

			a(5)=12 because we have: 5, 1+3+1, 2+1+2, 1+1+1+1+1 with a total of 12 parts.
		

Crossrefs

Cf. A051159.

Programs

  • Mathematica
    nn=30; r=Solve[p==y/(1-x) - y + 1 + y^2*x^2/(1-x^2)*p, p]; CoefficientList[Series[D[p/.r,y]/.y->1, {x,0,nn}], x]
    CoefficientList[Series[(x + 3 x^2 - 2 x^4)/(1 - 2 x^2)^2, {x, 0, 40}], x] (* Vincenzo Librandi, Mar 23 2014 *)

Formula

G.f.: (x + 3*x^2 - 2*x^4)/(1 - 2*x^2)^2.
a(n) = Sum_{k=1..n} A051159(n,k)*k.
a(n) = 4*a(n-2) - 4*a(n-4) for n > 3. - Giovanni Resta, Mar 23 2014
a(2k) = (2k+1)*2^(k-1) for k>0, a(2k+1) = (2k+2)*2^(k-1) for k>=0. - Gregory L. Simay, Dec 05 2022
E.g.f.: (2*(1 + x)*cosh(sqrt(2)*x) + sqrt(2)*(1 + 2*x)*sinh(sqrt(2)*x) - 2)/4. - Stefano Spezia, Apr 25 2024

A121908 S-D transform of Catalan numbers A000108.

Original entry on oeis.org

1, 2, 3, 9, 19, 72, 181, 752, 2051, 8902, 25417, 113249, 333101, 1510888, 4538219, 20853973, 63626003, 295288350, 911918665, 4265460227, 13300767273, 62608960656, 196778953279, 931129725342, 2945833819213, 14000655099890, 44541071348599, 212484364171847
Offset: 0

Views

Author

Philippe Deléham, Sep 01 2006

Keywords

Examples

			1 1 2 5 14 42 132 ... (A000108)
2 1 7 9 56 90 ...
3 6 16 47 146 ...
9 10 63 99 ...
19 53 162 ...
72 109 ...
181 ...
Row 1 : A000108
Row 2 : 1+1=2, 2-1=1, 5+2=7, 14-5=9, 42+14=56, 132-42=90, ...
Row 3 : 1+2=3, 7-1=6, 9+7=16, 56-9=47, 90+56=146, ...
Row 4 : 6+3=9, 16-6=10, 47+16=63, 146-47=99, ...
Row 5 : 10+9=19, 63-10=53, 99+63=162, ...
Row 6 : 53+19=72, 162-53=109, ...
Row 7 : 109+72=181, ...
First diagonal of this triangular array form this sequence.
		

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<6, [1, 2, 3, 9, 19, 72][n+1],
          ((16*n^2+72*n-153)*n *a(n-1)
           +(304*n^4-1276*n^3+1213*n^2+487*n-754) *a(n-2)
           -(288*n^3-768*n^2-294*n+1424) *a(n-3)
           -(560*n^4-3772*n^3+6497*n^2+1253*n-4558) *a(n-4)
           +17*(n-4)*(16*n^2-8*n-29) *a(n-5)
           +17*(n-5)*(n-4)*(16*n^2-4*n-13) *a(n-6)) /
          (n*(n+1)*(16*n^2-36*n+7)))
        end:
    seq(a(n), n=0..40);  # Alois P. Heinz, Jul 12 2014
  • Mathematica
    T[n_, k_] := Binomial[Mod[n, 2], Mod[k, 2]] Binomial[Quotient[n, 2], Quotient[k, 2]];
    a[n_] := Sum[T[n, k] CatalanNumber[k], {k, 0, n}];
    a /@ Range[0, 40] (* Jean-François Alcover, Nov 19 2020 *)

Formula

a(n) = Sum_{k=0..n} A051159(n,k) * A000108(k).
Recurrence: see Maple program.

Extensions

More terms from Alois P. Heinz, Jul 12 2014

A121909 S-D transform of factorial numbers A000142.

Original entry on oeis.org

1, 2, 3, 10, 29, 162, 799
Offset: 0

Views

Author

Philippe Deléham, Sep 01 2006

Keywords

Examples

			Row 1 : 1, 1, 2, 6, 24, 120, ...(A000142)
Row 2 : 1+1=2, 2-1=1, 6+2=8, 24-6=18, 120+24=144, ...
Row 3 : 1+2=3, 9-1=7, 18+8=26, 144-18=126, ...
Row 4 : 7+3=10, 26-7=19, 126+26=152, ...
Row 5 : 19+10=29, 152-19=133, ...
Row 6 : 133+29=162, ...
First term of each row form this sequence.
		

Formula

a(n)=Sum{k, 0<=k<=n}A051159(n,k)*A000142(k).

A171145 The sequence of coefficients of a polynomial recursion: p(x,n)=If[Mod[n, 2] == 0, (x + 1)*p(x, n - 1), (x^2 + n*x + 1)^Floor[n/2]].

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 4, 4, 1, 1, 10, 27, 10, 1, 1, 11, 37, 37, 11, 1, 1, 21, 150, 385, 150, 21, 1, 1, 22, 171, 535, 535, 171, 22, 1, 1, 36, 490, 3024, 7539, 3024, 490, 36, 1, 1, 37, 526, 3514, 10563, 10563, 3514, 526, 37, 1, 1, 55, 1215, 13530, 76845, 188001, 76845
Offset: 1

Views

Author

Roger L. Bagula and Gary W. Adamson, Dec 04 2009

Keywords

Comments

Row sums are:
{1, 2, 5, 10, 49, 98, 729, 1458, 14641, 29282, 371293, 742586,...}.
The modulo 2 of this appears to be a staggered Sierpinski-type fractal.

Examples

			{1},
{1, 1},
{1, 3, 1},
{1, 4, 4, 1},
{1, 10, 27, 10, 1},
{1, 11, 37, 37, 11, 1},
{1, 21, 150, 385, 150, 21, 1},
{1, 22, 171, 535, 535, 171, 22, 1},
{1, 36, 490, 3024, 7539, 3024, 490, 36, 1},
{1, 37, 526, 3514, 10563, 10563, 3514, 526, 37, 1},
{1, 55, 1215, 13530, 76845, 188001, 76845, 13530, 1215, 55, 1},
{1, 56, 1270, 14745, 90375, 264846, 264846, 90375, 14745, 1270, 56, 1}
		

Crossrefs

Programs

  • Mathematica
    Clear[p, n, x, a]
    p[x, 1] := 1;
    p[x_, n_] := p[x, n] = If[Mod[n, 2] == 0, (x + 1)*p[x, n - 1], (x^2 + n*x + 1)^Floor[n/2]];
    a = Table[CoefficientList[p[x, n], x], {n, 1, 12}];
    Flatten[a]

Formula

p(x,n)=If[Mod[n, 2] == 0, (x + 1)*p(x, n - 1), (x^2 + n*x + 1)^Floor[n/2]]

A171146 The sequence of coefficients of a polynomial recursion: p(x,n)=If[Mod[n, 2] == 0, (x + 1)*p(x, n - 1), (x^2 + (2*n - 1)*x + 1)^Floor[n/2]] ( correction).

Original entry on oeis.org

1, 1, 1, 1, 5, 1, 1, 6, 6, 1, 1, 18, 83, 18, 1, 1, 19, 101, 101, 19, 1, 1, 39, 510, 2275, 510, 39, 1, 1, 40, 549, 2785, 2785, 549, 40, 1, 1, 68, 1738, 19856, 86995, 19856, 1738, 68, 1, 1, 69, 1806, 21594, 106851, 106851, 21594, 1806, 69, 1, 1, 105, 4415, 93030, 985645
Offset: 1

Views

Author

Roger L. Bagula and Gary W. Adamson, Dec 04 2009

Keywords

Comments

Row sums are:
{1, 2, 7, 14, 121, 242, 3375, 6750, 130321, 260642, 6436343, 12872686...}.

Examples

			{1},
{1, 1},
{1, 5, 1},
{1, 6, 6, 1},
{1, 18, 83, 18, 1},
{1, 19, 101, 101, 19, 1},
{1, 39, 510, 2275, 510, 39, 1},
{1, 40, 549, 2785, 2785, 549, 40, 1},
{1, 68, 1738, 19856, 86995, 19856, 1738, 68, 1},
{1, 69, 1806, 21594, 106851, 106851, 21594, 1806, 69, 1},
{1, 105, 4415, 93030, 985645, 4269951, 985645, 93030, 4415, 105, 1},
{1, 106, 4520, 97445, 1078675, 5255596, 5255596, 1078675, 97445, 4520, 106, 1}
		

Crossrefs

Programs

  • Mathematica
    Clear[p, n, x, a]
    p[x, 1] := 1;
    p[x_, n_] := p[x, n] = If[Mod[n, 2] == 0, (x + 1)*p[x, n - 1], (x^2 + (2*n - 1)*x + 1)^Floor[n/2]];
    a = Table[CoefficientList[p[x, n], x], {n, 1, 12}];
    Flatten[a]

Formula

p(x,n)=If[Mod[n, 2] == 0, (x + 1)*p(x, n - 1), (x^2 + (2*n - 1)*x + 1)^Floor[n/2]]

A171147 The sequence of coefficients of a polynomial recursion: p(x,n)=If[Mod[n, 2] == 0, (x + 1)*p(x, n - 1), (x^2 + (2*n)*x + 1)^Floor[n/2]].

Original entry on oeis.org

1, 1, 1, 1, 6, 1, 1, 7, 7, 1, 1, 20, 102, 20, 1, 1, 21, 122, 122, 21, 1, 1, 42, 591, 2828, 591, 42, 1, 1, 43, 633, 3419, 3419, 633, 43, 1, 1, 72, 1948, 23544, 108870, 23544, 1948, 72, 1, 1, 73, 2020, 25492, 132414, 132414, 25492, 2020, 73, 1, 1, 110, 4845, 106920
Offset: 1

Views

Author

Roger L. Bagula and Gary W. Adamson, Dec 04 2009

Keywords

Comments

Row sums are:
{1, 2, 8, 16, 144, 288, 4096, 8192, 160000, 320000, 7962624, 15925248...}.

Examples

			{1},
{1, 1},
{1, 6, 1},
{1, 7, 7, 1},
{1, 20, 102, 20, 1},
{1, 21, 122, 122, 21, 1},
{1, 42, 591, 2828, 591, 42, 1},
{1, 43, 633, 3419, 3419, 633, 43, 1},
{1, 72, 1948, 23544, 108870, 23544, 1948, 72, 1},
{1, 73, 2020, 25492, 132414, 132414, 25492, 2020, 73, 1},
{1, 110, 4845, 106920, 1185810, 5367252, 1185810, 106920, 4845, 110, 1},
{1, 111, 4955, 111765, 1292730, 6553062, 6553062, 1292730, 111765, 4955, 111, 1}
		

Crossrefs

Programs

  • Mathematica
    Clear[p, n, x, a]
    p[x, 1] := 1;
    p[x_, n_] := p[x, n] = If[Mod[n, 2] == 0, (x + 1)*p[x, n - 1], (x^2 + (2*n)*x + 1)^Floor[n/2]];
    a = Table[CoefficientList[p[x, n], x], {n, 1, 12}];
    Flatten[a]

Formula

p(x,n)=If[Mod[n, 2] == 0, (x + 1)*p(x, n - 1), (x^2 + (2*n)*x + 1)^Floor[n/2]]
Previous Showing 21-30 of 31 results. Next