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

A055802 a(n) = T(n,n-2), array T as in A055801.

Original entry on oeis.org

1, 1, 1, 2, 3, 4, 6, 7, 10, 11, 15, 16, 21, 22, 28, 29, 36, 37, 45, 46, 55, 56, 66, 67, 78, 79, 91, 92, 105, 106, 120, 121, 136, 137, 153, 154, 171, 172, 190, 191, 210, 211, 231, 232, 253, 254, 276, 277, 300, 301, 325, 326, 351, 352, 378, 379, 406, 407, 435
Offset: 2

Views

Author

Clark Kimberling, May 28 2000

Keywords

Comments

For n>2, a(n)+a(n+1) seems to be A002620(n+1)+1.

Crossrefs

Programs

  • GAP
    Concatenation([1], List([3..65], n-> (2*n^2 -6*n +11 +(-1)^n*(2*n -11))/16 )); # G. C. Greubel, Jan 23 2020
  • Magma
    [1] cat [(2*n^2 -6*n +11 +(-1)^n*(2*n -11))/16: n in [3..65]]; // G. C. Greubel, Jan 23 2020
    
  • Maple
    seq( `if`(n==2, 1, (2*n^2 -6*n +11 +(-1)^n*(2*n -11))/16), n=2..65); # G. C. Greubel, Jan 23 2020
  • Mathematica
    CoefficientList[Series[(1 -2*x^2 +x^3 +2*x^4 -x^5)/((1-x)^3*(1+x)^2), {x,0,65}], x] (* Wesley Ivan Hurt, Jan 20 2017 *)
    Table[If[n==2,1, (2*n^2 -6*n +11 +(-1)^n*(2*n -11))/16], {n,2,65}] (* G. C. Greubel, Jan 23 2020 *)
  • PARI
    Vec(x^2*(1-2*x^2+x^3+2*x^4-x^5)/((1-x)^3*(1+x)^2) + O(x^65)) \\ Charles R Greathouse IV, Feb 03 2013
    
  • PARI
    vector(65, n, my(m=n+1); if(m==2, 1, (2*m^2 -6*m +11 +(-1)^m*(2*m -11))/16)) \\ G. C. Greubel, Jan 23 2020
    
  • Sage
    [1]+[(2*n^2 -6*n +11 +(-1)^n*(2*n -11))/16 for n in (3..65)] # G. C. Greubel, Jan 23 2020
    

Formula

G.f.: x^2*(1 -2*x^2 +x^3 +2*x^4 -x^5)/((1-x)^3*(1+x)^2).
a(n) = A114220(n-1), n>=3. - R. J. Mathar, Feb 03 2013
From Colin Barker, Jan 27 2016: (Start)
a(n) = (2*n^2 +2*(-1)^n*n -6*n -11*(-1)^n +11)/16 for n>2.
a(n) = (n^2 - 2*n)/8 for n>2 and even.
a(n) = (n^2 - 4*n + 11)/8 for n odd. (End)
E.g.f.: (4*x*(x-2) + x*(x-3)*cosh(x) + (x^2 -x +11)*sinh(x))/8. - G. C. Greubel, Jan 23 2020

A165157 Zero followed by partial sums of A133622.

Original entry on oeis.org

0, 1, 3, 4, 7, 8, 12, 13, 18, 19, 25, 26, 33, 34, 42, 43, 52, 53, 63, 64, 75, 76, 88, 89, 102, 103, 117, 118, 133, 134, 150, 151, 168, 169, 187, 188, 207, 208, 228, 229, 250, 251, 273, 274, 297, 298, 322, 323, 348, 349, 375, 376, 403, 404, 432, 433, 462, 463, 493, 494, 525
Offset: 0

Views

Author

Jaroslav Krizek, Sep 05 2009

Keywords

Comments

A133622 is a toothed sequence.
Interleaving of A055998 and A034856.

Examples

			From _Stefano Spezia_, Jul 10 2020: (Start)
Illustration of the initial terms for n > 0:
o    o      o      o         o        o
     o o    o o    o o       o o      o o
            o      o         o        o
                   o o o     o o o    o o o
                             o        o
                                      o o o o
(1)  (3)   (4)    (7)       (8)      (12)
(End)
		

