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

A112468 Riordan array (1/(1-x), x/(1+x)).

Original entry on oeis.org

1, 1, 1, 1, 0, 1, 1, 1, -1, 1, 1, 0, 2, -2, 1, 1, 1, -2, 4, -3, 1, 1, 0, 3, -6, 7, -4, 1, 1, 1, -3, 9, -13, 11, -5, 1, 1, 0, 4, -12, 22, -24, 16, -6, 1, 1, 1, -4, 16, -34, 46, -40, 22, -7, 1, 1, 0, 5, -20, 50, -80, 86, -62, 29, -8, 1, 1, 1, -5, 25, -70, 130, -166, 148, -91, 37, -9, 1, 1, 0, 6, -30, 95, -200, 296, -314, 239, -128, 46, -10, 1
Offset: 0

Views

Author

Paul Barry, Sep 06 2005

Keywords

Comments

Row sums are A040000. Diagonal sums are A112469. Inverse is A112467. Row sums of k-th power are 1, k+1, k+1, k+1, .... Note that C(n,k) = Sum_{j=0..n-k} C(n-j-1, n-k-j).
Equals row reversal of triangle A112555 up to sign, where log(A112555) = A112555 - I. Unsigned row sums equals A052953 (Jacobsthal numbers + 1). Central terms of even-indexed rows are a signed version of A072547. Sums of squared terms in rows yields A112556, which equals the first differences of the unsigned central terms. - Paul D. Hanna, Jan 20 2006
Sum_{k=0..n} T(n,k)*x^k = A000012(n), A040000(n), A005408(n), A033484(n), A048473(n), A020989(n), A057651(n), A061801(n), A238275(n), A238276(n), A138894(n), A090843(n), A199023(n) for x = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 respectively (see the square array in A112739). - Philippe Deléham, Feb 22 2014

Examples

			Triangle starts
  1;
  1,  1;
  1,  0,  1;
  1,  1, -1,  1;
  1,  0,  2, -2,  1;
  1,  1, -2,  4, -3,  1;
  1,  0,  3, -6,  7, -4,  1;
Matrix log begins:
  0;
  1,  0;
  1,  0,  0;
  1,  1, -1,  0;
  1,  1,  1, -2,  0;
  1,  1,  1,  1, -3,  0; ...
Production matrix begins
  1,  1,
  0, -1,  1,
  0,  0, -1,  1,
  0,  0,  0, -1,  1,
  0,  0,  0,  0, -1,  1,
  0,  0,  0,  0,  0, -1,  1,
  0,  0,  0,  0,  0,  0, -1,  1.
- _Paul Barry_, Apr 08 2011
		

Crossrefs

Cf. A174294, A174295, A174296, A174297. - Mats Granvik, Mar 15 2010
Cf. A072547 (central terms), A112555 (reversed rows), A112465, A052953, A112556, A112739, A119258.
See A279006 for another version.

Programs

  • GAP
    T:= function(n,k)
        if k=0 or k=n then return 1;
        else return 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
  • Haskell
    a112468 n k = a112468_tabl !! n !! k
    a112468_row n = a112468_tabl !! n
    a112468_tabl = iterate (\xs -> zipWith (-) ([2] ++ xs) (xs ++ [0])) [1]
    -- Reinhard Zumkeller, Jan 03 2014
    
  • Magma
    function T(n,k)
      if k eq 0 or k eq n then return 1;
      else return 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 := (n,k,m) -> (1-m)^(-n+k)-m^(k+1)*pochhammer(n-k,k+1)*hypergeom( [1,n+1],[k+2],m)/(k+1)!; A112468 := (n,k) -> T(n,n-k,-1);
    seq(print(seq(simplify(A112468(n,k)),k=0..n)),n=0..10); # Peter Luschny, Jul 25 2014
  • Mathematica
    T[n_, 0] = 1; T[n_, n_] = 1; T[n_, k_ ]:= T[n, k] = T[n-1, k-1] - T[n-1, k]; Table[T[n, k], {n, 0, 12}, {k, 0, n}]//Flatten (* Jean-François Alcover, Mar 06 2013 *)
  • PARI
    {T(n,k)=local(m=1,x=X+X*O(X^n),y=Y+Y*O(Y^k)); polcoeff(polcoeff((1+(m-1)*x)*(1+m*x)/(1+m*x-x*y)/(1-x),n,X),k,Y)} \\ Paul D. Hanna, Jan 20 2006
    
  • PARI
    T(n,k) = if(k==0 || k==n, 1, T(n-1, k-1) - T(n-1, k)); \\ G. C. Greubel, Nov 13 2019
    
  • Sage
    @CachedFunction
    def T(n, k):
        if (k<0 or n<0): return 0
        elif (k==0 or k==n): return 1
        else: return 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

