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.

A099837 Expansion of (1 - x^2) / (1 + x + x^2) in powers of x.

Original entry on oeis.org

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

Views

Author

Paul Barry, Oct 27 2004

Keywords

Comments

A transform of (-1)^n.
Row sums of Riordan array ((1-x)/(1+x), x/(1+x)^2), A110162.
Let b(n) = Sum_{k=0..floor(n/2)} binomial(n-k,k)(-1)^(n-2k). Then a(n) = b(n) - b(n-2) = A049347(n) - A049347(n-2) (n > 0). The g.f. 1/(1+x) of (-1)^n is transformed to (1-x^2)/(1+x+x^2) under the mapping G(x)->((1-x^2)/(1+x^2))G(x/(1+x^2)). Partial sums of A099838.
A(n) = a(n+3) (or a(n) if a(0) is replaced by 2) appears, together with B(n) = A049347(n) in the formula 2*exp(2*Pi*n*i/3) = A(n) + B(n)*sqrt(3)*i, n >= 0, with i = sqrt(-1). See A164116 for the case N=5. - Wolfdieter Lang, Feb 27 2014

Examples

			G.f. = 1 - x - x^2 + 2*x^3 - x^4 - x^5 + 2*x^6 - x^7 - x^8 + 2*x^9 - x^10 + ...
		

Crossrefs

Programs

  • Maple
    A099837 := proc(n)
        option remember;
        if n <=2 then
            op(n+1,[1,-1,-1]) ;
        else
            -procname(n-1)-procname(n-2) ;
        end if;
    end proc:
    seq(A099837(n),n=0..80) ; # R. J. Mathar, Apr 26 2022
  • Mathematica
    a[0] = 1; a[n_] := Mod[n+2, 3] - Mod[n, 3]; A099837 = Table[a[n], {n, 0, 71}](* Jean-François Alcover, Feb 15 2012, after Michael Somos *)
    LinearRecurrence[{-1, -1}, {1, -1, -1}, 50] (* G. C. Greubel, Aug 08 2017 *)
  • Maxima
    A099837(n) := block(
            if n = 0 then 1 else [2,-1,-1][1+mod(n,3)]
    )$ /* R. J. Mathar, Mar 19 2012 */
    
  • PARI
    {a(n) = [2, -1, -1][n%3 + 1] - (n == 0)}; /* Michael Somos, Jan 19 2012 */
    
  • PARI
    Vec((1-x^2)/(1+x+x^2) + O(x^20)) \\ Felix Fröhlich, Aug 08 2017

Formula

G.f.: (1-x^2)/(1+x+x^2).
Euler transform of length 3 sequence [-1, -1, 1]. - Michael Somos, Mar 21 2011
Moebius transform is length 3 sequence [-1, 0, 3]. - Michael Somos, Mar 22 2011
a(n) = -b(n) where b(n) = A061347(n) is multiplicative with b(3^e) = -2 if e > 0, b(p^e) = 1 otherwise. - Michael Somos, Jan 19 2012
a(n) = a(-n). a(n) = c_3(n) if n > 1 where c_k(n) is Ramanujan's sum. - Michael Somos, Mar 21 2011
G.f.: (1 - x) * (1 - x^2) / (1 - x^3). a(n) = -a(n-1) - a(n-2) unless n = 0, 1, 2. - Michael Somos, Jan 19 2012
Dirichlet g.f.: Sum_{n>=1} a(n)/n^s = zeta(s)*(3^(1-s)-1). - R. J. Mathar, Apr 11 2011
a(n+3) = R(n,-1) for n >= 0, with the monic Chebyshev T-polynomials R with coefficient table A127672. - Wolfdieter Lang, Feb 27 2014
For n > 0, a(n) = 2*cos(n*Pi/3)*cos(n*Pi). - Wesley Ivan Hurt, Sep 25 2017
From Peter Bala, Apr 20 2024: (Start)
a(n) is equal to the n-th order Taylor polynomial (centered at 0) of 1/c(x)^(2*n) evaluated at x = 1, where c(x) = (1 - sqrt(1 - 4*x))/(2*x) is the o.g.f. of the Catalan numbers A000108. Cf. A333093.
Row sums of the Riordan array A110162. (End)

