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.

A193832 Irregular triangle read by rows in which row n lists 2n-1 copies of 2n-1 and n copies of 2n, for n >= 1.

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Aug 22 2011

Keywords

Comments

Sequence of successive positive integers k in which if k is odd then k appears k times, otherwise if k is even then k appears k/2 times.
Note that an arrangement of the blocks of this sequence shows the growth of the generalized pentagonal numbers A001318 (see example).
The sums of each block give the positive integers of A129194: 1, 2, 9, 8, 25, 18, 49,...
Partial sums of A080995. - Paolo P. Lava, Aug 23 2011.
Concatenations of rows of triangles A001650 and A111650; also, seen as a flat list, the row lengths of triangle A260672 and the first differences of its row sums (cf. A260706). - Reinhard Zumkeller, Nov 17 2015
Also a(n) = number of squares in the arithmetic progression {24k + 1: 0 <= k <= n-1} [Granville]. - N. J. A. Sloane, Dec 13 2017

Examples

			a) If written as a triangle the initial rows are
  1, 2,
  3, 3, 3, 4, 4,
  5, 5, 5, 5, 5, 6, 6, 6,
  7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8,
  9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10,
  ...
Row sums give A126587.
b) An application using the blocks of this sequence: the illustration of the growth of an arrangement which represents the generalized pentagonal numbers A001318. For example; the first 9 positive initial terms: 1, 2, 5, 7, 12, 15, 22, 26, 35.
.
.         9
.       8 9
.     8 7 9
.   8 6 7 9
. 8 6 5 7 9
. 6 4 5 7 9
. 4 3 5 7 9
. 2 3 5 7 9
. 1 3 5 7 9
...
		

Crossrefs