Crossrefs

Equals -1+A101881.
a(n) = A117142(n+2)-2 = A055802(n+6)-3 = A114220(n+5)-3 = A134519(n+3)-3.

Programs

  • Haskell
    a165157 n = a165157_list !! n
    a165157_list = scanl (+) 0 a133622_list
    -- Reinhard Zumkeller, Feb 20 2015
  • Magma
    m:=60; T:=[ 1+(1+(-1)^n)*n/4: n in [1..m] ]; [0] cat [ n eq 1 select T[1] else Self(n-1)+T[n]: n in [1..m] ]; // Klaus Brockhaus, Sep 06 2009
    
  • Magma
    [ n le 2 select n-1 else n le 4 select n else 2*Self(n-2)-Self(n-4)+1: n in [1..61] ]; // Klaus Brockhaus, Sep 06 2009
    

Formula

a(0) = 0, a(2*n) = a(2*n-1) + n + 1, a(2*n+1) = a(2*n) + 1.
a(n) = (n^2+10*n)/8 if n is even, a(n) = (n^2+8*n-1)/8 if n is odd.
a(2*k) = A055998(k) = k*(k+5)/2; a(2*k+1) = A034856(k+1) = k*(k+5)/2+1.
a(n) = 2*a(n-2)-a(n-4)+1 for n > 3; a(0)=0, a(1)=1, a(2)=3, a(3)=4. - Klaus Brockhaus, Sep 06 2009
a(n) = (2*n*(n+9)-1+(2*n+1)*(-1)^n)/16. - Klaus Brockhaus, Sep 06 2009
a(n) = n+binomial(1+floor(n/2),2). - Mircea Merca, Feb 18 2012
G.f.: x*(1+2*x-x^2-x^3)/((1-x)^3*(1+x)^2). - Klaus Brockhaus, Sep 06 2009
From Stefano Spezia, Jul 10 2020: (Start)
E.g.f.: (x*(9 + x)*cosh(x) + (-1 + 11*x + x^2)*sinh(x))/8.
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5) for n > 4. (End)

Extensions

Edited and extended by Klaus Brockhaus, Sep 06 2009

A082742 Indices of occurrences of 2 in A004738.

Original entry on oeis.org

2, 4, 6, 8, 12, 14, 20, 22, 30, 32, 42, 44, 56, 58, 72, 74, 90, 92, 110, 112, 132, 134, 156, 158, 182, 184, 210, 212, 240, 242, 272, 274, 306, 308, 342, 344, 380, 382, 420, 422, 462, 464, 506, 508, 552, 554, 600, 602, 650, 652, 702, 704, 756, 758, 812, 814, 870, 872, 930, 932, 992, 994, 1056, 1058, 1122, 1124, 1190, 1192, 1260, 1262, 1332, 1334, 1406, 1408, 1482, 1484, 1560, 1562
Offset: 1

Views

Author

Amarnath Murthy, Apr 15 2003

Keywords

Comments

Indices of occurrences of 1 in A004738 are given by A002061, b(n) = n^2 - n + 1 (the central polygonal numbers). All entries are even.

Crossrefs

Cf. A004738.

Programs

  • Maple
    A004738 := proc(n)
        local f ;
        f := floor(sqrt(n)+1/2) ;
        f+1-abs(n-1-f^2) ;
    end proc:
    for n from 1 to 1600 do
        if A004738(n) = 2 then
            printf("%d,",n) ;
        end if;
    end do: # R. J. Mathar, Feb 03 2013
  • Mathematica
    LinearRecurrence[{1,2,-2,-1,1},{2,4,6,8,12},80] (* Harvey P. Dale, Jun 16 2017 *)
  • PARI
    a(n)=(n^2+2*n+8+if(n%2,2*n-5))/4 \\ Charles R Greathouse IV, Feb 03 2013

Formula

G.f.: 2*x*(1+x-x^2-x^3+x^4)/((1+x)^2*(1-x)^3). - Charles R Greathouse IV, Feb 03 2013
a(n) = 2*A134519(n). - R. J. Mathar, Feb 03 2013

Extensions

More terms from R. J. Mathar, Feb 03 2013
Showing 1-3 of 3 results.