A240438 Greatest minimal difference between numbers of adjacent cells in a regular hexagonal honeycomb of order n with cells numbered from 1 through the total number of cells, the order n corresponding to the number of cells on one side of the honeycomb.

Original entry on oeis.org

0, 1, 5, 11, 18, 28, 40, 53, 69, 87, 106, 128, 152, 177, 205, 235, 266, 300, 336, 373, 413, 455, 498, 544, 592, 641, 693, 747, 802, 860, 920, 981, 1045, 1111, 1178, 1248, 1320, 1393, 1469, 1547, 1626, 1708, 1792, 1877, 1965, 2055, 2146, 2240, 2336, 2433, 2533, 2635
Offset: 1

Views

Author

Jörg Zurkirchen, Apr 05 2014

Keywords

Comments

Difference table of a(n), with a(0)=0 and offset=0:
0, 0, 1, 5, 11, 18, 28, 40, 53, 69, ...
0, 1, 4, 6, 7, 10, 12, 13, 16, 18, ... = A047234(n+1)
1, 3, 2, 1, 3, 2, 1, 3, 2, 1, ... = A130784
2, -1, -1, 2, -1, -1, 2, -1, -1, 2, ... = -A131713(n+1)
-3, 0, 3, -3, 0, 3, -3, 0, 3, -3; ... = A099838(n+4)
3, 3, -6, 3, 3, -6, 3, 3, -6, 3, ...
0, -9, 9, 0, -9, 9, 0, -9, 9, 0, ...
-9, 18, -9, -9, 18, -9, -9, 18, -9, -9, ...
First column: see A057682. - Paul Curtz, Nov 11 2014
Diameter of the chamber graph Γ(Alt(2n+1)). Definition of this graph:
Each vertex v is a sequence (v[1],v[2],...,v[n]) of length n, where each v[i] is a 2-subset of {1,2,...,2n+1} and v[i] and v[j] are disjoint unless i=j.
Vertices u and v are connected iff either:
u and v are identical except for their first elements u[1] and v[1], or
u and v are identical except for some i for which u[i]=v[i+1] and v[i]=u[i+1] - Tim Crinion, 17 Feb 2019

Examples

			For n = 3 an example of a honeycomb with the greatest minimal difference of a(3) = 5 is:
.         __
.      __/ 7\__
.   __/15\__/13\__
.  / 4\__/ 2\__/ 1\
.  \__/10\__/ 8\__/
.  /18\__/16\__/14\
.  \__/ 5\__/ 3\__/
.  /12\__/11\__/ 9\
.  \__/19\__/17\__/
.     \__/ 6\__/
.        \__/
.
		

References

  • 22ème Championnat des jeux mathématiques et logiques - 1/4 de finale individuels 2008, problème 18, «Les ruches d’Abella»

Crossrefs

Programs

  • Magma
    [n*(n-1)-Floor((n+1)/3): n in [1..60]]; // Vincenzo Librandi, Nov 12 2014
  • Maple
    A240438:=n->n*(n-1)-floor((n+1)/3); seq(A240438(n), n=1..50); # Wesley Ivan Hurt, Apr 08 2014
  • Mathematica
    Table[n (n - 1) - Floor[(n + 1)/3], {n, 50}] (* Wesley Ivan Hurt, Apr 08 2014 *)
    CoefficientList[Series[x (x + 1) (2 x + 1) / ((1 - x)^3 (x^2 + x + 1)), {x, 0, 60}], x] (* Vincenzo Librandi, Nov 12 2014 *)
    LinearRecurrence[{2, -1, 1, -2, 1},{0, 1, 5, 11, 18},52] (* Ray Chandler, Sep 24 2015 *)

Formula

a(n) = n*(n-1)-floor((n+1)/3).
G.f.: -x^2*(x+1)*(2*x+1) / ((x-1)^3*(x^2+x+1)). - Colin Barker, Apr 08 2014
a(n+3) = a(n) + 6*n+5. - Paul Curtz, Nov 11 2014
a(n) = n^2 - (A042965(n+1)=0, 1, 3, 4, ...). - Paul Curtz, Nov 11 2014
a(n+1) = a(n) + A047234(n+1). - Paul Curtz, Nov 11 2014

