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

A133265 Diagonal of the A135356 triangle.

Original entry on oeis.org

2, 2, 2, 4, 2, 6, 2, 8, 2, 10, 2, 12, 2, 14, 2, 16, 2, 18, 2, 20, 2, 22, 2, 24, 2, 26, 2, 28, 2, 30, 2, 32, 2, 34, 2, 36, 2, 38, 2, 40, 2, 42, 2, 44, 2, 46, 2, 48, 2, 50, 2, 52, 2, 54, 2, 56, 2, 58, 2, 60, 2, 62, 2, 64, 2, 66, 2, 68, 2, 70, 2, 72, 2, 74, 2, 76, 2, 78, 2, 80
Offset: 0

Views

Author

Paul Curtz, Dec 20 2007

Keywords

Comments

Regular continued fraction expansion of 2*sin(1/2)/( cos(1/2) - sin(1/2) ) = 2.40822 34423 35827 84841 ... = 2 + 1/(2 + 1/(2 + 1/(4 + 1/(2 + 1/(6 + 1/(2 + 1/(8 + 1/(2 + ... )))))))). Cf. A019425. - Peter Bala, Feb 15 2015

Crossrefs

Cf. A019425.

Programs

  • Magma
    [(n+3+(n-1)*(-1)^(n+1))/2: n in [0..80]]; // Vincenzo Librandi, Aug 30 2011
    
  • Maple
    A133265 := n -> (n+2+(n-2)*(-1)^n)/2: # Peter Luschny, Aug 30 2011
  • Mathematica
    Table[(n + 3 + (n - 1) (-1)^(n + 1))/2, {n, 0, 79}] (* or *)
    Table[Mod[(2 n + 5), (n (3 + (-1)^n) - (-1)^n + 7)/2], {n, 0, 79}] (* or *)
    CoefficientList[Series[2 (1 + x - x^2)/((1 - x)^2*(1 + x)^2), {x, 0, 79}], x] (* Michael De Vlieger, Nov 18 2016 *)
  • PARI
    Vec(2*(1 + x - x^2) / ((1 - x)^2 * (1 + x)^2) + O(x^100)) \\ Colin Barker, Nov 17 2016

Formula

2*(A057979 without 1, 0, first two terms).
a(n) = (n+3+(n-1)*(-1)^(n+1))/2. - Vincenzo Librandi, Aug 30 2011
a(n) = (2*n + 5) mod (n*(3 + (-1)^n) - (-1)^n + 7)/2. - Lechoslaw Ratajczak, Nov 17 2016
From Colin Barker, Nov 17 2016: (Start)
a(n) = 2*a(n-2) - a(n-4) for n>3.
G.f.: 2*(1 + x - x^2) / ((1 - x)^2 * (1 + x)^2).
(End)

A140343 a(n)=4a(n-1)-7a(n-2)+6a(n-3)-3a(n-4), n>4.

Original entry on oeis.org

0, 0, 0, 0, 1, 4, 9, 14, 14, 0, -41, -122, -243, -364, -364, 0, 1093, 3280, 6561, 9842, 9842, 0, -29525, -88574, -177147, -265720, -265720, 0, 797161, 2391484, 4782969, 7174454, 7174454, 0, -21523361, -64570082, -129140163, -193710244, -193710244, 0, 581130733
Offset: 0

Views

Author

Paul Curtz, May 29 2008

Keywords

Comments

This is the main sequence representing the degenerate case of sequences which equal their sixth differences, where, besides the generic a(n)=6a(n-1)-15a(n-2)+20a(n-3)-15a(n-4)+6a(n-5), cf. A135356, there is also a shorter recurrence. Another sequence of this kind is A134581.

Crossrefs

Cf. A135356.

Programs

  • Mathematica
    Join[{0},LinearRecurrence[{4,-7,6,-3},{0,0,0,1},40]] (* Harvey P. Dale, Mar 11 2015 *)

Formula

O.g.f.: x^4/((x^2-x+1)(3x^2-3x+1)). - R. J. Mathar, Jul 10 2008