Programs

  • Haskell
    a193832 n k = a193832_tabf !! (n-1) !! (k-1)
    a193832_row n = a193832_tabf !! (n-1)
    a193832_tabf = zipWith (++) a001650_tabf a111650_tabl
    a193832' n = a193832_list !! (n - 1)
    a193832_list = concat a193832_tabf
    -- Reinhard Zumkeller, Nov 15 2015
  • Mathematica
    Array[Join @@ MapIndexed[ConstantArray[#, #/(1 + Boole[First@ #2 == 2])] &, {2 # - 1, 2 #}] &, 7] // Flatten (* or *)
    Table[If[k <= 2 n - 1, 2 n - 1, 2 n], {n, 7}, {k, 3 n - 1}] // Flatten (* Michael De Vlieger, Dec 14 2017 *)

Formula

a(n) = sqrt(8n/3) plus or minus 1 [Granville] - N. J. A. Sloane, Dec 13 2017
If 8 <= n <= 52, then a(n-1) < a(n) if and only if n is in A221672. - Jonathan Sondow, Dec 14 2017

Extensions

Edited by N. J. A. Sloane, Dec 13 2017

A260672 Table read by rows: T(n,k) = n - A001318(k), k = 0 .. A193832(n)-1.

Original entry on oeis.org

0, 1, 0, 2, 1, 0, 3, 2, 1, 4, 3, 2, 5, 4, 3, 0, 6, 5, 4, 1, 7, 6, 5, 2, 0, 8, 7, 6, 3, 1, 9, 8, 7, 4, 2, 10, 9, 8, 5, 3, 11, 10, 9, 6, 4, 12, 11, 10, 7, 5, 0, 13, 12, 11, 8, 6, 1, 14, 13, 12, 9, 7, 2, 15, 14, 13, 10, 8, 3, 0, 16, 15, 14, 11, 9, 4, 1, 17, 16
Offset: 0

Views

Author

Reinhard Zumkeller, Nov 15 2015

Keywords

Comments

Column k starts at row A001318(k); each column = A001477.

Examples

			.   0:    0
.   1:    1   0
.   2:    2   1   0
.   3:    3   2   1
.   4:    4   3   2
.   5:    5   4   3   0
.   6:    6   5   4   1
.   7:    7   6   5   2   0
.   8:    8   7   6   3   1
.   9:    9   8   7   4   2
.  10:   10   9   8   5   3
.  11:   11  10   9   6   4
.  12:   12  11  10   7   5   0
.  13:   13  12  11   8   6   1
.  14:   14  13  12   9   7   2
.  15:   15  14  13  10   8   3   0
.  16:   16  15  14  11   9   4   1
.  17:   17  16  15  12  10   5   2
.  18:   18  17  16  13  11   6   3
.  19:   19  18  17  14  12   7   4
.  20:   20  19  18  15  13   8   5  .
		

Crossrefs

Cf. A001318, A193832 (row lengths), A000041, A087960, A054440, A260664, A260706 (row sums).

Programs

  • Haskell
    a260672 n k = a260672_tabf !! n !! k
    a260672_row n = a260672_tabf !! n
    a260672_tabf = map (takeWhile (>= 0) . flip map a001318_list . (-)) [0..]

Formula

Number of m-tuples of partitions of n that have no part in common = Sum(A087960(k)*A000041(T(n,k))^m: k = 0 .. A193832(n+1)-1), e.g. A054440 (m=2) and A260664 (m=3); see Wilf link: p. 2, (3).

A212760 Number of (w,x,y,z) with all terms in {0,...,n}, w even, and x = y + z.

Original entry on oeis.org

1, 3, 12, 20, 45, 63, 112, 144, 225, 275, 396, 468, 637, 735, 960, 1088, 1377, 1539, 1900, 2100, 2541, 2783, 3312, 3600, 4225, 4563, 5292, 5684, 6525, 6975, 7936, 8448, 9537, 10115, 11340, 11988, 13357, 14079, 15600, 16400, 18081, 18963, 20812, 21780, 23805
Offset: 0

Views

Author

Clark Kimberling, May 29 2012

Keywords

Comments

A signed version is A122576.
For a guide to related sequences, see A211795.
Partial sums of the positive elements of A129194. - Omar E. Pol, Dec 28 2013

Crossrefs

Programs

  • Haskell
    a212760 = a260706 . fromInteger . a001318 . (+ 1)
    -- Reinhard Zumkeller, Nov 17 2015
  • Magma
    [(n+1)*(n+2)*(2*n+3+(-1)^n)/8 : n in [0..50]]; // Wesley Ivan Hurt, Jul 22 2014
    
  • Maple
    A212760:=n->(n+1)*(n+2)*(2*n+3+(-1)^n)/8: seq(A212760(n), n=0..50); # Wesley Ivan Hurt, Jul 22 2014
  • Mathematica
    t = Compile[{{n, _Integer}}, Module[{s = 0}, (Do[If[(Mod[w, 2] == 0) && x == y + z, s++],
    {w, 0, n}, {x, 0, n}, {y, 0, n}, {z, 0, n}]; s)]];
    Map[t[#] &, Range[0, 50]]  (* A212760 *)
    Table[(n + 1) (n + 2) (2 n + 3 + (-1)^n)/8, {n, 0, 50}] (* Wesley Ivan Hurt, Jul 22 2014 *)
    CoefficientList[Series[(1 + 2 x + 6 x^2 + 2 x^3 + x^4)/((1 + x)^3 (1 - x)^4), {x, 0, 40}], x] (* Vincenzo Librandi, Jul 23 2014 *)

Formula

a(n) = a(n-1)+3*a(n-2)-3*a(n-3)-3*a(n-4)+3*a(n-5)+a(n-6)-a(n-7).
G.f.: ( 1+2*x+6*x^2+2*x^3+x^4 ) / ( (1+x)^3*(1-x)^4 ).
a(n) = (n+1)*(n+2)*(2*n+3+(-1)^n)/8. - Wesley Ivan Hurt, Jul 22 2014
a(n) = A260706(A001318(n+1)). - Reinhard Zumkeller, Nov 17 2015
a(n) = Sum_{i=1..n+1} numerator(i^2/2). - Wesley Ivan Hurt, Feb 26 2017
Showing 1-3 of 3 results.