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

A124072 First differences of A129819.

Original entry on oeis.org

0, 1, 0, 2, 1, 3, 1, 4, 2, 5, 2, 6, 3, 7, 3, 8, 4, 9, 4, 10, 5, 11, 5, 12, 6, 13, 6, 14, 7, 15, 7, 16, 8, 17, 8, 18, 9, 19, 9, 20, 10, 21, 10, 22, 11, 23, 11, 24, 12, 25, 12, 26
Offset: 0

Views

Author

Paul Curtz, Jun 26 2007

Keywords

Comments

A129819 and its repeated differences are
0.0.1..1..3..4..7...8..12..14.19..21.27....
..0.1..0..2..1..3...1...4...2..5...2..6....
....1.-1..2.-1..2..-2...3..-2..3..-3..4....
......-2..3.-3..3..-4...5..-5..5..-6..7....
..........5.-6..6..-7...9.-10.10.-11.13...
...........-11.12.-13..16.-19.20.-21.24.-27
...............23.-25..29.-35.39.-41.45.-51
The left edge is A130668.
I discovered the array 1 1 -2 1 -3 2 in studying the singular points of planar polynomial differential systems (inspired by the reference).

Crossrefs

Programs

  • Magma
    R:=PowerSeriesRing(Integers(), 61);
    [0] cat Coefficients(R!( x*(1+x^2+x^3)/((1-x^2)*(1-x^4)) )); // G. C. Greubel, Sep 17 2024
    
  • Mathematica
    a[n_?OddQ] := (n+1)/2; a[n_?EvenQ] := Floor[n^2/16] - Floor[(n-2)^2/16]; Table[a[n], {n, 0, 51}] (* Jean-François Alcover, Aug 13 2012 *)
    LinearRecurrence[{0,1,0,1,0,-1}, {0,1,0,2,1,3}, 61] (* G. C. Greubel, Sep 17 2024 *)
  • SageMath
    def A124072_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( x*(1+x^2+x^3)/((1-x^2)*(1-x^4)) ).list()
    A124072_list(60) # G. C. Greubel, Sep 17 2024

Formula

a(2n) = A004526(n).
a(2n+1) = A000027(n+1) .
G.f.: x*(1+x^2+x^3)/((1-x)^2*(1+x)^2*(1+x^2)). - R. J. Mathar, Feb 25 2009
From G. C. Greubel, Sep 17 2024: (Start)
a(n) = (1/8)*(3*n + 1 - (-1)^n*(n + 3) + i^n*(1 + (-1)^n)).
E.g.f.: (1/4)*( cos(x) - (1-2*x)*cosh(x) + (2+x)*sinh(x) ). (End)

Extensions

Partially edited by R. J. Mathar, Jul 07 2008

A130668 Diagonal of A129819.

Original entry on oeis.org

0, 0, 1, -2, 5, -11, 23, -48, 102, -220, 476, -1024, 2184, -4624, 9744, -20480, 42976, -90048, 188352, -393216, 819328, -1704192, 3539200, -7340032, 15203840, -31456256, 65010688, -134217728, 276826112, -570429440, 1174409216
Offset: 0

Views

Author

Paul Curtz, Jun 27 2007

Keywords

Comments

This sequence is connected to A124072. To see this, change the sign of every negative term and consider the differences of every line. Hence for the second line, and following lines, the four terms form periodic sequences:
0 1 0 1 0
1 0 0 1 1
1 0 1 2 1
1 1 3 3 1
2 4 6 4 2
6 10 10 6 6
16 20 16 12 16
36 36 28 28 36
72 64 56 64 72
136 120 120 136 136
256 240 256 272 256.
The lines are connected as seen by the examples: (3rd line connected to 2nd, from right to left) 1+1=2, 1+0=1, 0+0=0, 0+1=1; (11th line connected to 10th) 136+136=272, 136+120=256, 120+120=240, 120+136=256.
The 4 columns are almost known (must the first line be suppressed?): A038503 (without the first 1), A000749 (without the first 0), A038505, A038504. Like the present sequence, every sequence of A124072 beginning with a negative number (-2, -11, ...) is a "twisted" sequence (see A129339 comments, A129961 and the present 4 columns). Periodic with period 2^n.
Inverse binomial transform of A129819. - R. J. Mathar, Feb 25 2009