Extensions

Edited and corrected by R. J. Mathar, Jul 10 2008

A101508 Product of binomial matrix and the Mobius matrix A051731.

Original entry on oeis.org

1, 2, 1, 4, 2, 1, 8, 4, 3, 1, 16, 8, 6, 4, 1, 32, 16, 11, 10, 5, 1, 64, 32, 21, 20, 15, 6, 1, 128, 64, 42, 36, 35, 21, 7, 1, 256, 128, 85, 64, 70, 56, 28, 8, 1, 512, 256, 171, 120, 127, 126, 84, 36, 9, 1, 1024, 512, 342, 240, 220, 252, 210, 120, 45, 10, 1, 2048, 1024, 683, 496, 385, 463, 462, 330, 165, 55, 11, 1
Offset: 0

Views

Author

Paul Barry, Dec 05 2004

Keywords

Comments

Row sums are A101509. Diagonal sums are A101510.
The matrix inverse appears to be A128313. - R. J. Mathar, Mar 22 2013
Read as upper triangular matrix, this can be seen as "recurrences in A135356 applied to A023531" [Paul Curtz, Mar 03 2017]. - The columns are: A000079, A131577, A024495, A000749, A139761, ... Column n differs after the (n+1)-th nonzero term on from the binomial coefficients C(k,n). - M. F. Hasler, Mar 05 2017

Examples

			Rows begin
  1;
  2,1;
  4,2,1;
  8,4,3,1;
  16,8,6,4,1;
  ...
		

Programs

  • Maple
    A101508 := proc(n,k)
        a := 0 ;
        for i from 0 to n do
            if modp(i+1,k+1) = 0 then
                a := a+binomial(n,i) ;
            end if;
        end do:
        return a;
    end proc: # R. J. Mathar, Mar 22 2013
  • Mathematica
    t[n_, k_] := Sum[If[Mod[i + 1, k + 1] == 0, Binomial[n, i], 0], {i, 0, n}]; Table[t[n, k], {n, 0, 11}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jan 24 2014 *)
  • PARI
    T(n,k)=sum(i=0,n, if((i+1)%(k+1)==0, binomial(n, i))) \\ M. F. Hasler, Mar 05 2017

Formula

T(n, k) = Sum_{i=0..n} if(mod(i+1, k+1)=0, binomial(n, i), 0).
Rows have g.f. x^k/((1-x)^(k+1)-x^(k+1)).

A138112 a(n)=3a(n-1)-4a(n-2)+2a(n-3)-a(n-4), a(0)=a(1)=a(2)=0, a(3)=1, a(4)=3.

Original entry on oeis.org

0, 0, 0, 1, 3, 5, 5, 0, -13, -34, -55, -55, 0, 144, 377, 610, 610, 0, -1597, -4181, -6765, -6765, 0, 17711, 46368, 75025, 75025, 0, -196418, -514229, -832040, -832040, 0, 2178309, 5702887, 9227465, 9227465, 0, -24157817, -63245986, -102334155, -102334155
Offset: 0

Views

Author

Paul Curtz, May 04 2008

Keywords

Comments

Obeys also the recurrence a(n)=5a(n-1)-10a(n-2)+10a(n-3)-5a(n-4)+2a(n-5), so the sequence is identical to its fifth differences (cf. A135356). a(n) = A138110(0,n): if A138110 is interpreted as an array with five rows, this is the top row.
The first differences are represented by A100334(n-1).
The 2nd differences are represented by A103311(n).
The 3rd differences are essentially represented by -A138003(n-2).
The 4th differences are represented by -A105371(n).
A102312 contains the absolute values of the terms which occur in pairs, for example a(5)=a(6)=5=A102312(1), a(10)=a(11)= -55 = -A102312(2).
Inverse BINOMIAL transform yields two zeros followed by A105384. - R. J. Mathar, Jul 04 2008

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[x^3/(1-3x+4x^2-2x^3+x^4),{x,0,45}],x] (* or *) LinearRecurrence[{3,-4,2,-1},{0,0,0,1},45] (* Harvey P. Dale, Jun 22 2011 *)