Triangle T(n,k) read by rows: T(n,0)=1, T(n,k) = T(n-1,k-1) - T(n-1,k). - Mats Granvik, Mar 15 2010
Number triangle T(n, k)= Sum_{j=0..n-k} C(n-j-1, n-k-j)*(-1)^(n-k-j).
G.f. of matrix power T^m: (1+(m-1)*x)*(1+m*x)/(1+m*x-x*y)/(1-x). G.f. of matrix log: x*(1-2*x*y+x^2*y)/(1-x*y)^2/(1-x). - Paul D. Hanna, Jan 20 2006
T(n, k) = R(n,n-k,-1) where R(n,k,m) = (1-m)^(-n+k)-m^(k+1)*Pochhammer(n-k,k+1)*hyper2F1([1,n+1],[k+2],m)/(k+1)!. - Peter Luschny, Jul 25 2014

A096053 a(n) = (3*9^n - 1)/2.

Original entry on oeis.org

1, 13, 121, 1093, 9841, 88573, 797161, 7174453, 64570081, 581130733, 5230176601, 47071589413, 423644304721, 3812798742493, 34315188682441, 308836698141973, 2779530283277761, 25015772549499853, 225141952945498681
Offset: 0

Views

Author

Benoit Cloitre, Jun 18 2004

Keywords

Comments

Generalized NSW numbers. - Paul Barry, May 27 2005
Counts total area under elevated Schroeder paths of length 2n+2, where area under a horizontal step is weighted 3. Case r=4 for family (1+(r-1)x)/(1-2(1+r)x+(1-r)^2*x^2). Case r=2 gives NSW numbers A002315. Fifth binomial transform of (1+8x)/(1-16x^2), A107906. - Paul Barry, May 27 2005
Primes in this sequence include: a(2) = 13, a(4) = 1093, a(7) = 797161. Semiprimes in this sequence include: a(3) = 121 = 11^2, a(5) = 9841 = 13 * 757, a(6) = 88573 = 23 * 3851, a(9) = 64570081 = 1871 * 34511, a(10) = 581130733 = 1597 * 363889, a(12) = 47071589413 = 47 * 1001523179, a(19) = 225141952945498681 = 13097927 * 17189128703.
Sum of divisors of 9^n. - Altug Alkan, Nov 10 2015

Crossrefs

Cf. A107903, A138894 ((5*9^n-1)/4).

Programs

Formula

From Paul Barry, May 27 2005: (Start)
G.f.: (1+3*x)/(1-10*x+9*x^2);
a(n) = Sum_{k=0..n} binomial(2n+1, 2k)*4^k;
a(n) = ((1+sqrt(4))*(5+2*sqrt(4))^n+(1-sqrt(4))*(5-2*sqrt(4))^n)/2. (End)
a(n-1) = (-9^n/3)*B(2n,1/3)/B(2n) where B(n,x) is the n-th Bernoulli polynomial and B(k)=B(k,0) is the k-th Bernoulli number.
a(n) = 10*a(n-1) - 9*a(n-2).
a(n) = 9*a(n-1) + 4. - Vincenzo Librandi, Nov 01 2011
a(n) = A000203(A001019(n)). - Altug Alkan, Nov 10 2015
a(n) = A320030(3^n-1). - Nathan M Epstein, Jan 02 2019

Extensions

Edited by N. J. A. Sloane, at the suggestion of Andrew S. Plewe, Jun 15 2007

A112739 Array counting nodes in rooted trees of height n in which the root and internal nodes have valency k (and the leaf nodes have valency one).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 3, 2, 1, 1, 4, 5, 2, 1, 1, 5, 10, 7, 2, 1, 1, 6, 17, 22, 9, 2, 1, 1, 7, 26, 53, 46, 11, 2, 1, 1, 8, 37, 106, 161, 94, 13, 2, 1, 1, 9, 50, 187, 426, 485, 190, 15, 2, 1, 1, 10, 65, 302, 937, 1706, 1457, 382, 17, 2, 1, 1, 11, 82, 457, 1814, 4687, 6826, 4373, 766, 19
Offset: 0

Views

Author

Paul Barry, Sep 16 2005

Keywords

