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

A139601 Square array of polygonal numbers read by ascending antidiagonals: T(n, k) = (n + 1)*(k - 1)*k/2 + k.

Original entry on oeis.org

0, 0, 1, 0, 1, 3, 0, 1, 4, 6, 0, 1, 5, 9, 10, 0, 1, 6, 12, 16, 15, 0, 1, 7, 15, 22, 25, 21, 0, 1, 8, 18, 28, 35, 36, 28, 0, 1, 9, 21, 34, 45, 51, 49, 36, 0, 1, 10, 24, 40, 55, 66, 70, 64, 45, 0, 1, 11, 27, 46, 65, 81, 91, 92, 81, 55, 0, 1, 12, 30, 52, 75, 96, 112, 120, 117, 100, 66
Offset: 0

Views

Author

Omar E. Pol, Apr 27 2008

Keywords

Comments

A general formula for polygonal numbers is P(n,k) = (n-2)(k-1)k/2 + k, where P(n,k) is the k-th n-gonal number. - Omar E. Pol, Dec 21 2008

Examples

			The square array of polygonal numbers begins:
========================================================
Triangulars .. A000217: 0, 1,  3,  6, 10,  15,  21,  28,
Squares ...... A000290: 0, 1,  4,  9, 16,  25,  36,  49,
Pentagonals .. A000326: 0, 1,  5, 12, 22,  35,  51,  70,
Hexagonals ... A000384: 0, 1,  6, 15, 28,  45,  66,  91,
Heptagonals .. A000566: 0, 1,  7, 18, 34,  55,  81, 112,
Octagonals ... A000567: 0, 1,  8, 21, 40,  65,  96, 133,
9-gonals ..... A001106: 0, 1,  9, 24, 46,  75, 111, 154,
10-gonals .... A001107: 0, 1, 10, 27, 52,  85, 126, 175,
11-gonals .... A051682: 0, 1, 11, 30, 58,  95, 141, 196,
12-gonals .... A051624: 0, 1, 12, 33, 64, 105, 156, 217,
And so on ..............................................
========================================================
		

Crossrefs

Sequences of m-gonal numbers: A000217 (m=3), A000290 (m=4), A000326 (m=5), A000384 (m=6), A000566 (m=7), A000567 (m=8), A001106 (m=9), A001107 (m=10), A051682 (m=11), A051624 (m=12), A051865 (m=13), A051866 (m=14), A051867 (m=15), A051868 (m=16), A051869 (m=17), A051870 (m=18), A051871 (m=19), A051872 (m=20), A051873 (m=21), A051874 (m=22), A051875 (m=23), A051876 (m=24), A255184 (m=25), A255185 (m=26), A255186 (m=27), A161935 (m=28), A255187 (m=29), A254474 (m=30).

Programs

  • Magma
    T:= func< n,k | k*((n+1)*(k-1) +2)/2 >;
    A139601:= func< n,k | T(n-k, k) >;
    [A139601(n,k): k in  [0..n], n in [0..12]]; // G. C. Greubel, Jul 12 2024
    
  • Mathematica
    T[n_, k_] := (n + 1)*(k - 1)*k/2 + k; Table[ T[n - k, k], {n, 0, 11}, {k, 0, n}] // Flatten (* Robert G. Wilson v, Jul 12 2009 *)
  • SageMath
    def T(n,k): return k*((n+1)*(k-1)+2)/2
    def A139601(n,k): return T(n-k, k)
    flatten([[A139601(n,k) for k in range(n+1)] for n in range(13)]) # G. C. Greubel, Jul 12 2024

Formula