Formula

O.g.f.: x^3/(1-3x+4x^2-2x^3+x^4). - R. J. Mathar, Jul 04 2008

Extensions

Edited and extended by R. J. Mathar, Jul 04 2008

A140344 Catalan triangle A009766 prepended by n zeros in its n-th row.

Original entry on oeis.org

1, 0, 1, 1, 0, 0, 1, 2, 2, 0, 0, 0, 1, 3, 5, 5, 0, 0, 0, 0, 1, 4, 9, 14, 14, 0, 0, 0, 0, 0, 1, 5, 14, 28, 42, 42, 0, 0, 0, 0, 0, 0, 1, 6, 20, 48, 90, 132, 132, 0, 0, 0, 0, 0, 0, 0, 1, 7, 27, 75, 165, 297, 429, 429, 0, 0, 0, 0, 0, 0, 0, 0, 1, 8, 35, 110, 275, 572, 1001, 1430, 1430
Offset: 0

Views

Author

Paul Curtz, May 29 2008

Keywords

Comments

The triangle's n-th row is also related to recurrences for sequences f(n) which p-th differences, p=n+2: The denominator of the generating function contains a factor 1-2x in these cases.
This factor may be "lifted" either by looking at auxiliary sequences f(n+1)-2f(n) or by considering the corresponding "degenerate" shorter recurrences right away. In the case p=4, the recurrence is f(n)=4f(n-1)-6f(n-2)+4f(n-3) from the 4th row in A135356, the denominator in the g.f. is 1-4x+6x^2-4x^3=(1-2x)(1-2x+2x^2), which yields the degenerate recurrence f(n)=2f(n-1)-2f(n-2) from the 2nd factor and leaves the first three coefficients of 1/(1-2x+2x^2)=1+2x+2x^2+.. in row 2.
A000749 is an example which follows the recurrence but not the degenerate recurrence, but still A000749(n+1)-2A000749(n) = 0, 0, 1, 2, 2,.. starts with the 3 coefficients. A009545 follows both recurrences and starts with the three nonzero terms because there is only a power of x in the numerator of the g.f.
In the case p=5, the recurrence is f(n)=5f(n-1)-10f(n-2)+10f(n-3)-5f(n-4)+2f(n-5), the denominator in the g.f. is 1-5x+10x^2-10x^3+5x^4-2x^5= (1-2x)(1-3x+4x^2-2x^3+x^4), where 1/(1-3x+4x^2-2x^3+x^4) = 1+3x+5x^2+5x^3+... and the 4 coefficients populate row 3.
A049016 obeys the main recurrence but not the degenerate recurrence f(n)=3f(n-1)-4f(n-2)+2f(n-3)-f(n-4), yet A049016(n+1)-2A049016(n)=1, 3, 5, 5,.. starts with the 4 coefficients. A138112 obeys both recurrences and is constructed to start with the 4 coefficients themselves.
In the nomenclature of Foata and Han, this is the doubloon polynomial triangle d_{n,m}(0), up to index shifts. - R. J. Mathar, Jan 27 2011

Examples

			Triangle starts
1;
0,1,1;
0,0,1,2,2;
0,0,0,1,3,5,5;
0,0,0,0,1,4,9,14,14;
		

Crossrefs

Cf. A135356, A130020, A139687, A140343 (p=6), A140342 (p=7).

Programs

  • Mathematica
    Table[Join[Array[0&, n], Table[Binomial[n+k, n]*(n-k+1)/(n+1), {k, 0, n}]], {n, 0, 8}] // Flatten (* Jean-François Alcover, Dec 16 2014 *)

Extensions

Edited by R. J. Mathar, Jul 10 2008

A099855 a(n) = n*2^n - 2^(n/2)*sin(Pi*n/4).

Original entry on oeis.org