Comments

Rows of the square array have g.f. (1+x)/((1-x)(1-kx)). They are the partial sums of the coordination sequences for the infinite tree of valency k. Row sums are A112740.
Rows of the square array are successively: A000012, A040000, A005408, A033484, A048473, A020989, A057651, A061801, A238275, A238276, A138894, A090843, A199023. - Philippe Deléham, Feb 22 2014

Examples

			As a square array, rows begin
1,1,1,1,1,1,... (A000012)
1,2,2,2,2,2,... (A040000)
1,3,5,7,9,11,... (A005408)
1,4,10,22,46,94,... (A033484)
1,5,17,53,161,485,... (A048473)
1,6,26,106,426,1706,... (A020989)
1,7,37,187,937,4687,... (A057651)
1,8,50,302,1814,10886,... (A061801)
As a number triangle, rows start
1;
1,1;
1,2,1;
1,3,2,1;
1,4,5,2,1;
1,5,10,7,2,1;
		

References

  • L. He, X. Liu and G. Strang, (2003) Trees with Cantor Eigenvalue Distribution. Studies in Applied Mathematics 110 (2), 123-138.
  • L. He, X. Liu and G. Strang, Laplacian eigenvalues of growing trees, Proc. Conf. on Math. Theory of Networks and Systems, Perpignan (2000).

Crossrefs

Formula

As a square array read by antidiagonals, T(n, k)=sum{j=0..k, (2-0^j)*(n-1)^(k-j)}; T(n, k)=(n(n-1)^k-2)/(n-2), n<>2, T(2, n)=2n+1; T(n, k)=sum{j=0..k, (n(n-1)^j-0^j)/(n-1)}, j<>1. As a triangle read by rows, T(n, k)=if(k<=n, sum{j=0..k, (2-0^j)*(n-k-1)^(k-j)}, 0).

A191681 a(n) = (9^n - 1)/2.

Original entry on oeis.org

0, 4, 40, 364, 3280, 29524, 265720, 2391484, 21523360, 193710244, 1743392200, 15690529804, 141214768240, 1270932914164, 11438396227480, 102945566047324, 926510094425920, 8338590849833284, 75047317648499560, 675425858836496044
Offset: 0

Views

Author

Adi Dani, Jun 11 2011

Keywords

Comments

Number of compositions of odd numbers into n parts < 9.
These are also the junctions of the Collatz trajectories of 2^(2k-1)-1 and 2^2k-1. - David Rabahy, Nov 01 2017
a(n) gives the number of turns in the n-th iteration of the Peano curve given by plotting (A163528, A163529) or by (Siromoney 1982). - Jason V. Morgan, Oct 08 2021

Examples

			a(2)=40: there are 40 compositions of odd numbers into 2 parts < 9:
1:  (0,1),(1,0);
3:  (0,3),(3,0),(1,2),(2,1);
5:  (0,5),(5,0),(1,4),(4,1),(2,3),(3,2);
7:  (0,7),(7,0),(1,6),(6,1),(2,5),(5,2),(3,4),(4,3);
9:  (1,8),(8,1),(2,7),(7,2),(3,6),(6,3),(4,5),(5,4);
11: (3,8),(8,3),(4,7),(7,4),(5,6),(6,5);
13: (5,8),(8,5),(6,7),(7,6);
15: (7,8),(8,7).
		

Crossrefs

Programs

Formula

a(0)=0, a(1)=4, a(n) = 10*a(n-1) - 9*a(n-2). - Harvey P. Dale, Jun 19 2011
G.f.: 4*x / ((x-1)*(9*x-1)). - Colin Barker, May 16 2013
a(n) = 2 * A125857(n+1) = 4 * A002452(n). - Bernard Schott, Oct 29 2021

Extensions

Example corrected by L. Edson Jeffery, Feb 13 2015

A238275 a(n) = (4*7^n - 1)/3.

Original entry on oeis.org

1, 9, 65, 457, 3201, 22409, 156865, 1098057, 7686401, 53804809, 376633665, 2636435657, 18455049601, 129185347209, 904297430465, 6330082013257, 44310574092801, 310174018649609, 2171218130547265, 15198526913830857, 106389688396816001, 744727818777712009
Offset: 0

Views

Author

Philippe Deléham, Feb 21 2014

Keywords

Comments

Sum of n-th row of triangle of powers of 7: 1; 1 7 1; 1 7 49 7 1; 1 7 49 343 49 7 1; ...
Number of cubes in the crystal structure cubic carbon CCC(n+1), defined in the Baig et al. and in the Gao et al. references. - Emeric Deutsch, May 28 2018

