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.

Previous Showing 11-13 of 13 results.

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

A114219 Number triangle T(n,k) = (k-(k-1)*0^(n-k))*[k<=n].

Original entry on oeis.org

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

Views

Author

Paul Barry, Nov 18 2005

Keywords

Comments

Row sums are n*(n-1)/2+1 (essentially A000124). Diagonal sums are A114220. First difference triangle of A077028, when this is viewed as a number triangle.
From R. J. Mathar, Mar 22 2013: (Start)
The matrix inverse is
1;
0, 1;
0, -1, 1;
0, 1, -2, 1;
0, -2, 4, -3, 1;
0, 6, -12, 9, -4, 1;
0, -24, 48, -36, 16, -5, 1;
0, 120, -240, 180, -80, 25, -6, 1;
0, -720, 1440, -1080, 480, -150, 36, -7, 1;
... apparently related to A208058. (End)
Number of permutations of length n avoiding simultaneously the patterns 132 and 321 with k left-to-right maxima (resp., right-to-left minima). A left-to-right maximum (resp., right-to-left minimum) in a permutation p(1)p(2)...p(n) is a position i such that p(j) < p(i) for all j < i (resp., p(j) > p(i) for all j > i). - Sergey Kitaev, Nov 18 2023

Examples

			Triangle begins
  1;
  0, 1;
  0, 1, 1;
  0, 1, 2, 1;
  0, 1, 2, 3, 1;
  0, 1, 2, 3, 4, 1;
  0, 1, 2, 3, 4, 5, 1;
  0, 1, 2, 3, 4, 5, 6, 1;
  0, 1, 2, 3, 4, 5, 6, 7, 1;
  ...
		

Crossrefs

Programs

  • Maple
    A114219 := proc(n,k)
        if k < 0 or k > n then
            0;
        elif n = k then
            1;
        else
            k ;
        end if;
    end proc: # R. J. Mathar, Mar 22 2013

Formula

G.f.: (1-x-u*x + 2u*x^2)/((1-x)(1-u*x)^2), where x records length and u records left-to-right maxima (or right-to-left minima). - Sergey Kitaev, Nov 18 2023

A134519 Numbers remaining when the natural numbers (A000027) are arranged into a triangle and only the beginning and end terms of each row are retained.

Original entry on oeis.org

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, 436, 465, 466
Offset: 1

Views

Author

Rick L. Shepherd, Oct 29 2007

Keywords

Comments

Equivalently, this is TriRet(A000027,{1}) = TriRem(A000027,{2,3,4,...}), using the operations defined in A134509. Bisections are A000217-{0} and A000124-{1}. A055802 and A114220 appear to be this sequence with two and three additional leading terms, respectively.

Crossrefs

Cf. A084263: A000217(m) + (1 + (-1)^m)/2.
Cf. A117142: A000217(floor(m/2)+1) - (1 + (-1)^m)/2.

Programs

  • GAP
    a:=[];; for n in [1..60] do if n mod 2=0 then Add(a,(16+4*n+2*n^2)/16); else Add(a,(3+4*n+n^2)/8); fi; od; a; # Muniru A Asiru, Dec 21 2018
    
  • Magma
    T:=func; [T(Floor((n+1)/2))+(1+(-1)^n)/2: n in [1..60]]; // Bruno Berselli, Aug 20 2019
  • Maple
    seq(coeff(series(-x*(x^4-x^3-x^2+x+1)/((x-1)^3*(x+1)^2),x,n+1), x, n), n = 1 .. 60); # Muniru A Asiru, Dec 21 2018
  • Mathematica
    Table[Sum[If[EvenQ[k], 1, (k - 1)/2], {k, 0, n}], {n, 60}] (* Jon Maiga, Dec 21 2018 *)
    LinearRecurrence[{1,2,-2,-1,1},{1,2,3,4,6},60] (* Harvey P. Dale, Oct 13 2024 *)

Formula

From Colin Barker, Jul 17 2013: (Start)
a(n) = (16 + 4*n + 2*n^2)/16 for n even, a(n) = (3 + 4*n + n^2)/8 for n odd.
G.f.: -x*(x^4 - x^3 - x^2 + x + 1) / ((x - 1)^3*(x + 1)^2). (End)
a(n) = Sum_{k=0..n-1} A057979(k). - Jon Maiga, Dec 21 2018
a(n) = A000217(floor(n+1)/2) + (1 + (-1)^n)/2. - Bruno Berselli, Aug 20 2019
Previous Showing 11-13 of 13 results.