A158916 Inverse binomial transform of A153130.

Original entry on oeis.org

1, 1, 1, 1, -8, 19, -35, 64, -125, 253, -512, 1027, -2051, 4096, -8189, 16381, -32768, 65539, -131075, 262144, -524285, 1048573, -2097152, 4194307, -8388611, 16777216, -33554429, 67108861, -134217728, 268435459, -536870915, 1073741824, -2147483645
Offset: 0

Views

Author

Paul Curtz, Mar 30 2009

Keywords

Comments

a(n)= A154589(n)+ A099838(n+4).

Programs

  • Mathematica
    LinearRecurrence[{-3,-3,-2},{1,1,1,1},40] (* Harvey P. Dale, Feb 04 2019 *)

Formula

a(n)= -3a(n-1)-3a(n-2)-2a(n-3), n > 3.
G.f.: (4*x+7*x^2+9*x^3+1)/((2*x+1)*(1+x+x^2)). [R. J. Mathar, May 17 2009]

Extensions

Edited and extended by R. J. Mathar, May 17 2009

A202241 Array F(n,m) read by antidiagonals: F(0,m)=1, F(n,0) = A130713(n), and column m+1 is recursively defined as the partial sums of column m.

Original entry on oeis.org

1, 2, 1, 1, 3, 1, 0, 4, 4, 1, 0, 4, 8, 5, 1, 0, 4, 12, 13, 6, 1, 0, 4, 16, 25, 19, 7, 1, 0, 4, 20, 41, 44, 26, 8, 1, 0, 4, 24, 61, 85, 70, 34, 9, 1, 0, 4, 28, 85, 146, 155, 104, 43, 10, 1, 0, 4, 32, 113, 231, 301, 259, 147, 53, 11, 1, 0, 4, 36, 145, 344, 532, 560, 406, 200, 64, 12, 1
Offset: 0

Views

Author

Paul Curtz, Dec 16 2011

Keywords

Comments

The array F(n,m), beginning with row n=0, is:
1, 1, 1, 1, 1, 1, 1,
2, 3, 4, 5, 6, 7, 8,
1, 4, 8, 13, 19, 26, 34,
0, 4, 12, 25, 44, 70, 104,
0, 4, 16, 41, 85, 155, 259,
0, 4, 20, 61, 146, 301, 560,
0, 4, 24, 85, 231, 532, 1092.
Columns after A130713, A113311, A008574 have signatures (3,-3,1), (4,-6,4,-1), (5,-10,10,-5,1), (6,-15,20,-15,6,-1) (from A135278(n+3)).
Inserting columns of zeros and pushing the columns down, plus alternating sign switches defines the following triangle T(n,2m) = (-1)^(m/2)*F(n-2m,m):
1,
2 0,
1 0 -1,
0 0 -3 0,
0 0 -4 0 1,
0 0 -4 0 4 0,
0 0 -4 0 8 0 -1
The row sums in the triangle are (-1)^n*A099838(n).
The companion to A201863 is
1
1 0
1 0 0
1 0 -2 0
1 0 -4 0 1
1 0 -6 0 5 0
1 0 -8 0 13 0 -2
1 0 -10 0 25 0 -12 0
1 0 -12 0 41 0 -38 0 4
1 0 -14 0 61 0 -88 0 28 0
1 0 -16 0 85 0 -170 0 104 0 -8
5th column: A001844; 7th column: -A035597=-2*A005900(n+1); 9th column: 4*A006325(n+2); 11th column: -8*(1,8,34,104) (from columns 4,5,6,7 of F(n,m)).
As a triangular array, this is the Riordan array ((1+x)^2, x/(1-x)). - Philippe Deléham, Feb 21 2012

