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-20 of 538 results. Next

A245192 The number of Dyck paths p(m) for m<=n, as defined by the rows of A237593, that have common subpaths of positive length with the Dyck path p(n) for the symmetric representation of sigma(n).

Original entry on oeis.org

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

Views

Author

Hartmut F. W. Hoft, Jul 17 2014

Keywords

Comments

This sequence counts Dyck paths that have common stretches while sequence A244145 counts adjacent areas of the symmetric representation of sigma(). Their first three differences occur at positions 23, 47 and 53.
A244145 counts adjacent sections rather than common boundaries.
See A237270 for Mathematica function used here.

Examples

			Path a(6) has two colors since it shares steps 5 and 6 with path a(5) which has a single color.
See also the link for a color image of paths.
		

Crossrefs

Programs

  • Mathematica
    (* path[n] computing the n-th Dyck path is defined in A237270 *)
    (* coloredPathRange[] assigns the color of the first path sharing a line *)
    (* colorLists[] computes the lists of colors in each path in the list *)
    defaultPath[n_] := Module[{p=path[n]}, Transpose[{Transpose[{Most[p], Rest[p]}], Table[n, {Length[p]-1}]}]]
    switchIf[x_,yList_] := Module[{pos=Position[Map[First, yList], First[x]]}, If[pos == {}, x, yList[[First[First[pos]]]]]]
    nextColoredPath[p_,n_] := Module[{u=defaultPath[n], meet12, common1}, meet12 = Intersection[Map[First, p], Map[First, u]]; common1=Select[p, MemberQ[meet12, First[#]]&]; Map[switchIf[#, common1]&, u]]
    coloredPathRange[n_] := FoldList[nextColoredPath, {{{{0,0}, {0,0}}, 0}}, Range[n]]
    colorLists[pathList_] := Map[Union[Last[Transpose[#]]]&, pathList]
    a[colors_] := Prepend[Map[Last[#] - First[#] + 1&, Rest[colors]], 0]
    a[colorLists[coloredPathRange[90]]] (* computes the first 90 values *)

A261348 a(1)=0; a(2)=0; for n>2: a(n) = A237591(n,2) = A237593(n,2).

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Aug 24 2015

Keywords

Comments

n is an odd prime if and only if a(n) = 1 + a(n-1) and A237591(n,k) = A237591(n-1,k) for the values of k distinct of 2.
For k > 1 there are five numbers k in the sequence.
For more information see A237593.

Examples

			Apart from the initial two zeros the sequence can be written as an array T(j,k) with 6 columns, where row j is [j, j, j+1, j, j+1, j+1], as shown below:
1,   1,  2,  1,  2,  2;
2,   2,  3,  2,  3,  3;
3,   3,  4,  3,  4,  4;
4,   4,  5,  4,  5,  5;
5,   5,  6,  5,  6,  6;
6,   6,  7,  6,  7,  7;
7,   7,  8,  7,  8,  8;
8,   8,  9,  8,  9,  9;
9,   9, 10,  9, 10, 10;
10, 10, 11, 10, 11, 11;
11, 11, 12, 11, 12, 12;
12, 12, 13, 12, 13, 13;
13, 13, 14, 13, 14, 14;
14, 14, 15, 14, 15, 15;
15, 15, 16, 15, 16, 16;
...
Illustration of initial terms:
Row                                                     _
1                                                     _| |0
2                                                   _|  _|0
3                                                 _|   |1|
4                                               _|    _|1|
5                                             _|     |2 _|
6                                           _|      _|1| |
7                                         _|       |2  | |
8                                       _|        _|2 _| |
9                                     _|         |2  |  _|
10                                  _|          _|2  | | |
11                                _|           |3   _| | |
12                              _|            _|2  |   | |
13                            _|             |3    |  _| |
14                          _|              _|3   _| |  _|
15                        _|               |3    |   | | |
16                      _|                _|3    |   | | |
17                    _|                 |4     _|  _| | |
18                  _|                  _|3    |   |   | |
19                _|                   |4      |   |  _| |
20              _|                    _|4     _|   | |  _|
21            _|                     |4      |    _| | | |
22          _|                      _|4      |   |   | | |
23        _|                       |5       _|   |   | | |
24      _|                        _|4      |     |  _| | |
25    _|                         |5        |    _| |   | |
26   |                           |5        |   |   |   | |
...
The figure represents the triangle A237591 in which the numbers of horizontal cells in the second geometric region gives this sequence, for n > 2.
Note that this is also the second geometric region in the front view of the stepped pyramid described in A245092. For more information see also A237593.
		

Crossrefs

A293750 a(n) is the total number of line segments that belong to the Dyck paths in the diagram of the symmetries of sigma described in A236104 and A237593 after n-th stage, with a(0) = 0.

Original entry on oeis.org

0, 2, 4, 6, 10, 12, 18, 20, 26, 30, 36, 38, 46, 48, 54, 62, 72, 74, 84, 86, 96, 104, 110, 112, 124, 130, 136, 144, 158, 160
Offset: 0

Views

Author

Omar E. Pol, Nov 09 2017

Keywords

Examples

			Illustration of initial terms (n = 1..6):
.                                                      _ _ _ _
.                                        _ _ _         _ _ _  |_
.                            _ _ _       _ _ _|        _ _ _|   |_
.                  _ _       _ _  |_     _ _  |_ _     _ _  |_ _  |
.          _ _     _ _|_     _ _|_  |    _ _|_  | |    _ _|_  | | |
.    _     _  |    _  | |    _  | | |    _  | | | |    _  | | | | |
.     |     | |     | | |     | | | |     | | | | |     | | | | | |
.
.    2      4        6          10           12             18
.
		

Crossrefs

Formula

a(n) = A294847(n) - 2.

A294849 a(n) is the total number of horizontal line segments that belong to the Dyck paths in the diagram of the symmetries of sigma described in A236104 and A237593 after n-th stage, with a(0) = 0.

Original entry on oeis.org

0, 1, 2, 3, 5, 6, 9, 10, 13, 15, 18, 19, 23, 24, 27, 31, 36, 37, 42, 43, 48, 52, 55, 56, 62, 65, 68, 72, 79, 80
Offset: 0

Views

Author

Omar E. Pol, Nov 09 2017

Keywords

Comments

Since the diagram is symmetrics a(n) is also the number of vertical line segments after n-th stage. For a diagram see A293750.

Crossrefs

Formula

a(n) = A293750(n)/2.

A339575 Triangle read by rows: T(n,k) is the number of cells in the k-th row of the diagram constructed in the fourth quadrant with the Dyck path described in the n-th row of A237593, 1 <= k <= n.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Dec 11 2020

Keywords

Comments

These are the lengths of the rows if one regards the n-th region in the diagram as the Young diagram corresponding to a partition of A024916(n).
Column k gives the partial sums of the k-th column of triangle A240061. - Omar E. Pol, Dec 11 2020

Examples

			Triangle begins:
   1;
   2,  2;
   3,  3,  2;
   4,  4,  4,  3;
   5,  5,  5,  3,  3;
   6,  6,  6,  6,  5,  4;
   7,  7,  7,  7,  5,  4,  4;
   8,  8,  8,  8,  8,  6,  5,  5;
   9,  9,  9,  9,  9,  7,  7,  5,  5;
  10, 10, 10, 10, 10, 10,  8,  7,  6,  6;
  11, 11, 11, 11, 11, 11,  8,  7,  6,  6,  6;
  12, 12, 12, 12, 12, 12, 12, 10, 10,  9,  7,  7;
...
From _Omar E. Pol_, Jan 19 2022: (Start)
For n = 10 the Dyck path described in the 10th row of A237593 is as shown below in the fourth quadrant:
.
   k                                     10th row
      . . . . . . . . . . . . . X       of triangle
   1  .                    |                10
   2  .                    |                10
   3  .                    |                10
   4  .                    |                10
   5  .                    |                10
   6  .                 _ _|                10
   7  .               _|                     8
   8  .             _|                       7
   9  .            |                         6
  10  . _ _ _ _ _ _|                         6
      .
      .
     -y
.
T(10,k) is the number of cells in the k-th row of the diagram.
The total number of cells in all rows of the diagram is equal to A024916(10) = 87, the same as the sum of the 10th row of triangle. (End)
		

Crossrefs

Programs

  • PARI
    See Links section.

Extensions

Name edited by Omar E. Pol, Jan 22 2022

A299472 a(n) is the sum of all divisors of all numbers k whose associated largest Dyck path contains the point (n,n) in the diagram of the symmetric representation of sigma(k) described in A237593, or 0 if no such k exists.

Original entry on oeis.org

1, 7, 13, 0, 20, 15, 43, 0, 66, 0, 24, 49, 59, 0, 134, 0, 60, 113, 0, 86, 0, 104, 165, 0, 48, 245, 0, 132, 0, 224, 0, 198, 0, 124, 57, 317, 0, 192, 0, 350, 0, 326, 0, 104, 211, 0, 434, 0, 216, 0, 0, 647, 0, 344, 0, 186, 331, 0, 584, 0, 270, 0, 234, 0, 672, 0, 350, 171, 0, 156, 639, 0, 672, 0, 390, 0, 368, 0, 956
Offset: 1

Views

Author

Omar E. Pol, Feb 19 2018

Keywords

Crossrefs

A299482 Numbers m such that in the diagram of the symmetric representation of sigma(k) described in A237593 there is no Dyck path that contains the point (m,m), where both k and m are positive integers.

Original entry on oeis.org

4, 8, 10, 14, 16, 19, 21, 24, 27, 29, 31, 33, 37, 39, 41, 43, 46, 48, 50, 51, 53, 55, 58, 60, 62, 64, 66, 69, 72, 74, 76, 78, 80, 82, 83, 84, 87, 90, 92, 94, 96, 98, 100, 101, 103, 105, 107, 109, 111, 114, 116, 119, 121, 123, 124, 125, 127, 129, 131, 133, 135, 138, 141, 143, 145, 147, 149, 151, 153
Offset: 1

Views

Author

Omar E. Pol, Feb 19 2018

Keywords

Comments

Indices of the rows that contain a zero in the triangle A279385.
a(n) is the index of the n-th zero in A259179; i.e. A259179(a(n)) = 0. - Hartmut F. W. Hoft, Aug 07 2020

Crossrefs

Programs

  • Mathematica
    a240542[n_] := Sum[(-1)^(k+1)*Ceiling[(n+1)/k - (k+1)/2], {k, 1, Floor[(Sqrt[8n+1]-1)/2]}]
    a299482[n_] := Module[{t=Table[0, n], k=1, d=1}, While[d<=n, t[[d]]+=1; d=a240542[++k]]; Flatten[Position[t, 0]]]
    a299482[153] (* Hartmut F. W. Hoft, Aug 07 2020 *)

A358492 Irregular triangle read by rows: T(n,k) is one half of the number of line segments of length 1 in the k-th antidiagonal of the Dyck path described in the n-th row of A237593.

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Nov 19 2022

Keywords

Examples

			Triangle begins (first 19 rows):
  1;
  1, 1;
  1, 2;
  1, 1, 2;
  1, 2, 2;
  1, 1, 1, 3;
  1, 1, 3, 2;
  1, 1, 1, 3, 2;
  1, 1, 1, 3, 3;
  1, 1, 1, 1, 4, 2;
  1, 1, 1, 4, 2, 2;
  1, 1, 1, 1, 1, 3, 4;
  1, 1, 1, 1, 3, 4, 2;
  1, 1, 1, 1, 2, 4, 2, 2;
  1, 1, 1, 1, 1, 3, 5, 2;
  1, 1, 1, 1, 1, 1, 3, 5, 2;
  1, 1, 1, 1, 1, 3, 5, 2, 2;
  1, 1, 1, 1, 1, 1, 1, 5, 4, 2;
  1, 1, 1, 1, 1, 1, 5, 4, 2, 2;
...
For n = 10 the 10th row of A237593 is [6, 2, 1, 1, 1, 1, 2, 6]. When that row is interpreted as a symmetric Dyck path in the fourth quadrant using 20 line segments of length 1 the Dyck path looks like this:
.
                         |
                         |
                         |
                         |
                         |
                      _ _|
                    _|
                  _|
                 |
      _ _ _ _ _ _|
.
The numbers of line segments of length 1 in the successive antidiagonals are respectively [2, 2, 2, 2, 8, 4] so the 10th row of triangle is [1, 1, 1, 1, 4, 2].
		

Crossrefs

Row sums give A000027.
Row n has length A008619(n).
Column 1 gives A000012.

A000384 Hexagonal numbers: a(n) = n*(2*n-1).

Original entry on oeis.org

0, 1, 6, 15, 28, 45, 66, 91, 120, 153, 190, 231, 276, 325, 378, 435, 496, 561, 630, 703, 780, 861, 946, 1035, 1128, 1225, 1326, 1431, 1540, 1653, 1770, 1891, 2016, 2145, 2278, 2415, 2556, 2701, 2850, 3003, 3160, 3321, 3486, 3655, 3828, 4005, 4186, 4371, 4560
Offset: 0

Views

Author

Keywords

Comments

Number of edges in the join of two complete graphs, each of order n, K_n * K_n. - Roberto E. Martinez II, Jan 07 2002
The power series expansion of the entropy function H(x) = (1+x)log(1+x) + (1-x)log(1-x) has 1/a_i as the coefficient of x^(2i) (the odd terms being zero). - Tommaso Toffoli (tt(AT)bu.edu), May 06 2002
Partial sums of A016813 (4n+1). Also with offset = 0, a(n) = (2n+1)(n+1) = A005408 * A000027 = 2n^2 + 3n + 1, i.e., a(0) = 1. - Jeremy Gardiner, Sep 29 2002
Sequence also gives the greatest semiperimeter of primitive Pythagorean triangles having inradius n-1. Such a triangle has consecutive longer sides, with short leg 2n-1, hypotenuse a(n) - (n-1) = A001844(n), and area (n-1)*a(n) = 6*A000330(n-1). - Lekraj Beedassy, Apr 23 2003
Number of divisors of 12^(n-1), i.e., A000005(A001021(n-1)). - Henry Bottomley, Oct 22 2001
More generally, if p1 and p2 are two arbitrarily chosen distinct primes then a(n) is the number of divisors of (p1^2*p2)^(n-1) or equivalently of any member of A054753^(n-1). - Ant King, Aug 29 2011
Number of standard tableaux of shape (2n-1,1,1) (n>=1). - Emeric Deutsch, May 30 2004
It is well known that for n>0, A014105(n) [0,3,10,21,...] is the first of 2n+1 consecutive integers such that the sum of the squares of the first n+1 such integers is equal to the sum of the squares of the last n; e.g., 10^2 + 11^2 + 12^2 = 13^2 + 14^2.
Less well known is that for n>1, a(n) [0,1,6,15,28,...] is the first of 2n consecutive integers such that sum of the squares of the first n such integers is equal to the sum of the squares of the last n-1 plus n^2; e.g., 15^2 + 16^2 + 17^2 = 19^2 + 20^2 + 3^2. - Charlie Marion, Dec 16 2006
a(n) is also a perfect number A000396 when n is an even superperfect number A061652. - Omar E. Pol, Sep 05 2008
Sequence found by reading the line from 0, in the direction 0, 6, ... and the line from 1, in the direction 1, 15, ..., in the square spiral whose vertices are the generalized hexagonal numbers A000217. - Omar E. Pol, Jan 09 2009
For n>=1, 1/a(n) = Sum_{k=0..2*n-1} ((-1)^(k+1)*binomial(2*n-1,k)*binomial(2*n-1+k,k)*H(k)/(k+1)) with H(k) harmonic number of order k.
The number of possible distinct colorings of any 2 colors chosen from n colors of a square divided into quadrants. - Paul Cleary, Dec 21 2010
Central terms of the triangle in A051173. - Reinhard Zumkeller, Apr 23 2011
For n>0, a(n-1) is the number of triples (w,x,y) with all terms in {0,...,n} and max(|w-x|,|x-y|) = |w-y|. - Clark Kimberling, Jun 12 2012
a(n) is the number of positions of one domino in an even pyramidal board with base 2n. - César Eliud Lozada, Sep 26 2012
Partial sums give A002412. - Omar E. Pol, Jan 12 2013
Let a triangle have T(0,0) = 0 and T(r,c) = |r^2 - c^2|. The sum of the differences of the terms in row(n) and row(n-1) is a(n). - J. M. Bergot, Jun 17 2013
With T_(i+1,i)=a(i+1) and all other elements of the lower triangular matrix T zero, T is the infinitesimal generator for A176230, analogous to A132440 for the Pascal matrix. - Tom Copeland, Dec 11 2013
a(n) is the number of length 2n binary sequences that have exactly two 1's. a(2) = 6 because we have: {0,0,1,1}, {0,1,0,1}, {0,1,1,0}, {1,0,0,1}, {1,0,1,0}, {1,1,0,0}. The ordinary generating function with interpolated zeros is: (x^2 + 3*x^4)/(1-x^2)^3. - Geoffrey Critzer, Jan 02 2014
For n > 0, a(n) is the largest integer k such that k^2 + n^2 is a multiple of k + n. More generally, for m > 0 and n > 0, the largest integer k such that k^(2*m) + n^(2*m) is a multiple of k + n is given by k = 2*n^(2*m) - n. - Derek Orr, Sep 04 2014
Binomial transform of (0, 1, 4, 0, 0, 0, ...) and second partial sum of (0, 1, 4, 4, 4, ...). - Gary W. Adamson, Oct 05 2015
a(n) also gives the dimension of the simple Lie algebras D_n, for n >= 4. - Wolfdieter Lang, Oct 21 2015
For n > 0, a(n) equals the number of compositions of n+11 into n parts avoiding parts 2, 3, 4. - Milan Janjic, Jan 07 2016
Also the number of minimum dominating sets and maximal irredundant sets in the n-cocktail party graph. - Eric W. Weisstein, Jun 29 and Aug 17 2017
As Beedassy's formula shows, this Hexagonal number sequence is the odd bisection of the Triangle number sequence. Both of these sequences are figurative number sequences. For A000384, a(n) can be found by multiplying its triangle number by its hexagonal number. For example let's use the number 153. 153 is said to be the 17th triangle number but is also said to be the 9th hexagonal number. Triangle(17) Hexagonal(9). 17*9=153. Because the Hexagonal number sequence is a subset of the Triangle number sequence, the Hexagonal number sequence will always have both a triangle number and a hexagonal number. n* (2*n-1) because (2*n-1) renders the triangle number. - Bruce J. Nicholson, Nov 05 2017
Also numbers k with the property that in the symmetric representation of sigma(k) the smallest Dyck path has a central valley and the largest Dyck path has a central peak, n >= 1. Thus all hexagonal numbers > 0 have middle divisors. (Cf. A237593.) - Omar E. Pol, Aug 28 2018
k^a(n-1) mod n = 1 for prime n and k=2..n-1. - Joseph M. Shunia, Feb 10 2019
Consider all Pythagorean triples (X, Y, Z=Y+1) ordered by increasing Z: a(n+1) gives the semiperimeter of related triangles; A005408, A046092 and A001844 give the X, Y and Z values. - Ralf Steiner, Feb 25 2020
See A002939(n) = 2*a(n) for the corresponding perimeters. - M. F. Hasler, Mar 09 2020
It appears that these are the numbers k with the property that the smallest subpart in the symmetric representation of sigma(k) is 1. - Omar E. Pol, Aug 28 2021
The above conjecture is true. See A280851 for a proof. - Hartmut F. W. Hoft, Feb 02 2022
The n-th hexagonal number equals the sum of the n consecutive integers with the same parity starting at n; for example, 1, 2+4, 3+5+7, 4+6+8+10, etc. In general, the n-th 2k-gonal number is the sum of the n consecutive integers with the same parity starting at (k-2)*n - (k-3). When k = 1 and 2, this result generates the positive integers, A000027, and the squares, A000290, respectively. - Charlie Marion, Mar 02 2022
Conjecture: For n>0, min{k such that there exist subsets A,B of {0,1,2,...,a(n)} such that |A|=|B|=k and A+B={0,1,2,...,2*a(n)}} = 2*n. - Michael Chu, Mar 09 2022

References

  • Albert H. Beiler, Recreations in the Theory of Numbers, Dover, NY, 1964, p. 189.
  • Louis Comtet, Advanced Combinatorics, Reidel, 1974, pp. 77-78. (In the integral formula on p. 77 a left bracket is missing for the cosine argument.)
  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See p. 38.
  • E. Deza and M. M. Deza, Figurate numbers, World Scientific Publishing (2012), page 6.
  • L. E. Dickson, History of the Theory of Numbers. Carnegie Institute Public. 256, Washington, DC, Vol. 1, 1919; Vol. 2, 1920; Vol. 3, 1923, see vol. 2, p. 2.
  • Alfred S. Posamentier, Math Charmers, Tantalizing Tidbits for the Mind, Prometheus Books, NY, 2003, pages 53-54, 129-130, 132.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 21.
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986, Revised edition 1987. See pp. 122-123.

Crossrefs

a(n)= A093561(n+1, 2), (4, 1)-Pascal column.
a(n) = A100345(n, n-1) for n>0.
Cf. A002939 (twice a(n): sums of Pythagorean triples (X, Y, Z=Y+1)).
Cf. A280851.

Programs

  • Haskell
    a000384 n = n * (2 * n - 1)
    a000384_list = scanl (+) 0 a016813_list
    -- Reinhard Zumkeller, Dec 16 2012
    
  • Maple
    A000384:=n->n*(2*n-1); seq(A000384(k), k=0..100); # Wesley Ivan Hurt, Sep 27 2013
  • Mathematica
    Table[n*(2 n - 1), {n, 0, 100}] (* Wesley Ivan Hurt, Sep 27 2013 *)
    LinearRecurrence[{3, -3, 1}, {0, 1, 6}, 50] (* Harvey P. Dale, Sep 10 2015 *)
    Join[{0}, Accumulate[Range[1, 312, 4]]] (* Harvey P. Dale, Mar 26 2016 *)
    (* For Mathematica 10.4+ *) Table[PolygonalNumber[RegularPolygon[6], n], {n, 0, 48}] (* Arkadiusz Wesolowski, Aug 27 2016 *)
    PolygonalNumber[6, Range[0, 20]] (* Eric W. Weisstein, Aug 17 2017 *)
    CoefficientList[Series[x*(1 + 3*x)/(1 - x)^3 , {x, 0, 100}], x] (* Stefano Spezia, Sep 02 2018 *)
  • PARI
    a(n)=n*(2*n-1)
    
  • PARI
    a(n) = binomial(2*n,2) \\ Altug Alkan, Oct 06 2015
    
  • Python
    # Intended to compute the initial segment of the sequence, not isolated terms.
    def aList():
         x, y = 1, 1
         yield 0
         while True:
             yield x
             x, y = x + y + 4, y + 4
    A000384 = aList()
    print([next(A000384) for i in range(49)]) # Peter Luschny, Aug 04 2019

Formula

a(n) = Sum_{k=1..n} tan^2((k - 1/2)*Pi/(2n)). - Ignacio Larrosa Cañestro, Apr 17 2001
E.g.f.: exp(x)*(x+2x^2). - Paul Barry, Jun 09 2003
G.f.: x*(1+3*x)/(1-x)^3. - Simon Plouffe in his 1992 dissertation, dropping the initial zero
a(n) = A000217(2*n-1) = A014105(-n).
a(n) = 4*A000217(n-1) + n. - Lekraj Beedassy, Jun 03 2004
a(n) = right term of M^n * [1,0,0], where M = the 3 X 3 matrix [1,0,0; 1,1,0; 1,4,1]. Example: a(5) = 45 since M^5 *[1,0,0] = [1,5,45]. - Gary W. Adamson, Dec 24 2006
Row sums of triangle A131914. - Gary W. Adamson, Jul 27 2007
Row sums of n-th row, triangle A134234 starting (1, 6, 15, 28, ...). - Gary W. Adamson, Oct 14 2007
Starting with offset 1, = binomial transform of [1, 5, 4, 0, 0, 0, ...]. Also, A004736 * [1, 4, 4, 4, ...]. - Gary W. Adamson, Oct 25 2007
a(n)^2 + (a(n)+1)^2 + ... + (a(n)+n-1)^2 = (a(n)+n+1)^2 + ... + (a(n)+2n-1)^2 + n^2; e.g., 6^2 + 7^2 = 9^2 + 2^2; 28^2 + 29^2 + 30^2 + 31^2 = 33^2 + 34^2 + 35^2 + 4^2. - Charlie Marion, Nov 10 2007
a(n) = binomial(n+1,2) + 3*binomial(n,2).
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3), a(0)=0, a(1)=1, a(2)=6. - Jaume Oliver Lafont, Dec 02 2008
a(n) = T(n) + 3*T(n-1), where T(n) is the n-th triangular number. - Vincenzo Librandi, Nov 10 2010
a(n) = a(n-1) + 4*n - 3 (with a(0)=0). - Vincenzo Librandi, Nov 20 2010
a(n) = A007606(A000290(n)). - Reinhard Zumkeller, Feb 12 2011
a(n) = 2*a(n-1) - a(n-2) + 4. - Ant King, Aug 26 2011
a(n+1) = A045896(2*n). - Reinhard Zumkeller, Dec 12 2011
a(2^n) = 2^(2n+1) - 2^n. - Ivan N. Ianakiev, Apr 13 2013
a(n) = binomial(2*n,2). - Gary Detlefs, Jul 28 2013
a(n+1) = A128918(2*n+1). - Reinhard Zumkeller, Oct 13 2013
a(4*a(n)+7*n+1) = a(4*a(n)+7*n) + a(4*n+1). - Vladimir Shevelev, Jan 24 2014
Sum_{n>=1} 1/a(n) = 2*log(2) = 1.38629436111989...= A016627. - Vaclav Kotesovec, Apr 27 2016
Sum_{n>=1} (-1)^n/a(n) = log(2) - Pi/2. - Vaclav Kotesovec, Apr 20 2018
a(n+1) = trinomial(2*n+1, 2) = trinomial(2*n+1, 4*n), for n >= 0, with the trinomial irregular triangle A027907. a(n+1) = (n+1)*(2*n+1) = (1/Pi)*Integral_{x=0..2} (1/sqrt(4 - x^2))*(x^2 - 1)^(2*n+1)*R(4*n-2, x) with the R polynomial coefficients given in A127672. [Comtet, p. 77, the integral formula for q=3, n -> 2*n+1, k = 2, rewritten with x = 2*cos(phi)]. - Wolfdieter Lang, Apr 19 2018
Sum_{n>=1} 1/(a(n))^2 = 2*Pi^2/3-8*log(2) = 1.0345588... = 10*A182448 - A257872. - R. J. Mathar, Sep 12 2019
a(n) = (A005408(n-1) + A046092(n-1) + A001844(n-1))/2. - Ralf Steiner, Feb 27 2020
Product_{n>=2} (1 - 1/a(n)) = 2/3. - Amiram Eldar, Jan 21 2021
a(n) = floor(Sum_{k=(n-1)^2..n^2} sqrt(k)), for n >= 1. - Amrit Awasthi, Jun 13 2021
a(n+1) = A084265(2*n), n>=0. - Hartmut F. W. Hoft, Feb 02 2022
a(n) = A000290(n) + A002378(n-1). - Charles Kusniec, Sep 11 2022

Extensions

Partially edited by Joerg Arndt, Mar 11 2010

A001227 Number of odd divisors of n.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Also (1) number of ways to write n as difference of two triangular numbers (A000217), see A136107; (2) number of ways to arrange n identical objects in a trapezoid. - Tom Verhoeff
Also number of partitions of n into consecutive positive integers including the trivial partition of length 1 (e.g., 9 = 2+3+4 or 4+5 or 9 so a(9)=3). (Useful for cribbage players.) See A069283. - Henry Bottomley, Apr 13 2000
This has been described as Sylvester's theorem, but to reduce ambiguity I suggest calling it Sylvester's enumeration. - Gus Wiseman, Oct 04 2022
a(n) is also the number of factors in the factorization of the Chebyshev polynomial of the first kind T_n(x). - Yuval Dekel (dekelyuval(AT)hotmail.com), Aug 28 2003
Number of factors in the factorization of the polynomial x^n+1 over the integers. See also A000005. - T. D. Noe, Apr 16 2003
a(n) = 1 if and only if n is a power of 2 (see A000079). - Lekraj Beedassy, Apr 12 2005
Number of occurrences of n in A049777. - Philippe Deléham, Jun 19 2005
For n odd, n is prime if and only if a(n) = 2. - George J. Schaeffer (gschaeff(AT)andrew.cmu.edu), Sep 10 2005
Also number of partitions of n such that if k is the largest part, then each of the parts 1,2,...,k-1 occurs exactly once. Example: a(9)=3 because we have [3,3,2,1],[2,2,2,2,1] and [1,1,1,1,1,1,1,1,1]. - Emeric Deutsch, Mar 07 2006
Also the number of factors of the n-th Lucas polynomial. - T. D. Noe, Mar 09 2006
Lengths of rows of triangle A182469;
Denoted by Delta_0(n) in Glaisher 1907. - Michael Somos, May 17 2013
Also the number of partitions p of n into distinct parts such that max(p) - min(p) < length(p). - Clark Kimberling, Apr 18 2014
Row sums of triangle A247795. - Reinhard Zumkeller, Sep 28 2014
Row sums of triangle A237048. - Omar E. Pol, Oct 24 2014
A069288(n) <= a(n). - Reinhard Zumkeller, Apr 05 2015
A000203, A000593 and this sequence have the same parity: A053866. - Omar E. Pol, May 14 2016
a(n) is equal to the number of ways to write 2*n-1 as (4*x + 2)*y + 4*x + 1 where x and y are nonnegative integers. Also a(n) is equal to the number of distinct values of k such that k/(2*n-1) + k divides (k/(2*n-1))^(k/(2*n-1)) + k, (k/(2*n-1))^k + k/(2*n-1) and k^(k/(2*n-1)) + k/(2*n-1). - Juri-Stepan Gerasimov, May 23 2016, Jul 15 2016
Also the number of odd divisors of n*2^m for m >= 0. - Juri-Stepan Gerasimov, Jul 15 2016
a(n) is odd if and only if n is a square or twice a square. - Juri-Stepan Gerasimov, Jul 17 2016
a(n) is also the number of subparts in the symmetric representation of sigma(n). For more information see A279387 and A237593. - Omar E. Pol, Nov 05 2016
a(n) is also the number of partitions of n into an odd number of equal parts. - Omar E. Pol, May 14 2017 [This follows from the g.f. Sum_{k >= 1} x^k/(1-x^(2*k)). - N. J. A. Sloane, Dec 03 2020]

Examples

			G.f. = q + q^2 + 2*q^3 + q^4 + 2*q^5 + 2*q^6 + 2*q^7 + q^8 + 3*q^9 + 2*q^10 + ...
From _Omar E. Pol_, Nov 30 2020: (Start)
For n = 9 there are three odd divisors of 9; they are [1, 3, 9]. On the other hand there are three partitions of 9 into consecutive parts: they are [9], [5, 4] and [4, 3, 2], so a(9) = 3.
Illustration of initial terms:
                              Diagram
   n   a(n)                         _
   1     1                        _|1|
   2     1                      _|1 _|
   3     2                    _|1  |1|
   4     1                  _|1   _| |
   5     2                _|1    |1 _|
   6     2              _|1     _| |1|
   7     2            _|1      |1  | |
   8     1          _|1       _|  _| |
   9     3        _|1        |1  |1 _|
  10     2      _|1         _|   | |1|
  11     2    _|1          |1   _| | |
  12     2   |1            |   |1  | |
...
a(n) is the number of horizontal line segments in the n-th level of the diagram. For more information see A286001. (End)
		

References

  • B. C. Berndt, Ramanujan's Notebooks Part V, Springer-Verlag, see p. 487 Entry 47.
  • L. E. Dickson, History of the Theory of Numbers. Carnegie Institute Public. 256, Washington, DC, Vol. 1, 1919; Vol. 2, 1920; Vol. 3, 1923, see vol. 1, p. 306.
  • J. W. L. Glaisher, On the representations of a number as the sum of two, four, six, eight, ten, and twelve squares, Quart. J. Math. 38 (1907), 1-62 (see p. 4).
  • Ronald. L. Graham, Donald E. Knuth, and Oren Patashnik, Concrete Mathematics, 2nd ed. (Addison-Wesley, 1994), see exercise 2.30 on p. 65.
  • P. A. MacMahon, Combinatory Analysis, Cambridge Univ. Press, London and New York, Vol. 1, 1915 and Vol. 2, 1916; see vol. 2, p 28.

Crossrefs

If this sequence counts gapless sets by sum (by Sylvester's enumeration), these sets are ranked by A073485 and A356956. See also A055932, A066311, A073491, A107428, A137921, A333217, A356224, A356841, A356845.
Dirichlet inverse is A327276.

Programs

  • Haskell
    a001227 = sum . a247795_row
    -- Reinhard Zumkeller, Sep 28 2014, May 01 2012, Jul 25 2011
    
  • Magma
    [NumberOfDivisors(n)/Valuation(2*n, 2): n in [1..100]]; // Vincenzo Librandi, Jun 02 2019
    
  • Maple
    for n from 1 by 1 to 100 do s := 0: for d from 1 by 2 to n do if n mod d = 0 then s := s+1: fi: od: print(s); od:
    A001227 := proc(n) local a,d;
        a := 1 ;
        for d in ifactors(n)[2] do
            if op(1,d) > 2 then
                a := a*(op(2,d)+1) ;
            end if;
        end do:
        a ;
    end proc: # R. J. Mathar, Jun 18 2015
  • Mathematica
    f[n_] := Block[{d = Divisors[n]}, Count[ OddQ[d], True]]; Table[ f[n], {n, 105}] (* Robert G. Wilson v, Aug 27 2004 *)
    Table[Total[Mod[Divisors[n], 2]],{n,105}] (* Zak Seidov, Apr 16 2010 *)
    f[n_] := Block[{d = DivisorSigma[0, n]}, If[ OddQ@ n, d, d - DivisorSigma[0, n/2]]]; Array[f, 105] (* Robert G. Wilson v *)
    a[ n_] := Sum[  Mod[ d, 2], { d, Divisors[ n]}]; (* Michael Somos, May 17 2013 *)
    a[ n_] := DivisorSum[ n, Mod[ #, 2] &]; (* Michael Somos, May 17 2013 *)
    Count[Divisors[#],?OddQ]&/@Range[110] (* _Harvey P. Dale, Feb 15 2015 *)
    (* using a262045 from A262045 to compute a(n) = number of subparts in the symmetric representation of sigma(n) *)
    (* cl = current level, cs = current subparts count *)
    a001227[n_] := Module[{cs=0, cl=0, i, wL, k}, wL=a262045[n]; k=Length[wL]; For[i=1, i<=k, i++, If[wL[[i]]>cl, cs++; cl++]; If[wL[[i]]Hartmut F. W. Hoft, Dec 16 2016 *)
    a[n_] := DivisorSigma[0, n / 2^IntegerExponent[n, 2]]; Array[a, 100] (* Amiram Eldar, Jun 12 2022 *)
  • PARI
    {a(n) = sumdiv(n, d, d%2)}; /* Michael Somos, Oct 06 2007 */
    
  • PARI
    {a(n) = direuler( p=2, n, 1 / (1 - X) / (1 - kronecker( 4, p) * X))[n]}; /* Michael Somos, Oct 06 2007 */
    
  • PARI
    a(n)=numdiv(n>>valuation(n,2)) \\ Charles R Greathouse IV, Mar 16 2011
    
  • PARI
    a(n)=sum(k=1,round(solve(x=1,n,x*(x+1)/2-n)),(k^2-k+2*n)%(2*k)==0) \\ Charles R Greathouse IV, May 31 2013
    
  • PARI
    a(n)=sumdivmult(n,d,d%2) \\ Charles R Greathouse IV, Aug 29 2013
    
  • Python
    from functools import reduce
    from operator import mul
    from sympy import factorint
    def A001227(n): return reduce(mul,(q+1 for p, q in factorint(n).items() if p > 2),1) # Chai Wah Wu, Mar 08 2021
  • SageMath
    def A001227(n): return len([1 for d in divisors(n) if is_odd(d)])
    [A001227(n) for n in (1..80)]  # Peter Luschny, Feb 01 2012
    

Formula

Dirichlet g.f.: zeta(s)^2*(1-1/2^s).
Comment from N. J. A. Sloane, Dec 02 2020: (Start)
By counting the odd divisors f n in different ways, we get three different ways of writing the ordinary generating function. It is:
A(x) = x + x^2 + 2*x^3 + x^4 + 2*x^5 + 2*x^6 + 2*x^7 + x^8 + 3*x^9 + 2*x^10 + ...
= Sum_{k >= 1} x^(2*k-1)/(1-x^(2*k-1))
= Sum_{k >= 1} x^k/(1-x^(2*k))
= Sum_{k >= 1} x^(k*(k+1)/2)/(1-x^k) [Ramanujan, 2nd notebook, p. 355.].
(This incorporates comments from Vladeta Jovovic, Oct 16 2002 and Michael Somos, Oct 30 2005.) (End)
G.f.: x/(1-x) + Sum_{n>=1} x^(3*n)/(1-x^(2*n)), also L(x)-L(x^2) where L(x) = Sum_{n>=1} x^n/(1-x^n). - Joerg Arndt, Nov 06 2010
a(n) = A000005(n)/(A007814(n)+1) = A000005(n)/A001511(n).
Multiplicative with a(p^e) = 1 if p = 2; e+1 if p > 2. - David W. Wilson, Aug 01 2001
a(n) = A000005(A000265(n)). - Lekraj Beedassy, Jan 07 2005
Moebius transform is period 2 sequence [1, 0, ...] = A000035, which means a(n) is the Dirichlet convolution of A000035 and A057427.
a(n) = A113414(2*n). - N. J. A. Sloane, Jan 24 2006 (corrected Nov 10 2007)
a(n) = A001826(n) + A001842(n). - Reinhard Zumkeller, Apr 18 2006
Sequence = M*V = A115369 * A000005, where M = an infinite lower triangular matrix and V = A000005, d(n); as a vector: [1, 2, 2, 3, 2, 4, ...]. - Gary W. Adamson, Apr 15 2007
Equals A051731 * [1,0,1,0,1,...]; where A051731 is the inverse Mobius transform. - Gary W. Adamson, Nov 06 2007
a(n) = A000005(n) - A183063(n).
a(n) = d(n) if n is odd, or d(n) - d(n/2) if n is even, where d(n) is the number of divisors of n (A000005). (See the Weisstein page.) - Gary W. Adamson, Mar 15 2011
Dirichlet convolution of A000005 and A154955 (interpreted as a flat sequence). - R. J. Mathar, Jun 28 2011
a(A000079(n)) = 1; a(A057716(n)) > 1; a(A093641(n)) <= 2; a(A038550(n)) = 2; a(A105441(n)) > 2; a(A072502(n)) = 3. - Reinhard Zumkeller, May 01 2012
a(n) = 1 + A069283(n). - R. J. Mathar, Jun 18 2015
a(A002110(n)/2) = n, n >= 1. - Altug Alkan, Sep 29 2015
a(n*2^m) = a(n*2^i), a((2*j+1)^n) = n+1 for m >= 0, i >= 0 and j >= 0. a((2*x+1)^n) = a((2*y+1)^n) for positive x and y. - Juri-Stepan Gerasimov, Jul 17 2016
Conjectures: a(n) = A067742(n) + 2*A131576(n) = A082647(n) + A131576(n). - Omar E. Pol, Feb 15 2017
a(n) = A000005(2n) - A000005(n) = A099777(n)-A000005(n). - Danny Rorabaugh, Oct 03 2017
L.g.f.: -log(Product_{k>=1} (1 - x^(2*k-1))^(1/(2*k-1))) = Sum_{n>=1} a(n)*x^n/n. - Ilya Gutkovskiy, Jul 30 2018
G.f.: (psi_{q^2}(1/2) + log(1-q^2))/log(q), where psi_q(z) is the q-digamma function. - Michael Somos, Jun 01 2019
a(n) = A003056(n) - A238005(n). - Omar E. Pol, Sep 12 2021
Sum_{k=1..n} a(k) ~ n*log(n)/2 + (gamma + log(2)/2 - 1/2)*n, where gamma is Euler's constant (A001620). - Amiram Eldar, Nov 27 2022
Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k)/A000005(k) = log(2) (A002162). - Amiram Eldar, Mar 01 2023
a(n) = Sum_{i=1..n} (-1)^(i+1)*A135539(n,i). - Ridouane Oudra, Apr 13 2023
Previous Showing 11-20 of 538 results. Next