Programs

  • GAP
    a:=[-2,5,-11,23];; for n in [5..30] do a[n]:=-6*a[n-1]+-14*a[n-2] -16*a[n-3]-8*a[n-4]; od; Concatenation([0,0,1], a); # G. C. Greubel, Mar 24 2019
  • Magma
    I:=[-2,5,-11,23]; [0,0,1] cat [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..30]]; // G. C. Greubel, Mar 24 2019
    
  • Mathematica
    gf = x^2*(1+x)*(1+3*x+4*x^2+3*x^3)/((1+2*x+2*x^2)*(1+2*x)^2); CoefficientList[Series[gf, {x, 0, 30}], x] (* Jean-François Alcover, Dec 16 2014, after R. J. Mathar *)
    Join[{0, 0, 1}, LinearRecurrence[{-6,-14,-16,-8}, {-2,5,-11,23}, 30]] (* Jean-François Alcover, Feb 15 2016 *)
  • PARI
    my(x='x+O('x^30)); concat([0,0], Vec(x^2*(1+x)*(1+3*x+4*x^2+3*x^3 )/((1+2*x +2*x^2)*(1+2*x)^2))) \\ G. C. Greubel, Mar 24 2019
    
  • Sage
    (x^2*(1+x)*(1+3*x+4*x^2+3*x^3)/((1+2*x+2*x^2)*(1+2*x)^2 )).series(x, 30).coefficients(x, sparse=False) # G. C. Greubel, Mar 24 2019
    

Formula

From R. J. Mathar, Feb 25 2009: (Start)
G.f.: x^2*(1+x)*(1 + 3*x + 4*x^2 + 3*x^3)/((1 + 2*x + 2*x^2)*(1+2*x)^2).
a(n) = ((-1)^n*A001787(n+1) - 4*A108520(n) + 4*A122803(n))/32, n > 2. (End)
a(n) = -6*a(n-1) - 14*a(n-2) - 16*a(n-3) - 8*a(n-4) for n >= 7. - G. C. Greubel, Mar 24 2019

Extensions

Extended by R. J. Mathar, Feb 25 2009

A057058 Let R(i,j) be the rectangle with antidiagonals 1; 2,3; 4,5,6; ...; each k is an R(i(k),j(k)) and a(n)=i(A057027(n)).

Original entry on oeis.org

1, 1, 2, 1, 3, 2, 1, 4, 2, 3, 1, 5, 2, 4, 3, 1, 6, 2, 5, 3, 4, 1, 7, 2, 6, 3, 5, 4, 1, 8, 2, 7, 3, 6, 4, 5, 1, 9, 2, 8, 3, 7, 4, 6, 5, 1, 10, 2, 9, 3, 8, 4, 7, 5, 6, 1, 11, 2, 10, 3, 9, 4, 8, 5, 7, 6, 1, 12, 2, 11, 3, 10, 4, 9, 5, 8, 6, 7, 1, 13, 2, 12, 3, 11, 4
Offset: 1

Views

Author

Clark Kimberling, Jul 30 2000

Keywords

Comments

Since A057027 is a permutation of the natural numbers, every natural number occurs infinitely many times in this sequence.
Consider the triangle TN := 1; 1, -2; 1, -3, 2; 1, -4, 2, -3; ... Antidiagonal sums give A129819(n+2). TN arises in studying the equation (E) dy/dx=Q(n,x,y)/P(n,x,y) involving saddle-points quantities, P and Q are bidimensional polynomials n=2,3,4.. . (E) leads also for instance to the one-dimension polynomials in A129326, A129587, A130679. - Paul Curtz, Aug 16 2008
First inverse function (numbers of rows) for pairing function A194982. - Boris Putievskiy, Jan 10 2013

Crossrefs

Formula

From Boris Putievskiy, Jan 10 2013: (Start)
a(n) = -((A002260(n)+1)/2)*((-1)^A002260(n)-1)/2+(A004736(n)+A002260(n)/2)*((-1)^A002260(n)+1)/2.
a(n) = -((i+1)/2)*((-1)^i-1)/2+(j+i/2)*((-1)^i+1)/2, where i = n-t*(t+1)/2, j = (t*t+3*t+4)/2-n, t = floor((-1+sqrt(8*n-7))/2). (End)

A131259 a(2*n) = A000217(n), a(2*n+1) = -2*A000217(n).

Original entry on oeis.org