Examples

			Triangle T(n,k) begins:
  1
  2, 1
  1, 3,  1
  0, 4,  4,  1
  0, 4,  8,  5,   1
  0, 4, 12, 13,   6,   1
  0, 4, 16, 25,  19,   7,   1
  0, 4, 20, 41,  44,  26,   8,  1
  0, 4, 24, 61,  85,  70,  34,  9,  1
  0, 4, 28, 85, 146, 155, 104, 43, 10, 1
- _Philippe Deléham_, Feb 21 2012
		

Crossrefs

Cf. A130713 (column 0), A113311 (column 1), A008574 (column 2), A001844 (column 3), A005900 (column 4), A006325 (column 5), A033455 (column 6).
Cf. A267633.

Programs

  • GAP
    Flat(List([0..12],n->List([0..n],k->Binomial(n,n-k)+Binomial(n-1,n-k-1)-Binomial(n-2,n-k-2)-Binomial(n-3,n-k-3)))); # Muniru A Asiru, Mar 22 2018
  • Maple
    A130713 := proc(n)
        if n <= 2 and n >=0 then
            op(n+1,[1,2,1]) ;
        else
            0;
        end if;
    end proc:
    A202241 := proc(n,m)
        option remember;
        if n < 0 then
            0 ;
        elif m = 0 then
            A130713(n);
        else
            procname(n,m-1)+procname(n-1,m) ;
        end if;
    end proc:
    for d from 0 to 12 do
        for m from 0 to d do
            printf("%d,",A202241(d-m,m)) ;
        end do:
    end do: # R. J. Mathar, Dec 22 2011
    C := proc (n, k) if 0 <= k and k <= n then factorial(n)/(factorial(k)*factorial(n-k)) else 0 end if end proc:
    for n from 0 to 10 do
         seq(C(n, n-k) + C(n-1, n-k-1) - C(n-2, n-k-2) - C(n-3, n-k-3), k = 0..n);
    end do; # Peter Bala, Mar 20 2018
  • Mathematica
    rows = 12;
    T[0] = PadRight[{1, 2, 1}, rows];
    T[n_ /; nJean-François Alcover, Jun 29 2019 *)
  • Sage
    def Trow(n): return [binomial(n, n-k) + binomial(n-1, n-k-1) - binomial(n-2, n-k-2) - binomial(n-3, n-k-3) for k in (0..n)]
    for n in (0..9): print(Trow(n)) # Peter Luschny, Mar 21 2018
    

Formula

F(1,m) = m+2.
F(2,m) = A034856(m+1).
F(3,m) = A000297(m-1).
Sum_{m=0..d} F(d-m,m) = A116453(d-3), d >= 3 (antidiagonal sums).
As a triangular array T(n,k), 0 <= k <= n, satisfies: T(n,k) = T(n-1,k) + T(n-1,k-1) with T(0,0) = 1, T(1,0) = 2, T(2,0) = 1, T(3,0) = 0. - Philippe Deléham, Feb 21 2012
Unsigned diagonals of A267633 (beginning with its main diagonal) appear to be the reverse rows of this entry's triangle beginning with the fourth row. - Tom Copeland, Jan 26 2016
T(n,k) = C(n, n-k) + C(n-1, n-k-1) - C(n-2, n-k-2) - C(n-3, n-k-3), where C(n, k) = n!/(k!*(n-k)!) if 0 <= k <= n, otherwise 0. - Peter Bala, Mar 20 2018

A158927 a(n) = -3a(n-1) - 3a(n-2) - 2a(n-3), n > 3.

Original entry on oeis.org

2, 2, 2, -7, 11, -16, 29, -61, 128, -259, 515, -1024, 2045, -4093, 8192, -16387, 32771, -65536, 131069, -262141, 524288, -1048579, 2097155, -4194304, 8388605, -16777213, 33554432, -67108867, 134217731, -268435456, 536870909, -1073741821, 2147483648
Offset: 0

Views

Author

Paul Curtz, Mar 31 2009

Keywords

Comments

The inverse binomial transform of A153130, after dropping A153130(0).
The inverse binomial transform of the full A153130 is A158916.
Dropping two initial terms of A153130 yields A158935, dropping three yields essentially a sign-reversed version of A158916, dropping 4 essentially the sequence here.