Examples

			a(0) = 1;
a(1) = 1 + 7 + 1 = 9;
a(2) = 1 + 7 + 49 + 7 + 1 = 65;
a(3) = 1 + 7 + 49 + 343 + 49 + 7 + 1 = 457; etc.
		

Crossrefs

Cf. Similar sequences: A151575, A000012, A040000, A005408, A033484, A048473, A020989, A057651, A061801, this sequence, A238276, A138894, A090843, A199023.

Programs

Formula

G.f.: (1+x)/((1-x)*(1-7*x)).
a(n) = 7*a(n-1) + 2, a(0) = 1.
a(n) = 8*a(n-1) - 7*a(n-2), a(0) = 1, a(1) = 9.
a(n) = Sum_{k=0..n} A112468(n,k)*8^k.
E.g.f.: exp(x)*(4*exp(6*x) - 1)/3. - Stefano Spezia, Feb 12 2025

A238276 a(n) = (9*8^n - 2)/7.

Original entry on oeis.org

1, 10, 82, 658, 5266, 42130, 337042, 2696338, 21570706, 172565650, 1380525202, 11044201618, 88353612946, 706828903570, 5654631228562, 45237049828498, 361896398627986, 2895171189023890, 23161369512191122, 185290956097528978, 1482327648780231826
Offset: 0

Views

Author

Philippe Deléham, Feb 21 2014

Keywords

Comments

Sum of n-th row of triangle of powers of 8: 1; 1 8 1; 1 8 64 8 1; 1 8 64 512 64 8 1; ...

Examples

			a(0) = 1;
a(1) = 1 + 8 + 1 = 10;
a(2) = 1 + 8 + 64 + 8 + 1 = 82;
a(3) = 1 + 8 + 64 + 512 + 64 + 8 + 1 = 658; etc.
		

Crossrefs

Cf. Similar sequences: A151575, A000012, A040000, A005408, A033484, A048473, A020989, A057651, A061801, A238275, this sequence, A138894, A090843, A199023.

Programs

Formula

G.f.: (1+x)/((1-x)*(1-8*x)).
a(n) = 8*a(n-1) + 2, a(0) = 1.
a(n) = 9*a(n-1) - 8*a(n-2), a(0) = 1, a(1) = 10.
a(n) = Sum_{k=0..n} A112468(n,k)*9^k.

Extensions

Corrected by Vincenzo Librandi, Feb 23 2014

A238303 Triangle T(n,k), 0<=k<=n, read by rows given by T(n,0) = 1, T(n,k) = 2 if k>0.

Original entry on oeis.org

1, 1, 2, 1, 2, 2, 1, 2, 2, 2, 1, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
Offset: 0

Views

Author

Philippe Deléham, Feb 24 2014

Keywords

Comments

Row sums are A005408(n).
Diagonals sums are A109613(n).
Sum_{k=0..n} T(n,k)*x^k = A033999(n), A000012(n), A005408(n), A036563(n+2), A058481(n+1), A083584(n), A137410(n), A233325(n), A233326(n), A233328(n), A211866(n+1), A165402(n+1) for x = -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 respectively.
Sum_{k=0..n} T(n,k)*x^(n-k) = A151575(n), A000012(n), A040000(n), A005408(n), A033484(n), A048473(n), A020989(n), A057651(n), A061801(n), A238275(n), A238276(n), A138894(n), A090843(n), A199023(n) for x = -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 respectively.
Sum_{k=0..n} T(n,k)^x = A000027(n+1), A005408(n), A016813(n), A017077(n) for x = 0, 1, 2, 3 respectively.
Sum_{k=0..n} k*T(n,k) = A002378(n).
Sum_{k=0..n} A000045(k)*T(n,k) = A019274(n+2).
Sum_{k=0..n} A000142(k)*T(n,k) = A066237(n+1).

Examples

			Triangle begins:
1;
1, 2;
1, 2, 2;
1, 2, 2, 2;
1, 2, 2, 2, 2;
1, 2, 2, 2, 2, 2;
1, 2, 2, 2, 2, 2, 2;
1, 2, 2, 2, 2, 2, 2, 2;
1, 2, 2, 2, 2, 2, 2, 2, 2;
1, 2, 2, 2, 2, 2, 2, 2, 2, 2;
1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2;
1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2;
...
		

Crossrefs