0, 0, 1, -2, 3, -6, 6, -12, 10, -20, 15, -30, 21, -42, 28, -56, 36, -72, 45, -90, 55, -110, 66, -132, 78, -156, 91, -182, 105, -210, 120, -240, 136, -272, 153, -306, 171, -342, 190, -380, 210, -420, 231, -462, 253, -506, 276, -552, 300, -600, 325, -650, 351, -702, 378, -756, 406, -812, 435, -870, 465, -930, 496, -992
Offset: 0

Views

Author

Paul Curtz, Sep 28 2007

Keywords

Crossrefs

Programs

  • Magma
    A131259:= func< n | (2*(n mod 2) +2*((n+1) mod 2)*n -((n mod 2) -(-1)^n)*n^2 )/8 >;
    [A131259(n): n in [0..70]]; // G. C. Greubel, Jan 22 2025
    
  • Maple
    A000217 := proc(n) n*(n+1)/2 ; end: A131259 := proc(n) if n mod 2 = 0 then A000217(n/2) ; else -2*A000217((n-1)/2) ; fi ; end: seq(A131259(n),n=0..60) ; # R. J. Mathar, Oct 26 2007
  • Mathematica
    CoefficientList[Series[x^2*(1 - 2*x)/(1 - x^2)^3, {x,0,35}], x] (* Georg Fischer, Nov 16 2022 *)
    LinearRecurrence[{0,3,0,-3,0,1},{0,0,1,-2,3,-6},70] (* Harvey P. Dale, Jul 07 2024 *)
  • Python
    def A131259(n): return (2*(n%2) +2*((n+1)%2)*n -(3*(n%2)-1)*n**2)//8
    print([A131259(n) for n in range(71)]) # G. C. Greubel, Jan 22 2025

Formula

O.g.f.: ogf217(x^2) - 2*x*ogf217(x^2) = x^2/(1-x^2)^3 - 2*x^3/(1-x^2) = x^2*(1 - 2*x) / (1 - x^2)^3. - Georg Fischer, Nov 16 2022
From G. C. Greubel, Jan 22 2025: (Start)
a(n) = (1/16)*(2*(1-(-1)^n) + 2*(1+(-1)^n)*n - (1-3*(-1)^n)*n^2).
E.g.f.: (1/8)*(x-2)*(x*cosh(x) - (1+2*x)*sinh(x)). (End)

Extensions

More terms from R. J. Mathar, Oct 26 2007

A168316 Triangle read by rows, square of triangle A101688.

Original entry on oeis.org

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

Views

Author

Gary W. Adamson, Nov 22 2009

Keywords

Comments

Row sums = A129819 starting (1, 1, 3, 4, 7, 8, 12,...).
Eigensequence of the triangle = A168317: (1, 1, 3, 6, 16, 39, 103, 263, 690,...).

Examples

			First few rows of the triangle =
1;
0, 1;
0, 2, 1;
0, 1, 2, 1;
0, 1, 3, 2, 1;
0, 0, 2, 3, 2, 1;
0, 0, 2, 4, 3, 2, 1;
0, 0, 1, 3, 4, 3, 2, 1;
0, 0, 1, 3, 5, 4, 3, 2, 1;
0, 0, 0, 2, 4, 5, 4, 3, 2, 1;
0, 0, 0, 2, 4, 6, 5, 4, 3, 2, 1;
0, 0, 0, 1, 3, 5, 6, 5, 4, 3, 2, 1;
0, 0, 0, 1, 3, 5, 7, 6, 5, 4, 3, 2, 1;
0, 0, 0, 0, 2, 4, 6, 7, 6, 5, 4, 3, 2, 1;
0, 0, 0, 0, 2, 4, 6, 8, 7, 6, 5, 4, 3, 2, 1;
0, 0, 0, 0, 1, 3, 5, 7, 8, 7, 6, 5, 4, 3, 2, 1;
0, 0, 0, 0, 1, 3, 5, 7, 9, 8, 7, 6, 5, 4, 3, 2, 1;
0, 0, 0, 0, 0, 2, 4, 6, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1;
0, 0, 0, 0, 0, 2, 4, 6, 8, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1;
0, 0, 0, 0, 0, 1, 3, 5, 7, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1;
...
		

Crossrefs