Crossrefs

Same recurrence as A131562, A158916, A158926.

Programs

  • GAP
    a := [2,2,2,-7];; for n in [5..10^3] do a[n] := -3*a[n-1] - 3*a[n-2] - 2*a[n-3]; od; a; # Muniru A Asiru, Jan 27 2018
  • Maple
    a := proc(n) option remember: if n=0 then 2 elif n=1 then 2 elif n=2 then 2 elif n=3 then -7 elif n>=4 then -3*procname(n-1) - 3*procname(n-2) - 2*procname(n-3) fi; end:
    seq(a(n), n=0..100); # Muniru A Asiru, Jan 27 2018

Formula

a(n) = -3a(n-1) - 3a(n-2) - 2a(n-3), with a(0)=a(1)=a(2)=2, a(3)=-7.
a(n) = (-1)^(n+1)*A157823(n) - A099838(n+3).
G.f.: (2+8*x+14*x^2+9*x^3)/((2*x+1)*(1+x+x^2)). - R. J. Mathar, Apr 09 2009
a(0)=2; a(n) = (1/2)*(-2)^n - 3*cos(2*Pi*n/3) + sqrt(3)*sin(2*Pi*n/3) for n >= 1. - Richard Choulet, Apr 23 2009

Extensions

Edited and extended by R. J. Mathar, Apr 09 2009

A158935 a(n)= -3a(n-1)-3a(n-2)-2a(n-3), n>3. a(0)=4, a(1)=4, a(2)=-5, a(3)=4.

Original entry on oeis.org

4, 4, -5, 4, -5, 13, -32, 67, -131, 256, -509, 1021, -2048, 4099, -8195, 16384, -32765, 65533, -131072, 262147, -524291, 1048576, -2097149, 4194301, -8388608, 16777219, -33554435, 67108864, -134217725, 268435453, -536870912, 1073741827, -2147483651
Offset: 0

Views

Author

Paul Curtz, Mar 31 2009

Keywords

Comments

The third column of the array of differences described in A153130. The first two columns are in A158916 and A158987. Taking differences like in A158926 keeps the recurrence.
Also the inverse binomial transform of A153130 if the first two items of A153130 are omitted.

Programs

  • Mathematica
    Join[{4},LinearRecurrence[{-3,-3,-2},{4,-5,4},50]] (* Harvey P. Dale, May 25 2011 *)

Formula

a(n)= A154589(n) + A099838(n+2).
G.f.: (4+16*x+19*x^2+9*x^3)/((2*x+1)*(1+x+x^2)). - R. J. Mathar, Apr 08 2009

Extensions

Partially edited and extended by R. J. Mathar, Apr 08 2009
Edited by N. J. A. Sloane, Apr 08 2009

A349803 a(3*n) = 1 + 4*n^2, a(1+3*n) = 2 + 4*n*(n+1), a(2+3*n) = 5 + 4*n*(n+1).

Original entry on oeis.org

1, 2, 5, 5, 10, 13, 17, 26, 29, 37, 50, 53, 65, 82, 85, 101, 122, 125, 145, 170, 173, 197, 226, 229, 257, 290, 293, 325, 362, 365, 401, 442, 445, 485, 530, 533, 577, 626, 629, 677, 730, 733, 785, 842, 845, 901, 962
Offset: 0

Views

Author

Paul Curtz, Dec 01 2021

Keywords

Comments

A261327 sorted in nondecreasing order.

Crossrefs

Cf. A261327.
Trisections: A053755, A069894, A078370.

Programs

  • Mathematica
    nterms=100;LinearRecurrence[{1,0,2,-2,0,-1,1},{1,2,5,5,10,13,17},nterms] (* Paolo Xausa, Dec 01 2021 *)

Formula

a(-n) = a(n) - A099838(n+2).
a(n) = a(n-3) + 4*A004523(n-1) for n >= 3
= a(n-6) + 8*A004396(n-3) for n >= 6
= a(n-9) + 12*A004523(n-4) for n >= 9
= a(n-12) + 16*A004396(n-6) for n >= 12
...
Showing 1-7 of 7 results.