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

A051159 Triangle read by rows: T(n, k) = binomial(n mod 2, k mod 2) * binomial(n div 2, k div 2), where 'div' denotes integer division.

Original entry on oeis.org

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

Views

Author

Michael Somos, Oct 14 1999

Keywords

Comments

Previous name: Triangular array made of three copies of Pascal's triangle.
Computing each term modulo 2 also gives A047999, i.e., a(n) mod 2 = A007318(n) mod 2 for all n. (The triangle is paritywise isomorphic to Pascal's Triangle.) - Antti Karttunen
5th row/column gives entries of A000217 (triangular numbers C(n+1,2)) repeated twice and every other entry in 6th row/column form A000217. 7th row/column gives entries of A000292 (Tetrahedral (or pyramidal) nos: C(n+3,3)) repeated twice and every other entry in 8th row/column form A000292. 9th row/column gives entries of A000332 (binomial coefficients binomial(n,4)) repeated twice and every other entry in 10th row/column form A000332. 11th row/column gives entries of A000389 (binomial coefficients C(n,5)) repeated twice and every other entry in 12th row/column form A000389. - Gerald McGarvey, Aug 21 2004
If Sum_{k=0..n} A(k)*T(n,k) = B(n), the sequence B is the S-D transform of the sequence A. - Philippe Deléham, Aug 02 2006
Number of n-bead black-white reversible strings with k black beads; also binary grids; string is palindromic. - Yosu Yurramendi, Aug 07 2008
Row sums give A016116(n+1). - Yosu Yurramendi, Aug 07 2008 [corrected by Petros Hadjicostas, Nov 04 2017]
Coefficients in expansion of (x + y)^n where x and y anticommute (y x = -x y), that is, q-binomial coefficients when q = -1. - Michael Somos, Feb 16 2009
The sequence of coefficients of a general polynomial recursion that links at w=2 to the Pascal triangle is here w=0. Row sums are {1, 2, 2, 4, 4, 8, 8, 16, 16, 32, 32, 64, ...}. - Roger L. Bagula and Gary W. Adamson, Dec 04 2009
T(n,k) is the number of palindromic compositions of n+1 with exactly k+1 parts. T(6,4) = 3 because we have the following compositions of n+1=7 with length k+1=5: 1+1+3+1+1, 2+1+1+1+2, 1+2+1+2+1. - Geoffrey Critzer, Mar 15 2014 [corrected by Petros Hadjicostas, Nov 03 2017]
Let P(n,k) be the number of palindromic compositions of n with exactly k parts. MacMahon (1893) was the first to prove that P(n,k) = T(n-1,k-1), where T(n,k) are the numbers in this sequence (see the comment above by G. Critzer). He actually proved that, for 1 <= s <= m, we have P(2*m,2*s) = P(2*m,2*s-1) = P(2*m-1, 2*s-1) = bin(m-1, s-1), but P(2*m-1, 2*s) = 0. For the current sequence, this can be translated into T(2*m-1, 2*s-1) = T(2*m-1,2*s-2) = T(2*m-2, 2*s-2) = bin(m-1,s-1), but T(2m-2, 2*s-1) = 0 (valid again for 1 <= s <= m). - Petros Hadjicostas, Nov 03 2017
T is the infinite lower triangular matrix for this sequence; define two others, U and V; let U(n,k)=e_k(-1,2,-3,...,(-1)^n n), where e_k is the k-th elementary symmetric polynomial, and let V be the diagonal matrix A057077 (periodic sequence 1,1,-1,-1). Clearly V^-1 = V. Conjecture: U = U^-1, T = U . V, T^-1 = V . U, and |T| = |U|. - George Beck, Dec 16 2017
Let T*(n,k)=T(n,k) except when n is odd and k=(n+1)/2, where T*(n,k) = T(n,k)+2^((n-1)/2). Thus, T*(n,k) is the number of non-isomorphic symmetric stairs with n cells and k steps, i.e., k-1 changes of direction. See A016116. - Christian Barrientos and Sarah Minion, Jul 29 2018

Examples

			Triangle starts:
{1},
{1,  1},
{1,  0,  1},
{1,  1,  1,  1},
{1,  0,  2,  0,  1},
{1,  1,  2,  2,  1,  1},
{1,  0,  3,  0,  3,  0,  1},
{1,  1,  3,  3,  3,  3,  1,  1},
{1,  0,  4,  0,  6,  0,  4,  0,  1},
{1,  1,  4,  4,  6,  6,  4,  4,  1,  1},
{1,  0,  5,  0, 10,  0, 10,  0,  5,  0,  1},
{1,  1,  5,  5, 10, 10, 10, 10,  5,  5,  1,  1}
... - _Roger L. Bagula_ and _Gary W. Adamson_, Dec 04 2009
		

Crossrefs

Programs

  • Haskell
    a051159 n k = a051159_tabl !! n !! k
    a051159_row n = a051159_tabl !! n
    a051159_tabl = [1] : f [1] [1,1] where
       f us vs = vs : f vs (zipWith (+) ([0,0] ++ us) (us ++ [0,0]))
    -- Reinhard Zumkeller, Apr 25 2013
    
  • Maple
    T:= proc(n, k) option remember; `if`(n=0 and k=0, 1,
          `if`(n<0 or k<0, 0, `if`(irem(n, 2)=1 or
           irem(k, 2)=0, T(n-1, k-1) + T(n-1, k), 0)))
        end:
    seq(seq(T(n, k), k=0..n), n=0..14);  # Alois P. Heinz, Jul 12 2014
  • Mathematica
    T[ n_, k_] := QBinomial[n, k, -1]; (* Michael Somos, Jun 14 2011; since V7 *)
    Clear[p, n, x, a]
    w = 0;
    p[x, 1] := 1;
    p[x_, n_] := p[x, n] = If[Mod[n, 2] == 0, (x + 1)*p[x, n - 1], (x^2 + w*x + 1)^Floor[n/2]]
    a = Table[CoefficientList[p[x, n], x], {n, 1, 12}]
    Flatten[a] (* Roger L. Bagula and Gary W. Adamson, Dec 04 2009 *)
  • PARI
    {T(n, k) = binomial(n%2, k%2) * binomial(n\2, k\2)};
    
  • Python
    from math import comb as binomial
    def T(n, k): return binomial(n%2, k%2) * binomial(n//2, k//2)
    print([T(n, k) for n in range(14) for k in range(n+1)])  # Peter Luschny, Oct 17 2024
  • SageMath
    @cached_function
    def T(n, k):
        if k == 0 or k == n: return 1
        return T(n-1, k-1) + (-1)^k*T(n-1, k)
    for n in (0..12): print([T(n, k) for k in (0..n)]) # Peter Luschny, Jul 06 2021
    

Formula

T(n, k) = T(n-1, k-1) + T(n-1, k) if n odd or k even, else 0. T(0, 0) = 1.
T(n, k) = T(n-2, k-2) + T(n-2, k). T(0, 0) = T(1, 0) = T(1, 1) = 1.
Square array made by setting first row/column to 1's (A(i, 0) = A(0, j) = 1); A(1, 1) = 0; A(1, j) = A(1, j-2); A(i, 1) = A(i-2, 1); other entries A(i, j) = A(i-2, j) + A(i, j-2). - Gerald McGarvey, Aug 21 2004
Sum_{k=0..n} k * T(n,k) = A093968(n); A093968 = S-D transform of A001477. - Philippe Deléham, Aug 02 2006
Equals 2*A034851 - A007318. - Gary W. Adamson, Dec 31 2007. [Corrected by Yosu Yurramendi, Aug 07 2008]
A051160(n, k) = (-1)^floor(k/2) * T(n, k).
Sum_{k = 0..n} T(n,k)*x^k = A000012(n), A016116(n+1), A056487(n), A136859(n+2) for x = 0, 1, 2, 3 respectively. - Philippe Deléham, Mar 11 2014
G.f.: (1+x+x*y)/(1-x^2-y^2*x^2). - Philippe Deléham, Mar 11 2014
For n,k >= 1, T(n, k) = 0 when n odd and k even; otherwise, T(n, k) = binomial(floor((n-1)/2), floor((k-1)/2)). - Christian Barrientos, Mar 14 2020
From Werner Schulte, Jun 25 2021: (Start)
T(n,k) = T(n-1,k-1) + (-1)^k * T(n-1,k) for 0 < k < n with initial values T(n,0) = T(n,n) = 1 for n >= 0.
Matrix inverse is T^-1(n,k) = (-1)^((n-k)*(n+k+1)/2) * T(n,k) for 0 <= k <= n. (End)
From Peter Bala, Aug 08 2021: (Start)
Double Riordan array ( 1/(1 - x); x/(1 + x), x/(1 - x) ) in the notation of Davenport et al.
G.f. for column 2*n: (1 + x)*x^(2*n)/(1 - x^2)^(n+1); G.f. for column 2*n+1: x^(2*n+1)/(1 - x^2)^(n+1)
Row polynomials: R(2*n,x) = (1 + x^2)^n; R(2*n+1,x) = (1 + x)*(1 + x^2)^n.
The infinitesimal generator of this triangle has the sequence [1, 0, 1, 0, 1, 0, ...] on the main subdiagonal, the sequence [1, 1, 2, 2, 3, 3, 4, 4, ...] on the diagonal immediately below and zeros elsewhere.
Let T denote this lower triangular array. Then T^a, for a in C, is the double Riordan array ( (1 + a*x)/(1 - a*x^2); x/(1 + a*x), (1 + a*x)/(1 - a*x^2) ) with o.g.f. (1 + x*(a + y))/(1 - x^2*(a + y^2)) = 1 + (a + y)*x + (a + y^2)*x^2 + (a^2 + a*y + a*y^2 + y^3)*x^3 + (a^2 + 2*a*y^2 + y^4)*x^4 + ....
The (2*n)-th row polynomial of T^a is (a + y^2)^n; The (2*n+1)-th row polynomial of T^a is (a + y)*(a + y^2)^n. (End)

Extensions

New name using a formula of the author by Peter Luschny, Oct 17 2024

A093967 a(n) = n * Pell(n).

Original entry on oeis.org

0, 1, 4, 15, 48, 145, 420, 1183, 3264, 8865, 23780, 63151, 166320, 434993, 1130948, 2925375, 7533312, 19323713, 49395780, 125877071, 319888560, 810893265, 2050891876, 5176349663, 13040153280, 32793453025, 82337215012, 206424991215
Offset: 0

Views

Author

Paul Barry, Apr 21 2004

Keywords

Comments

Binomial transform of A093968.

Crossrefs

Programs

  • Magma
    I:=[0,1,4,15]; [n le 4 select I[n] else 4*Self(n-1)-2*Self(n-2)-4*Self(n-3)-Self(n-4): n in [1..40]]; // Vincenzo Librandi, Dec 20 2015
    
  • Maple
    seq(fibonacci(n,2)*n, n=0..27); # Zerinvary Lajos, Apr 05 2008
  • Mathematica
    LinearRecurrence[{4,-2,-4,-1}, {0,1,4,15}, 30] (* Vincenzo Librandi, Dec 20 2015 *)
  • PARI
    { default(realprecision, 100); s=sqrt(2); for (n=0, 100, a=n*round(((1+s)^n-(1-s)^n)/(2*s)); write("b093967.txt", n, " ", a); ) } \\ Harry J. Smith, Jun 17 2009
    
  • Sage
    [n*lucas_number1(n,2,-1) for n in (0..30)] # G. C. Greubel, Dec 28 2021

Formula

G.f.: x*(1+x^2)/(1 - 2*x - x^2)^2;
a(n) = n*((1+sqrt(2))^n - (1-sqrt(2))^n)/(2*sqrt(2));
a(n) = n * A000129(n).

A090932 a(n) = n! / 2^floor(n/2).

Original entry on oeis.org

1, 1, 1, 3, 6, 30, 90, 630, 2520, 22680, 113400, 1247400, 7484400, 97297200, 681080400, 10216206000, 81729648000, 1389404016000, 12504636144000, 237588086736000, 2375880867360000, 49893498214560000, 548828480360160000, 12623055048283680000, 151476660579404160000
Offset: 0

Views

Author

Jon Perry, Feb 26 2004

Keywords

Comments

Number of permutations of the n-th row of Pascal's triangle.
Can be seen as the multiplicative equivalent to the generalized pentagonal numbers. - Peter Luschny, Oct 13 2012
a(n) is the number of permutations of [n] in which all ascents start at an even position. For example, a(3) = 3 counts 213, 312, 321. - David Callan, Nov 25 2021

Examples

			From _Rigoberto Florez_, Apr 07 2017: (Start)
a(5) = 5!/2^2 = 120/4 = 30.
a(6) = 6!/2^3 = 1*6*15 = 90.
a(7) = 7!/2^3 = 3*10*21 = 630. (End)
		

Crossrefs

The function appears in several expansions: A009775, A046979, A046981, A007415, A007452.

Programs

  • Magma
    [Factorial(n) / 2^Floor(n/2): n in [0..25]]; // Vincenzo Librandi, May 14 2011
    
  • Maple
    a:= n-> n!/2^floor(n/2): seq(a(n), n=0..40);
  • Mathematica
    Table[n!/2^Floor[n/2], {n, 0, 21}] (* Michael De Vlieger, Jul 25 2016 *)
    nxt[{n_,a_,b_}]:={n+1,b,a Binomial[n,2]}; NestList[nxt,{2,1,1},30][[All,2]] (* Harvey P. Dale, Aug 26 2022 *)
  • PARI
    a(n)=n!/2^floor(n/2)
    
  • Python
    from math import factorial
    def A090932(n): return factorial(n)>>(n>>1) # Chai Wah Wu, Jan 18 2023
  • Sage
    @CachedFunction
    def A090932(n):
        if n == 0 : return 1
        fact = n//2 if is_even(n) else n
        return fact * A090932(n-1)
    [A090932(n) for n in (0..21)] # Peter Luschny, Oct 13 2012
    

Formula

a(n) = binomial(n-1, 2) * a(n-2).
E.g.f.: (1+x)/(1-1/2*x^2).
E.g.f.: G(0) where G(k) = 1 + x/(1 - x/(x + 2/G(k+1) )) ; (continued fraction, 3-step). - Sergei N. Gladkovskii, Nov 27 2012
G.f.: G(0), where G(k)= 1 + (2*k+1)*x/(1 - x*(k+1)/(x*(k+1) + 1/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Jun 28 2013
a(n) = (n+1)!/A093968(n+1). - Anton Zakharov, Jul 25 2016
a(n) ~ sqrt(2*Pi*n)*exp(-n)*n^n/2^floor(n/2). - Ilya Gutkovskiy, Jul 25 2016
From Rigoberto Florez, Apr 07 2017: (Start)
if n=2k, n! / 2^k = t(1)t(3)t(5)...t(2k-1),
if n=2k+1, n! / 2^k = t(2)t(4)t(6)...t(2k),
if n=2k, n! / 2^k = (t(k)-t(0))*(t(k)-t(1))*...*(t(k)-t(k-1)),
with t(i)= i-th triangular number. (End)
From Amiram Eldar, Feb 25 2022: (Start)
Sum_{n>=0} 1/a(n) = cosh(sqrt(2)) + sinh(sqrt(2))/sqrt(2).
Sum_{n>=0} (-1)^n/a(n) = cosh(sqrt(2)) - sinh(sqrt(2))/sqrt(2). (End)

Extensions

Edited by Ralf Stephan, Sep 07 2004

A132314 a(n) = n*2^floor((n+1)/2).

Original entry on oeis.org

0, 2, 4, 12, 16, 40, 48, 112, 128, 288, 320, 704, 768, 1664, 1792, 3840, 4096, 8704, 9216, 19456, 20480, 43008, 45056, 94208, 98304, 204800, 212992, 442368, 458752, 950272, 983040, 2031616, 2097152, 4325376, 4456448, 9175040, 9437184, 19398656, 19922944, 40894464
Offset: 0

Views

Author

Simon Plouffe, Nov 19 2007

Keywords

Crossrefs

Programs

  • Maple
    seq(n*2^(floor((n+1)/2)),n=0..120);
  • Mathematica
    LinearRecurrence[{0,4,0,-4}, {0, 2, 4, 12}, 50] (* G. C. Greubel, May 30 2016 *)

Formula

a(n) = 2*A093968(n).
From Chai Wah Wu, May 30 2016: (Start)
a(n) = 4*a(n-2) - 4*a(n-4) for n > 3.
G.f.: 2*x*(2*x^2 + 2*x + 1)/(2*x^2 - 1)^2. (End)
E.g.f.: x*(2*cosh(sqrt(2)*x) + sqrt(2)*sinh(sqrt(2)*x)). - G. C. Greubel, May 30 2016
Sum_{n>=1} 1/a(n) = log(2)/2 + log(1+sqrt(2))/sqrt(2). - Amiram Eldar, Feb 13 2023

A135838 Triangle read by rows: T(n,k) = 2^floor(n/2)*binomial(n-1,k-1).

Original entry on oeis.org

1, 2, 2, 2, 4, 2, 4, 12, 12, 4, 4, 16, 24, 16, 4, 8, 40, 80, 80, 40, 8, 8, 48, 120, 160, 120, 48, 8, 16, 112, 336, 560, 560, 336, 112, 16, 16, 128, 448, 896, 1120, 896, 448, 128, 16, 32, 288, 1152, 2688, 4032, 4032, 2688, 1152, 288, 32
Offset: 1

Views

Author

Gary W. Adamson, Dec 01 2007

Keywords

Examples

			First few rows of the triangle are:
  1;
  2,  2;
  2,  4,  2;
  4, 12, 12,  4;
  4, 16, 24, 16,  4;
  8, 40, 80, 80, 40, 8;
  ...
		

Crossrefs

Programs

  • Maple
    A135838 := proc(n,k)
        2^floor(n/2)*binomial(n-1,k-1) ;
    end proc:
    seq(seq( A135838(n,k),k=1..n),n=1..10) ; # R. J. Mathar, Aug 15 2022
  • Mathematica
    T[n_, k_]:= 2^Floor[n/2]*Binomial[n-1, k-1];
    Table[T[n, k], {n,12}, {k,n}] //Flatten (* G. C. Greubel, Feb 07 2022 *)
  • PARI
    A(n,k) = 2^(n\2)*binomial(n-1,k-1);
    concat(vector(10, n, vector(n, k, A(n,k))))  \\ Gheorghe Coserea, May 18 2016
    
  • Sage
    flatten([[2^(n//2)*binomial(n-1, k-1) for k in (1..n)] for n in (1..12)]) # G. C. Greubel, Feb 07 2022

Formula

M * Pascal's triangle as infinite lower triangular matrices, where M = a triangle with (1, 2, 2, 4, 4, 8, 8, 16, 16, ...) in the main diagonal and the rest zeros.
Sum_{k=1..n} T(n, k) = A094015(n-1).
From G. C. Greubel, Feb 07 2022: (Start)
T(n, n-k) = T(n, k).
T(n, 1) = A016116(n).
T(n, 2) = 2*A093968(n-1).
T(2*n-1, n) = A059304(n-1).
T(2*n, n) = 2*A069720(n). (End)

A356639 Number of integer sequences b with b(1) = 1, b(m) > 0 and b(m+1) - b(m) > 0, of length n which transform under the map S into a nonnegative integer sequence. The transform c = S(b) is defined by c(m) = Product_{k=1..m} b(k) / Product_{k=2..m} (b(k) - b(k-1)).

Original entry on oeis.org

1, 1, 3, 17, 155, 2677, 73327, 3578339, 329652351
Offset: 1

Views

Author

Thomas Scheuerle, Aug 19 2022

Keywords

Comments

This sequence can be calculated by a recursive algorithm:
Let B1 be an array of finite length, the "1" denotes that it is the first generation. Let B1' be the reversed version of B1. Let C be the element-wise product C = B1 * B1'. Then B2 is a concatenation of taking each element of B1 and add all divisors of the corresponding element in C. If we start with B1 = {1} then we get this sequence of arrays: B2 = {2}, B3 = {3, 4, 6}, ... . a(n) is the length of the array Bn. In short the length of Bn+1 and so a(n+1) is the sum over A000005(Bn * Bn').
The transform used in the definition of this sequence is its own inverse, so if c = S(b) then b = S(c). The eigensequence is 2^n = S(2^n).
There exist some transformation pairs of infinite sequences in the database:
A026549 <--> A038754; A100071 <--> A001405; A058295 <--> A------;
A111286 <--> A098011; A093968 <--> A205825; A166447 <--> A------;
A079352 <--> A------; A082458 <--> A------; A008233 <--> A264635;
A138278 <--> A------; A006501 <--> A264557; A336496 <--> A------;
A019464 <--> A------; A062112 <--> A------; A171647 <--> A359039;
A279312 <--> A------; A031923 <--> A------.
These transformation pairs are conjectured:
A137326 <--> A------; A066332 <--> A300902; A208147 <--> A308546;
A057895 <--> A------; A349080 <--> A------; A019442 <--> A------;
A349079 <--> A------.
("A------" means not yet in the database.)
Some sequences in the lists above may need offset adjustment to force a beginning with 1,2,... in the transformation.
If we allowed signed rational numbers, further interesting transformation pairs could be observed. For example, 1/n will transform into factorials with alternating sign. 2^(-n) transforms into ones with alternating sign and 1/A000045(n) into A000045 with alternating sign.

Examples

			a(4) = 17. The 17 transformation pairs of length 4 are:
  {1, 2, 3, 4}  = S({1, 2, 6, 24}).
  {1, 2, 3, 5}  = S({1, 2, 6, 15}).
  {1, 2, 3, 6}  = S({1, 2, 6, 12}).
  {1, 2, 3, 9}  = S({1, 2, 6, 9}).
  {1, 2, 3, 12} = S({1, 2, 6, 8}).
  {1, 2, 3, 21} = S({1, 2, 6, 7}).
  {1, 2, 4, 5}  = S({1, 2, 4, 20}).
  {1, 2, 4, 6}  = S({1, 2, 4, 12}).
  {1, 2, 4, 8}  = S({1, 2, 4, 8}).
  {1, 2, 4, 12} = S({1, 2, 4, 6}).
  {1, 2, 4, 20} = S({1, 2, 4, 5}).
  {1, 2, 6, 7}  = S({1, 2, 3, 21}).
  {1, 2, 6, 8}  = S({1, 2, 3, 12}).
  {1, 2, 6, 9}  = S({1, 2, 3, 9}).
  {1, 2, 6, 12} = S({1, 2, 3, 6}).
  {1, 2, 6, 15} = S({1, 2, 3, 5}).
  {1, 2, 6, 24} = S({1, 2, 3, 4}).
b(1) = 1 by definition, b(2) = 1+1 as 1 has only 1 as divisor.
a(3) = A000005(b(2)*b(2)) = 3.
The divisors of b(2) are 1,2,4. So b(3) can be b(2)+1, b(2)+2 and b(2)+4.
a(4) = A000005((b(2)+1)*(b(2)+4)) + A000005((b(2)+2)*(b(2)+2)) + A000005((b(2)+4)*(b(2)+1)) = 17.
		

Crossrefs

Showing 1-6 of 6 results.