T(n,k) = A086270(n,k), k>0. - R. J. Mathar, Aug 06 2008
T(n,k) = (n+1)*(k-1)*k/2 +k, n>=0, k>=0. - Omar E. Pol, Jan 07 2009
From G. C. Greubel, Jul 12 2024: (Start)
t(n, k) = (k/2)*( (k-1)*(n-k+1) + 2), where t(n,k) is this array read by rising antidiagonals.
t(2*n, n) = A006003(n).
t(2*n+1, n) = A002411(n).
t(2*n-1, n) = A006000(n-1).
Sum_{k=0..n} t(n, k) = A006522(n+2).
Sum_{k=0..n} (-1)^k*t(n, k) = (-1)^n * A117142(n).
Sum_{k=0..n} t(n-k, k) = (2*n^4 + 34*n^2 + 48*n - 15 + 3*(-1)^n*(2*n^2 + 16*n + 5))/384. (End)

A194621 Triangle T(n,k), n>=0, 0<=k<=n, read by rows: T(n,k) is the number of partitions of n in which any two parts differ by at most k.

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 5, 5, 5, 2, 5, 6, 7, 7, 7, 4, 6, 9, 10, 11, 11, 11, 2, 7, 10, 13, 14, 15, 15, 15, 4, 8, 14, 17, 20, 21, 22, 22, 22, 3, 9, 15, 22, 25, 28, 29, 30, 30, 30, 4, 10, 20, 27, 34, 37, 40, 41, 42, 42, 42, 2, 11, 21, 33, 41, 48, 51, 54, 55, 56, 56, 56
Offset: 0

Views

Author

Alois P. Heinz, Aug 30 2011

Keywords

Comments

T(n,k) = A000041(n) for n >= 0 and k >= n.

Examples

			T(6,0) = 4: [6], [3,3], [2,2,2], [1,1,1,1,1,1].
T(6,1) = 6: [6], [3,3], [2,1,1,1,1], [2,2,1,1], [2,2,2], [1,1,1,1,1,1].
T(6,2) = 9: [6], [4,2], [3,1,1,1], [3,2,1], [3,3], [2,1,1,1,1], [2,2,1,1], [2,2,2], [1,1,1,1,1,1].
Triangle begins:
  1;
  1, 1;
  2, 2,  2;
  2, 3,  3,  3;
  3, 4,  5,  5,  5;
  2, 5,  6,  7,  7,  7;
  4, 6,  9, 10, 11, 11, 11;
  2, 7, 10, 13, 14, 15, 15, 15;
		

Crossrefs

Columns k=0-10 give (for n>0): A000005, A000027, A117142, A117143, A218506, A218507, A218508, A218509, A218510, A218511, A218512.
Main diagonal gives: A000041.

Programs

  • Maple
    b:= proc(n, i, k) option remember;
          if n<0 or k<0 then 0
        elif n=0 then 1
        elif i<1 then 0
        else b(n, i-1, k-1) +b(n-i, i, k)
          fi
        end:
    T:= (n, k)-> `if`(n=0, 1, 0) +add(b(n-i, i, k), i=1..n):
    seq(seq(T(n, k), k=0..n), n=0..20);
  • Mathematica
    b[n_, i_, k_] := b[n, i, k] = If[n < 0 || k < 0, 0, If[n == 0, 1, If[i < 1, 0, b[n, i-1, k-1] + b[n-i, i, k]]]]; t[n_, k_] := If[n == 0, 1, 0] + Sum[b[n-i, i, k], {i, 1, n}]; Table[Table[t[n, k], {k, 0, n}], {n, 0, 20}] // Flatten (* Jean-François Alcover, Dec 09 2013, translated from Maple *)

Formula

G.f. of column k: 1 + Sum_{j>0} x^j / Product_{i=0..k} (1-x^(i+j)).

A004197 Triangle read by rows. T(n, k) = n - k if n - k < k, otherwise k.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Table of min(x,y), where (x,y) = (0,0),(0,1),(1,0),(0,2),(1,1),(2,0),...
Highest power of 6 that divides A036561. - Fred Daniel Kline, May 29 2012
Triangle T(n,k) read by rows: T(n,k) = min(k,n-k). - Philippe Deléham, Feb 25 2014

Examples

			From _Philippe Deléham_, Feb 25 2014: (Start)
Top left corner of table:
  0 0 0 0
  0 1 1 1
  0 1 2 2
  0 1 2 3