Programs

  • Mathematica
    rows = 15; A = Array[If[#1 <= #2, 1, 0]&, {rows, rows}];
    M = Table[PadRight[Table[A[[i-j+1, j]], {j, 1, i}], rows], {i, 1, rows}];
    M2 = MatrixPower[M, 2];
    Table[M2[[i, j]], {i, 1, rows}, {j, 1, i}] // Flatten (* Jean-François Alcover, May 04 2017 *)

Formula

Triangle read by rows, (A101688)^2, as an infinite lower triangular matrix.

Extensions

Missing row inserted by Jean-François Alcover, May 04 2017

A131804 Antidiagonal sums of triangular array T: T(j,k) = -(k+1)/2 for odd k, T(j,k) = 0 for k = 0, T(j,k) = j+1-k/2 for even k > 0; 0 <= k <= j.

Original entry on oeis.org

0, 0, -1, -1, 1, 2, 1, 2, 6, 8, 7, 9, 15, 18, 17, 20, 28, 32, 31, 35, 45, 50, 49, 54, 66, 72, 71, 77, 91, 98, 97, 104, 120, 128, 127, 135, 153, 162, 161, 170, 190, 200, 199, 209, 231, 242, 241, 252, 276, 288, 287, 299, 325, 338, 337, 350, 378, 392, 391, 405, 435, 450
Offset: 0

Views

Author

Klaus Brockhaus, Jul 18 2007

Keywords

Comments

T is obtained by replacing the values of the second, fourth, sixth, ... column of the triangular array defined in A129819 by the corresponding negative values.
Interleaving of A000384, A001105, A056220 and A014107 (starting at the second term).
Main diagonal of T is in A001057, row sums are in A131805.

Examples

			First seven rows of T are
[ 0 ],
[ 0, -1 ],
[ 0, -1, 2 ],
[ 0, -1, 3, -2 ],
[ 0, -1, 4, -2, 3 ],
[ 0, -1, 5, -2, 4, -3 ],
[ 0, -1, 6, -2, 5, -3, 4 ]
		

Crossrefs

Cf. A129819, A000384 (n*(2*n-1)), A001105 (2*n^2), A056220 (2*n^2-1), A014107 (n*(2*n-3)), A001057, A131805.

Programs

  • Magma
    m:=62; M:=ZeroMatrix(IntegerRing(), m, m); for j:=1 to m do for k:=2 to j do if k mod 2 eq 0 then M[j, k]:=-k div 2; else M[j, k]:=j-(k div 2); end if; end for; end for; [ &+[ M[j-k+1, k]: k in [1..(j+1) div 2] ]: j in [1..m] ];
    
  • PARI
    {for(n=0, 61, r=n%4; k=(n-r)/4; a=if(r==0, k*(2*k-1), if(r==1, 2*k^2, if(r==2, 2*k^2-1, k*(2*k+1)-1))); print1(a, ","))}

Formula

a(0) = 0, a(1) = 0, a(2) = -1, a(3) = -1, a(4) = 1, a(5) = 2, a(6) = 1; for n > 6, a(n) = 3*a(n-1) - 5*a(n-2) + 7*a(n-3) - 7*a(n-4) + 5*a(n-5) - 3*a(n-6) + a(n-7);
G.f.: x^2*(-1+2*x-x^2+x^3)/((1-x)^3*(1+x^2)^2).

A131505 n, -1, n, 2n+2.

Original entry on oeis.org

0, -1, 0, 2, 1, -1, 1, 4, 2, -1, 2, 6, 3, -1, 3, 8, 4, -1, 4, 10, 5, -1, 5, 12, 6, -1, 6, 14, 7, -1, 7, 16, 8, -1, 8, 18, 9, -1, 9, 20, 10, -1, 10, 22, 11, -1, 11, 24, 12, -1, 12, 26, 13, -1, 13, 28, 14, -1, 14, 30, 15, -1, 15, 32, 16, -1, 16, 34, 17, -1, 17, 36, 18, -1, 18, 38, 19, -1, 19, 40, 20, -1, 20, 42, 21, -1, 21, 44, 22, -1, 22, 46, 23
Offset: 0

Views

Author

Paul Curtz, Aug 13 2007

Keywords

Comments

Based on A129819 (the first with 0 0).

Programs

  • Maple
    seq(coeff(series( (-x*(1 - 2*x + x^2 - x^3))/(1 - x + x^2 - x^3)^2, x, n+1), x, n), n = 0..40); # Georg Fischer, May 05 2021
  • Mathematica
    Flatten[Table[{n,-1,n,2n+2},{n,0,30}]] (* Harvey P. Dale, Nov 15 2011 *)

Formula

G.f.: (-x*(1 - 2*x + x^2 - x^3))/(1 - x + x^2 - x^3)^2. - Georg Fischer, May 05 2021
Showing 1-7 of 7 results.