Cf. Diagonals: A040000.
Cf. Columns: A000012, A007395.
First differences of A001614.

Programs

Formula

T(n,0) = A000012(n) = 1, T(n+k,k) = A007395(n) = 2 for k>0.

Extensions

Data section extended to a(104) by Antti Karttunen, Jan 19 2025

A255043 a(n) = (5*9^n - 1)/2.

Original entry on oeis.org

2, 22, 202, 1822, 16402, 147622, 1328602, 11957422, 107616802, 968551222, 8716961002, 78452649022, 706073841202, 6354664570822, 57191981137402, 514727830236622, 4632550472129602, 41692954249166422, 375236588242497802, 3377129294182480222
Offset: 0

Views

Author

L. Edson Jeffery, Feb 13 2015

Keywords

Crossrefs

Programs

  • Magma
    [(5*9^n -1)/2: n in [0..20]]; // G. C. Greubel, Feb 07 2021
  • Mathematica
    Table[(5*9^n - 1)/2, {n, 0, 19}]
    LinearRecurrence[{10,-9},{2,22},20] (* Harvey P. Dale, Jun 15 2018 *)
  • Sage
    [(5*9^n -1)/2 for n in (0..20)] # G. C. Greubel, Feb 07 2021
    

Formula

G.f.: 2*(1+x)/((1-x)*(1-9*x)).
Recurrence: a(n) = 10*a(n-1) - 9*a(n-2), n>=2, a(0) = 2, a(1) = 22.
a(n) = 2*A138894(n).
E.g.f.: (5*exp(9*x) - exp(x))/2. - G. C. Greubel, Feb 07 2021

A138893 A generalized Chamberland function.

Original entry on oeis.org

0, 11, 36, 29, 8, 47, 100, 65, 16, 83, 164, 101, 24, 119, 228, 137, 32, 155, 292, 173, 40, 191, 356, 209, 48, 227, 420, 245, 56, 263, 484, 281, 64, 299, 548, 317, 72, 335, 612, 353, 80, 371, 676, 389, 88, 407, 740, 425, 96, 443, 804, 461, 104, 479, 868, 497
Offset: 0

Views

Author

Paul Barry, Apr 02 2008

Keywords

Comments

The orbit of a(n) beginning at 1 is A138894.

References

  • M. Chamberland, A Continuous Extension of the 3x+1 Problem to the Real Line, Dynamics of Continuous, Discrete and Impulsive Dynamical Systems 2(1996), 495-509.

Crossrefs

Cf. A138894.

Programs

  • Mathematica
    LinearRecurrence[{2,-3,4,-3,2,-1},{0, 11, 36, 29, 8, 47},56] (* or *) CoefficientList[Series[x(11+14x-10x^2+14x^3+7x^4)/((1-x)^2(1+x^2)^2),{x,0,55}],x] (* James C. McMahon, Jun 24 2025 *)

Formula

G.f.: x(11+14x-10x^2+14x^3+7x^4)/((1-x)^2(1+x^2)^2);
a(n) = 9n+2-(7n+2)cos(Pi*n/2);
a(n) = 6*((n/3)*(cos(Pi*n/4))^2+(2/3)*(4n+1)*(sin(Pi*n/4))^2);
a(4n) = 8n; a(4n+1) = 11+36n; a(4n+2) = 4*(9+16n); a(4n+3) = 29+36n;

Extensions

a(47)-a(55) from James C. McMahon, Jun 24 2025

A198962 5*9^n-1.

Original entry on oeis.org

4, 44, 404, 3644, 32804, 295244, 2657204, 23914844, 215233604, 1937102444, 17433922004, 156905298044, 1412147682404, 12709329141644, 114383962274804, 1029455660473244, 9265100944259204, 83385908498332844, 750473176484995604
Offset: 0

Views

Author

Vincenzo Librandi, Nov 01 2011

Keywords

Programs

  • Magma
    [5*9^n-1: n in [0..20]]
  • Mathematica
    5*9^Range[0,30]-1 (* or *) LinearRecurrence[{10,-9},{4,44},30] (* Harvey P. Dale, Oct 20 2019 *)

Formula

a(n) = 4*A138894(n).
a(n) = 9*a(n-1)+8, n>0.
a(n) = 10*a(n-1)-9*a(n-2), n>1.
G.f. ( 4+4*x ) / ( (9*x-1)*(x-1) ). - R. J. Mathar, Nov 01 2011
Showing 1-10 of 11 results. Next