Triangle T(n,k) begins:
  0;
  0, 0;
  0, 1, 0;
  0, 1, 1, 0;
  0, 1, 2, 1, 0;
  0, 1, 2, 2, 1, 0;
  0, 1, 2, 3, 2, 1, 0;
  0, 1, 2, 3, 3, 2, 1, 0;
  0, 1, 2, 3, 4, 3, 2, 1, 0;
  0, 1, 2, 3, 4, 4, 3, 2, 1, 0;
  0, 1, 2, 3, 4, 5, 4, 3, 2, 1, 0;
  0, 1, 2, 3, 4, 5, 5, 4, 3, 2, 1, 0;
  0, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1, 0;
  0, 1, 2, 3, 4, 5, 6, 6, 5, 4, 3, 2, 1, 0;
  0, 1, 2, 3, 4, 5, 6, 7, 6, 5, 4, 3, 2, 1, 0;
  0, 1, 2, 3, 4, 5, 6, 7, 7, 6, 5, 4, 3, 2, 1, 0;
  ... (End)
		

Crossrefs

Similar to but strictly different from A087062 and A261684.
Row sums give A002620. - Reinhard Zumkeller, Jul 27 2005
Positions of zero are given in A117142. - Ridouane Oudra, Apr 30 2019

Programs

  • Haskell
    a004197 n k = a004197_tabl !! n !! k
    a004197_tabl = map a004197_row [0..]
    a004197_row n = hs ++ drop (1 - n `mod` 2) (reverse hs)
       where hs = [0..n `div` 2]
    -- Reinhard Zumkeller, Aug 14 2011
    
  • Maple
    T := (n, k) -> if n - k < k then n - k else k fi:
    for n from 0 to 9 do seq(T(n, k), k=0..n) od; # Peter Luschny, May 07 2023
  • Mathematica
    Flatten[Table[IntegerExponent[2^(n - k) 3^k, 6], {n, 0, 20}, {k, 0, n}]] (* Fred Daniel Kline, May 29 2012 *)
  • PARI
    T(x,y)=min(x,y) \\ Charles R Greathouse IV, Feb 07 2017

Formula

a(n) = A003983(n) - 1.
G.f.: x*y/((1-x)*(1-y)*(1-x*y)). - Franklin T. Adams-Watters, Feb 06 2006
2^T(n,k) = A144464(n,k), 3^T(n,k) = A152714(n,k), 4^T(n,k) = A152716(n,k), 5^T(n,k) = A152717(n,k). - Philippe Deléham, Feb 25 2014
a(n) = (1/2)*(t - 1 - abs(t^2 - 2*n - 1)), where t = floor(sqrt(2*n+1)+1/2). - Ridouane Oudra, May 03 2019

Extensions

Mathematica program fixed by Harvey P. Dale, Nov 26 2020
Name edited by Peter Luschny, May 07 2023

A117143 Number of partitions of n in which any two parts differ by at most 3.

Original entry on oeis.org

1, 2, 3, 5, 7, 10, 13, 17, 22, 27, 33, 41, 48, 57, 68, 78, 90, 105, 118, 134, 153, 170, 190, 214, 235, 260, 289, 315, 345, 380, 411, 447, 488, 525, 567, 615, 658, 707, 762, 812, 868, 931, 988, 1052, 1123, 1188, 1260, 1340, 1413, 1494, 1583, 1665, 1755, 1854
Offset: 1

Views

Author

Emeric Deutsch, Feb 27 2006

Keywords

Examples

			a(6) = 10 because we have [6], [4,2], [4,1,1], [3,3], [3,2,1], [3,1,1,1], [2,2,2], [2,2,1,1], [2,1,1,1,1] and [1,1,1,1,1,1] ([5,1] does not qualify).
		

Crossrefs

Cf. A117142.
Column k=3 of A194621.