0, 1, 6, 22, 64, 164, 392, 904, 2048, 4592, 10208, 22496, 49152, 106560, 229504, 491648, 1048576, 2227968, 4718080, 9960960, 20971520, 44041216, 92276736, 192940032, 402653184, 838856704, 1744822272, 3623870464, 7516192768
Offset: 0

Views

Author

Paul Barry, Oct 28 2004

Keywords

Comments

Related to binomial transform of A002265. Sequence is identical to its fourth differences (cf. A139756, A137221). See also A097064, A135035, A038504, A135356. - Paul Curtz, Jun 18 2008

Crossrefs

Binomial transform of A047538.

Programs

  • Magma
    I:=[0,1,6,22]; [n le 4 select I[n] else 6*Self(n-1) -14*Self(n-2) +16*Self(n-3) -8*Self(n-4): n in [1..51]]; // G. C. Greubel, Apr 20 2023
    
  • Mathematica
    LinearRecurrence[{6,-14,16,-8},{0,1,6,22},30] (* Harvey P. Dale, Mar 22 2018 *)
  • SageMath
    @CachedFunction
    def a(n): # a = A099855
        if (n<5): return (0,1,6,22,64)[n]
        else: return 6*a(n-1) - 14*a(n-2) + 16*a(n-3) - 8*a(n-4)
    [a(n) for n in range(51)] # G. C. Greubel, Apr 20 2023

Formula

G.f.: x/((1-2*x+2*x^2)*(1-4*x+4*x^2)).
a(n) = Sum_{k=0..n} 2^(k/2)*sin(Pi*k/4)*2^(n-k)*(n-k+1).
a(n) = 6*a(n-1) - 14*a(n-2) + 16*a(n-3) - 8*a(n-4).
a(n) = 2*A001787(n) - A009545(n).

A134658 Triangle read by rows, giving coefficients of extended Jacobsthal recurrence.

Original entry on oeis.org

3, 1, 2, 2, -1, 2, 3, -3, 1, 2, 4, -6, 4, -1, 2, 5, -10, 10, -5, 1, 2, 6, -15, 20, -15, 6, -1, 2, 7, -21, 35, -35, 21, -7, 1, 2, 8, -28, 56, -70, 56, -28, 8, -1, 2, 9, -36, 84, -126, 126, -84, 36, -9, 1, 2, 10, -45, 120, -210, 252, -210, 120, -45, 10, -1, 2
Offset: 0

Views

Author

Paul Curtz, Feb 01 2008

Keywords

Comments

Sequence identical to half its p-th differences from the second term.
This sequence is the second of a family after A135356.
This triangle looks like a Pascal's triangle without first column, and with signs and with additional right diagonal consisting of 2's. - Michel Marcus, Apr 07 2019

Examples

			Triangle begins
3;                : A000244 = 1, 3, 9, 27, ... is the main sequence
1, 2;             : A001045 = 0, 1, 1, 3, ... is the main sequence
2, -1, 2;         : 0, 0, (A007910 = 1, 2, 3, ... ) is the main sequence
3, -3, 1, 2;      : 0, 0, 0, 1, 3, 6, 10, 17, ... is the main sequence
4, -6, 4, -1, 2;  : A134987 = 0, 0, 0, 0, 1, ... is the main sequence
...
See signatures of linear recurrence of corresponding sequences.
		

Crossrefs

Cf. A000244, A001045, A007910, A134977 (sum of antidiagonals), A134987, A135356.

Programs

  • Mathematica
    T[n_, k_] := T[n, k] = Which[n == 0, 3, k == n, 2, k == 0, n, k == n-1, (-1)^k, True, T[n-1, k] - T[n-1, k-1]];
    Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Apr 06 2019 *)

Formula

Every row sums to 3. - Jean-François Alcover, Apr 04 2019 (further to a remark e-mailed by Paul Curtz).

Extensions

In agreement with author, T(0, 0) = 3 and offset 0 by Michel Marcus, Apr 06 2019

