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

A020989 a(n) = (5*4^n - 2)/3.

Original entry on oeis.org

1, 6, 26, 106, 426, 1706, 6826, 27306, 109226, 436906, 1747626, 6990506, 27962026, 111848106, 447392426, 1789569706, 7158278826, 28633115306, 114532461226, 458129844906, 1832519379626, 7330077518506, 29320310074026, 117281240296106, 469124961184426
Offset: 0

Views

Author

Keywords

Comments

Let Zb[n](x) = polynomial in x whose coefficients are the corresponding digits of index n in base b. Then Z2[(5*4^k-2)/3](1/tau) = 1. - Marc LeBrun, Mar 01 2001
a(n)=number of derangements of [2n+2] with runs consisting of consecutive integers. E.g., a(1)=6 because the derangements of {1,2,3,4} with runs consisting of consecutive integers are 4|123, 34|12, 4|3|12, 4|3|2|1, 234|1 and 34|2|1 (the bars delimit the runs). - Emeric Deutsch, May 26 2003
Sum of n-th row of triangle of powers of 4: 1; 1 4 1; 1 4 16 4 1; 1 4 16 64 16 4 1; ... - Philippe Deléham, Feb 22 2014

Examples

			a(0) = 1;
a(1) = 1 + 4 + 1 = 6;
a(2) = 1 + 4 + 16 + 4 + 1 = 26;
a(3) = 1 + 4 + 16 + 64 + 16 + 4 + 1 = 106; etc. - _Philippe Deléham_, Feb 22 2014
		

References

  • Clifford A. Pickover, A Passion for Mathematics, John Wiley & Sons, Inc., 2005, at pp. 104 and 311 (for "Mr. Zanti's ants").

Crossrefs

A column of A119726.

Programs

Formula

a(0) = 1, a(n) = 4*a(n-1) + 2; a(n) = a(n-1)+ 5*{4^(n-1)}; - Amarnath Murthy, May 27 2001
G.f.: (1+x)/((1-4*x)*(1-x)). - Zerinvary Lajos, Jan 11 2009; adapted to offset by Philippe Deléham, Feb 22 2014
a(n) = 5*a(n-1) - 4*a(n-2), a(0) = 1, a(1) = 6. - Philippe Deléham, Feb 22 2014
a(n) = Sum_{k=0..n} A112468(n,k)*5^k. - Philippe Deléham, Feb 22 2014
a(n) = (A020988(n) + A020988(n+1))/2. - Yosu Yurramendi, Jan 23 2017
a(n) = A002450(n) + A002450(n+1). - Yosu Yurramendi, Jan 24 2017
a(n) = 10*A020988(n-1) + 6. - Yosu Yurramendi, Feb 19 2017
E.g.f.: exp(x)*(5*exp(3*x) - 2)/3. - Stefano Spezia, Apr 10 2022

A228576 A triangle formed like generalized Pascal's triangle. The rule is T(n,k) = 2*T(n-1,k-1) + T(n-1,k), the left border is n and the right border is n^2 instead of 1.

Original entry on oeis.org

0, 1, 1, 2, 3, 4, 3, 7, 10, 9, 4, 13, 24, 29, 16, 5, 21, 50, 77, 74, 25, 6, 31, 92, 177, 228, 173, 36, 7, 43, 154, 361, 582, 629, 382, 49, 8, 57, 240, 669, 1304, 1793, 1640, 813, 64, 9, 73, 354, 1149, 2642, 4401, 5226, 4093, 1690, 81, 10, 91, 500, 1857, 4940, 9685, 14028, 14545, 9876, 3461, 100
Offset: 1

Views

Author

Boris Putievskiy, Aug 26 2013

Keywords

Examples

			The start of the sequence as triangle array read by rows:
  0;
  1,  1;
  2,  3,  4;
  3,  7, 10,  9;
  4, 13, 24, 29, 16;
  5, 21, 50, 77, 74, 25;
...
		

Crossrefs