Programs

  • Magma
    [(2*Floor((n+2)/3)*(14*Floor((n+2)/3)^2-(10*n+21)*Floor((n+2)/3)+2*(n^2+5*n+7))-(1-(-1)^Floor((n+2)/3))*(-1)^(n+2-Floor((n+2)/3)))/16: n in [1..60]]; // Vincenzo Librandi, May 12 2015
  • Maple
    g:=sum(x^k/(1-x^k)/(1-x^(k+1))/(1-x^(k+2))/(1-x^(k+3)),k=1..85): gser:=series(g,x=0,65): seq(coeff(gser,x^n),n=1..59); with(combinat): for n from 1 to 7 do P:=partition(n): A:={}: for j from 1 to nops(P) do if P[j][nops(P[j])]-P[j][1]<4 then A:=A union {P[j]} else A:=A fi od: print(A); od: # this program yields the partitions
  • Mathematica
    Table[Count[IntegerPartitions[n], ?(Max[#] - Min[#] <= 3 &)], {n, 30}] (* _Birkas Gyorgy, Feb 20 2011 *)
  • PARI
    Vec(x*(x^5-x^4-x^3+x+1)/((x-1)^4*(x+1)*(x^2+x+1)^2) + O(x^100)) \\ Colin Barker, Mar 05 2015
    

Formula

G.f.: sum(x^k/[(1-x^k)(1-x^(k+1))(1-x^(k+2))(1-x^(k+3))], k=1..infinity). More generally, the g.f. of the number of partitions in which any two parts differ by at most b is sum(x^k/product(1-x^j, j=k..k+b), k=1..infinity).
G.f.: x*(x^5-x^4-x^3+x+1) / ((x-1)^4*(x+1)*(x^2+x+1)^2). - Colin Barker, Mar 05 2015
a(n)=(2*floor((n+2)/3)*(14*floor((n+2)/3)^2-(10*n+21)*floor((n+2)/3)+2*(n^2+5*n+7))-(1-(-1)^floor((n+2)/3))*(-1)^(n+2-floor((n+2)/3)))/16. - Luce ETIENNE, May 12 2015

A128508 Number of partitions p of n such that max(p) - min(p) = 3.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 1, 3, 3, 7, 7, 12, 14, 20, 22, 32, 34, 45, 51, 63, 69, 87, 93, 112, 124, 144, 156, 184, 196, 225, 245, 275, 295, 335, 355, 396, 426, 468, 498, 552, 582, 637, 679, 735, 777, 847, 889, 960, 1016, 1088, 1144, 1232, 1288, 1377, 1449, 1539, 1611, 1719
Offset: 0

Views

Author

John W. Layman, May 07 2007

Keywords

Comments

See A008805 and A049820 for the numbers of partitions p of n such that max(p)-min(p)=1 or 2, respectively.

Crossrefs

Programs

  • Mathematica
    np[n_]:=Length[Select[IntegerPartitions[n],Max[#]-Min[#]==3&]]; Array[np,60] (* Harvey P. Dale, Jul 02 2012 *)

Formula

Conjecture. a(1)=0 and, for n>1, a(n+1)=a(n)+d(n), where d(n) is defined as follows: d=0,0,0,1,0 for n=1,...,5 and, for n>5, d(n)=d(n-2)+1 if n=6k or n=6k+4, d(n)=d(n-2) if n=6k+1 or n=6k+3, d(n)=d(n-2)+2Floor[n/6] if n=6k+2 and d(n)=d(n-5) if n=6k+5.
G.f. for number of partitions p of n such that max(p)-min(p) = m is Sum_{k>0} x^(2*k+m)/Product_{i=0..m} (1-x^(k+i)). - Vladeta Jovovic, Jul 04 2007
a(n) = A097364(n,3) = A116685(n,3) = A117143(n) - A117142(n). - Alois P. Heinz, Nov 02 2012

Extensions

More terms from Vladeta Jovovic, Jul 04 2007

A123158 Square array related to Bell numbers read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 2, 2, 1, 5, 5, 3, 1, 15, 15, 10, 5, 1, 52, 52, 37, 22, 6, 1, 203, 203, 151, 99, 31, 9, 1, 877, 877, 674, 471, 160, 61, 10, 1, 4140, 4140, 3263, 2386, 856, 385, 75, 14, 1, 21147, 21147, 17007, 12867, 4802, 2416, 520, 135, 15, 1
Offset: 0

Views

Author

Philippe Deléham, Oct 01 2006

Keywords

Examples

			Square array, A(n, k), begins:
   1,   1,   1,    1,    1, ... (Row n=0: A000012);
   1,   2,   3,    5,    6, ... (Row n=1: A117142);
   2,   5,  10,   22,   31, ...;
   5,  15,  37,   99,  160, ...;
  15,  52, 151,  471,  856, ...;
  52, 203, 674, 2386, 4802, ...;
Antidiagonals, T(n, k), begin as:
    1;
    1,   1;
    2,   2,   1;
    5,   5,   3,   1;
   15,  15,  10,   5,   1;
   52,  52,  37,  22,   6,  1;
  203, 203, 151,  99,  31,  9,   1;
  877, 877, 674, 471, 160, 61,  10,  1;
		

Crossrefs

Columns include: A000110 (Bell numbers), A003128, A005493, A033452.
Rows include: A000012, A117142.

Programs

  • Magma
    function A(n,k)
      if k lt 0 or n lt 0 then return 0;
      elif n eq 0 then return 1;
      elif (k mod 2) eq 1 then return A(n,k-1) + (1/2)*(k+1)*A(n-1,k+1);
      else return A(n,k-1) + A(n-1,k+1);
      end if;
    end function;
    T:= func< n,k | A(n-k,k) >;
    [T(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Jul 18 2023
    
  • Mathematica
    A[0, _?NonNegative] = 1;
    A[n_, k_]:= A[n, k]= If[n<0 || k<0, 0, If[OddQ[k], A[n, k-1] + (1/2)(k+1) A[n-1, k+1], A[n, k-1] + A[n-1, k+1]]];
    Table[A[n-k, k], {n,0,10}, {k,0,n}]//Flatten (* Jean-François Alcover, Feb 21 2020 *)
  • SageMath
    @CachedFunction
    def A(n,k):
        if (k<0 or n<0): return 0
        elif (n==0): return 1
        elif (k%2==1): return A(n,k-1) +(1/2)*(k+1)*A(n-1,k+1)
        else: return A(n,k-1) +A(n-1,k+1)
    def T(n,k): return A(n-k,k)
    flatten([[T(n,k) for k in range(n+1)] for n in range(12)]) # G. C. Greubel, Jul 18 2023

Formula

A(n, k) = 0 if n < 0, A(0, k) = 1 for k >= 0, A(n, k) = A(n, k-1) + (1/2)*(k+1)*A(n-1, k+1) if k is an odd number, A(n, k) = A(n, k-1) + A(n-1, k+1) if k is an even number (array).
A(n, 0) = A000110(n).
A(n, 1) = A000110(n+1).
A(n, 2) = A005493(n).
A(n, 3) = A033452(n).
A(n, 4) = A003128(n+2).
T(n, k) = A(n-k, k) (antidiagonals).

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

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

A177991 Triangle read by rows, A070909 * A177990.

Original entry on oeis.org

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

Author

Gary W. Adamson, May 16 2010

Keywords

Comments

Row sums = A117142: (1, 2, 3, 5, 6, 9,...)

Examples

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

Crossrefs

Formula

As infinite lower triangular matrices, A070909 * A177990

Extensions

a(28)=1 inserted before the first "4" by Georg Fischer, Dec 28 2021

A269110 Numbers of unit circles packed in a triangle of smallest area admitting an equilateral triangle solution.

Original entry on oeis.org

1, 3, 5, 6, 9, 10, 14, 15, 20, 21
Offset: 1

Author

Leonid Broukhis, Feb 19 2016

Keywords

Crossrefs

May be related to A117142.
For packing into equilateral triangles, see A337019.
Showing 1-10 of 13 results. Next