A139687 Basis of degenerate cases of sequences identical to its p-th differences. Complement to A140344 which is based on natural Catalan's triangle. Triangle without first term (probable 1) on line.

Original entry on oeis.org

1, 1, 1, 2, 2, 1, 3, 5, 5, 1, 3, 6, 9, 9, 1, 4, 10, 19, 28, 28, 1, 4, 10, 20, 34, 48, 48, 1, 5, 15, 35, 69, 117, 165, 165, 1, 5, 15, 35, 70, 125, 200, 275, 275, 1, 6, 21, 56, 126, 251, 451, 726, 1001, 1001, 1, 6, 21, 56, 126, 252, 461, 780, 1209, 1638, 1638
Offset: 0

Views

Author

Paul Curtz, Jun 13 2008

Keywords

Comments

Triangle from A140344:
(1;)
0, 1, 1;
0, 0, 1, 2, 2;
0, 0, 0, 1, 3, 5, 5; see A138112,
0, 0, 0, 0, 1, 4, 9, 14, 14; see A140343,
begins (without 0's) like a(n).

Crossrefs

Formula

First four rows of triangle from second row: 1, 1; 1, 2, 2; see A099087, 1, 3, 5, 5; 1, 3, 6, 9, 9; see A057083 which can be preceded with 3 leading 0's, are, as said, from natural Catalan's triangle A009766. Origin of a(n) explained later.

A140342 a(n)=5a(n-1)-11a(n-2)+13a(n-3)-9a(n-4)+3a(n-5)-a(n-6).

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 5, 14, 28, 42, 42, 0, -131, -417, -924, -1652, -2380, -2380, 0, 7753, 25213, 56714, 102256, 147798, 147798, 0, -479779, -1557649, -3499720, -6305992, -9112264, -9112264, 0, 29587889, 96072133, 215873462, 388991876, 562110290, 562110290, 0
Offset: 0

Views

Author

Paul Curtz, May 29 2008

Keywords

Comments

This is the main sequence representing the degenerate case of sequences which equal their seventh difference, where besides the generic a(n)=7a(n-1)-21(n-2)+35a(n-3)-35a(n-4)+21a(n-5)-7a(n-6)+2a(n-7), cf. A135356, there is also a shorter recurrence.
After the first four terms, every seventh term is zero. - Harvey P. Dale, Sep 20 2012

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{5,-11,13,-9,3,-1},{0,0,0,0,0,1},40] (* Harvey P. Dale, Sep 20 2012 *)

Formula

O.g.f.: x^5/(1-5x+11x^2-13x^3+9x^4-3x^5+x^6). - R. J. Mathar, Jul 10 2008

Extensions

Edited and extended by R. J. Mathar, Jul 10 2008

A171373 Binomial transform of A171372.

Original entry on oeis.org

1, 6, 16, 36, 76, 152, 292, 552, 1052, 2052, 4104, 8344, 17044, 34664, 69904, 139808, 278108, 552268, 1098148, 2189908, 4379816, 8776356, 17596496, 35263836, 70598516, 141197032, 282208592, 563931612, 1127077552, 2253369432, 4506738864, 9015534644
Offset: 0

Views

Author

Paul Curtz, Dec 07 2009

Keywords

Comments

The recurrence shows that the sequence and its successive differences are identical to their fifth differences (see A135356).

Programs

  • Mathematica
    LinearRecurrence[{5,-10,10,-5,2},{1,6,16,36,76},40] (* Harvey P. Dale, Dec 09 2013 *)

Formula

a(n+1)-2*a(n) = 4*A105371(n-1) = 4*A138110(4,n).
a(n) = 5*a(n-1)-10*a(n-2)+10*a(n-3)-5*a(n-4)+2*a(n-5).
G.f.: (1+x-4*x^2+6*x^3+x^4)/((1-2*x)*(x^4-2*x^3+4*x^2-3*x+1)).

Extensions

Edited and extended by R. J. Mathar, Dec 15 2009, Mar 02 2010
Showing 1-10 of 12 results. Next