Cf. We denote generalized Pascal's like triangle with coefficients a, b and with L(n) on the left border and R(n) on the right border by (a,b,L(n),R(n)). The list of sequences for (1,1,L(n),R(n)) see A228196;
A038207 (1,2,2^n,1), A105728 (1, 2, 1, n+1), A112468 (1,-1,1,1), A112626 (1,2,3^n,1), A119258 (2,1,1,1), A119673 (3,1,1,1), A119725 (3,2,1,1), A119726 (4,2,1,1), A119727 (5,2,1,1), A209705 (2,1,n+1,0);
A002061 (column 2), A000244 (sums of rows r of triangle array - (r-2)(r+1)/2).

Programs

  • GAP
    T:= function(n,k)
        if k=0 then return n;
        elif k=n then return n^2;
        else return 2*T(n-1,k-1) + T(n-1,k);
        fi;
      end;
    Flat(List([0..12], n-> List([0..n], k-> T(n,k) ))); # G. C. Greubel, Nov 13 2019
  • Magma
    function T(n,k)
      if k eq 0 then return n;
      elif k eq n then return n^2;
      else return 2*T(n-1,k-1) + T(n-1,k);
      end if;
      return T;
    end function;
    [T(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Nov 13 2019
    
  • Maple
    T := proc(n, k) option remember;
    if k = 0 then RETURN(n) fi;
    if k = n then RETURN(n^2) fi;
    2*T(n-1, k-1) + T(n-1, k) end:
    seq(seq(T(n,k),k=0..n),n=0..9);  # Peter Luschny, Aug 26 2013
  • Mathematica
    T[n_, 0]:= n; T[n_, n_]:= n^2; T[n_, k_]:= T[n, k] = 2*T[n-1, k-1]+T[n-1, k]; Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Feb 25 2014 *)
  • PARI
    T(n,k) = if(k==0, n, if(k==n, n^2, 2*T(n-1, k-1) + T(n-1, k) )); \\ G. C. Greubel, Nov 13 2019
    
  • Sage
    @CachedFunction
    def T(n, k):
        if (k==0): return n
        elif (k==n): return n^2
        else: return 2*T(n-1,k-1) + T(n-1, k)
    [[T(n, k) for k in (0..n)] for n in (0..12)] # G. C. Greubel, Nov 13 2019
    

Formula

T(n, k) = 2*T(n-1, k-1) + T(n-1, k) for n,k >=0, with T(n,0) = n, T(n,n) = n^2.
Closed-form formula for generalized Pascal's triangle. Let a,b be any numbers. The rule is T(n, k) = a*T(n-1, k-1) + b*T(n-1, k) for n,k >0. Let L(m) and R(m) be the left border and the right border generalized Pascal's triangle, respectively.
As table read by antidiagonals T(n,k) = Sum_{m1=1..n} a^(n-m1) * b^k*R(m1)*C(n+k-m1-1,n-m1) + Sum_{m2=1..k} a^n*b^(k-m2)*L(m2)*C(n+k-m2-1,k-m2); n,k >=0.
As linear sequence a(n) = Sum_{m1=1..i} a^(i-m1)*b^j*R(m1)*C(i+j-m1-1,i-m1) + Sum_{m2=1..j} a^i*b^(j-m2)*L(m2)*C(i+j-m2-1,j-m2), where i=n-t*(t+1)/2-1, j=(t*t+3*t+4)/2-n-1, t=floor((-1+sqrt(8*n-7))/2); n>0.
Some special cases. If a=b=1, then the closed-form formula for arbitrary left and right borders of Pascal like triangle see A228196.
If a=0, then as table read by antidiagonals T(n,k)=b*R(n), as linear sequence a(n)=b*R(i), where i=n-t*(t+1)/2-1, t=floor((-1+sqrt(8*n-7))/2); n>0. The sequence a(n) is the reluctant sequence of sequence b*R(n) - a(n) is triangle array read by rows: row number k coincides with first k elements of the sequence b*R(n). Similarly for b=0, we get T(n,k)=a*L(k).
For this sequence L(m)=m and R(m)=m^2, a=2, b=1. As table read by antidiagonals T(n,k) = Sum_{m1=1..n} 2^(n-m1)*m1^2*C(n+k-m1-1,n-m1) + Sum_{m2=1..k} 2^n*m2*C(n+k-m2-1,k-m2); n,k >=0.
As linear sequence a(n) = Sum_{m1=1..i} 2^(i-m1)*m1^2*C(i+j-m1-1, i-m1) + Sum_{m2=1..j} 2^i*m2*C(i+j-m2-1,j-m2), where i=n-t*(t+1)/2-1, j=(t*t+3*t+4)/2-n-1, t=floor((-1+sqrt(8*n-7))/2); n>0.

A048487 a(n) = T(4,n), array T given by A048483.

Original entry on oeis.org

1, 6, 16, 36, 76, 156, 316, 636, 1276, 2556, 5116, 10236, 20476, 40956, 81916, 163836, 327676, 655356, 1310716, 2621436, 5242876, 10485756, 20971516, 41943036, 83886076, 167772156, 335544316, 671088636, 1342177276, 2684354556, 5368709116, 10737418236, 21474836476
Offset: 0

Views

Author

Keywords

Comments

Row sums of triangle A131113. - Gary W. Adamson, Jun 15 2007
a(n) = sum of (n+1)-th row terms of triangle A134636. This sequence is the binomial transform of 1, 5, 5, (5 continued). - Gary W. Adamson, Nov 04 2007
Row sums of triangle A135856. - Gary W. Adamson, Dec 01 2007

Crossrefs

Cf. A010716 (n-th difference of a(n), a(n-1), ..., a(0)).
Diagonal of A062001.
A column of A119726.

Programs

Formula

a(n) = 5*2^n - 4. - Henry Bottomley, May 29 2001
a(n) = 2*a(n-1) + 4 for n > 0 with a(0) = 1. - Paul Barry, Aug 25 2004
From Colin Barker, Sep 13 2012: (Start)
a(n) = 3*a(n-1) - 2*a(n-2) for n >= 2.
G.f.: (1 + 3*x)/((1 - x)*(1 - 2*x)). (End)
a(n) = A123208(2*n). - Philippe Deléham, Apr 15 2013
E.g.f.: exp(x)*(5*exp(x) - 4). - Stefano Spezia, Oct 03 2023

A119725 Triangular array read by rows: T(n,1) = T(n,n) = 1, T(n,k) = 3*T(n-1,k-1) + 2*T(n-1,k).

Original entry on oeis.org

1, 1, 1, 1, 5, 1, 1, 13, 17, 1, 1, 29, 73, 53, 1, 1, 61, 233, 325, 161, 1, 1, 125, 649, 1349, 1297, 485, 1, 1, 253, 1673, 4645, 6641, 4861, 1457, 1, 1, 509, 4105, 14309, 27217, 29645, 17497, 4373, 1, 1, 1021, 9737, 40933, 97361, 140941, 123929, 61237, 13121, 1
Offset: 1

Views

Author

Zerinvary Lajos, Jun 14 2006

Keywords

Comments

Second column is like A036563.
Second diagonal is A048473.

Examples

			Triangle begins:
  1;
  1,    1;
  1,    5,    1;
  1,   13,   17,     1;
  1,   29,   73,    53,     1;
  1,   61,  233,   325,   161,      1;
  1,  125,  649,  1349,  1297,    485,      1;
  1,  253, 1673,  4645,  6641,   4861,   1457,     1;
  1,  509, 4105, 14309, 27217,  29645,  17497,  4373,     1;
  1, 1021, 9737, 40933, 97361, 140941, 123929, 61237, 13121, 1;
		

Crossrefs

Programs

  • Magma
    function T(n,k)
      if k eq 1 or k eq n then return 1;
      else return 3*T(n-1,k-1) + 2*T(n-1,k);
      end if;
      return T;
    end function;
    [T(n,k): k in [1..n], n in [1..12]]; // G. C. Greubel, Nov 18 2019
    
  • Maple
    T:= proc(n, k) option remember;
          if k=1 and k=n then 1
        else 3*T(n-1, k-1) + 2*T(n-1, k)
          fi
        end:
    seq(seq(T(n, k), k=1..n), n=1..12); # G. C. Greubel, Nov 18 2019
  • Mathematica
    T[n_, k_]:= T[n, k]= If[k==1 || k==n, 1, 3*T[n-1, k-1] + 2*T[n-1, k]]; Table[T[n,k], {n,10}, {k,n}]//Flatten (* G. C. Greubel, Nov 18 2019 *)
  • PARI
    T(n,k) = if(k==1 || k==n, 1, 3*T(n-1,k-1) + 2*T(n-1,k)); \\ G. C. Greubel, Nov 18 2019
    
  • Sage
    @CachedFunction
    def T(n, k):
        if (k==1 or k==n): return 1
        else: return 3*T(n-1, k-1) + 2*T(n-1, k)
    [[T(n, k) for k in (1..n)] for n in (1..12)] # G. C. Greubel, Nov 18 2019

Extensions

Edited by Don Reble, Jul 24 2006

A119727 Triangular array: T(n,k) = T(n,n) = 1, T(n,k) = 5*T(n-1, k-1) + 2*T(n-1, k), read by rows.

Original entry on oeis.org

1, 1, 1, 1, 7, 1, 1, 19, 37, 1, 1, 43, 169, 187, 1, 1, 91, 553, 1219, 937, 1, 1, 187, 1561, 5203, 7969, 4687, 1, 1, 379, 4057, 18211, 41953, 49219, 23437, 1, 1, 763, 10009, 56707, 174961, 308203, 292969, 117187, 1, 1, 1531, 23833, 163459, 633457, 1491211, 2126953, 1699219, 585937, 1
Offset: 1

Views

Author

Zerinvary Lajos, Jun 14 2006

Keywords

Comments

Second column is A048488. Second diagonal is A057651.

Examples

			Triangle begins as:
  1;
  1,    1;
  1,    7,     1;
  1,   19,    37,      1;
  1,   43,   169,    187,      1;
  1,   91,   553,   1219,    937,       1;
  1,  187,  1561,   5203,   7969,    4687,       1;
  1,  379,  4057,  18211,  41953,   49219,   23437,       1;
  1,  763, 10009,  56707, 174961,  308203,  292969,  117187,      1;
  1, 1531, 23833, 163459, 633457, 1491211, 2126953, 1699219, 585937, 1;
		

References

  • TERMESZET VILAGA XI.TERMESZET-TUDOMANY DIAKPALYAZAT 133.EVF. 6.SZ. jun. 2002. Vegh Lea (and Vegh Erika): "Pascal-tipusu haromszogek" http://www.kfki.hu/chemonet/TermVil/tv2002/tv0206/tartalom.html

Crossrefs

Programs

  • Magma
    function T(n,k)
      if k eq 1 or k eq n then return 1;
      else return 5*T(n-1,k-1) + 2*T(n-1,k);
      end if;
      return T;
    end function;
    [T(n,k): k in [1..n], n in [1..12]]; // G. C. Greubel, Nov 18 2019
    
  • Maple
    T:= proc(n, k) option remember;
          if k=1 and k=n then 1
        else 5*T(n-1, k-1) + 2*T(n-1, k)
          fi
    end: seq(seq(T(n, k), k=1..n), n=1..12); # G. C. Greubel, Nov 18 2019
  • Mathematica
    T[n_, k_]:= T[n, k]= If[k==1 || k==n, 1, 5*T[n-1, k-1] + 2*T[n-1, k]]; Table[T[n,k], {n,10}, {k,n}]//Flatten (* G. C. Greubel, Nov 18 2019 *)
  • PARI
    T(n,k) = if(k==1 || k==n, 1, 5*T(n-1,k-1) + 2*T(n-1,k)); \\ G. C. Greubel, Nov 18 2019
    
  • Sage
    @CachedFunction
    def T(n, k):
        if (k==1 or k==n): return 1
        else: return 5*T(n-1, k-1) + 2*T(n-1, k)
    [[T(n, k) for k in (1..n)] for n in (1..12)] # G. C. Greubel, Nov 18 2019

Extensions

Edited by Don Reble, Jul 24 2006
Showing 1-5 of 5 results.