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 21-30 of 61 results. Next

A143255 Triangle read by rows, A128407 * A126988; 1<=k<=n.

Original entry on oeis.org

1, -2, -1, -3, 0, -1, 0, 0, 0, 0, -5, 0, 0, 0, -1, 6, 3, 2, 0, 0, 1, -7, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 5, 0, 0, 2, 0, 0, 0, 0, 1, -11, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 14, 7, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 1
Offset: 1

Views

Author

Gary W. Adamson, Aug 02 2008

Keywords

Comments

Left border = A055615: (1, -2, -3, 0, -5, 6, -7,...).
Right border = A008683, mu(n).
Row sums = A063441: (1, -3, -4, 0, -6, 12, 8,...).

Examples

			Triangle begins:
  1;
  -2, -1;
  -3, 0, -1;
  0, 0, 0, 0;
  -5, 0, 0, 0, -1;
  6, 3, 2, 0, 0, 1;
  -7, 0, 0, 0, 0, 0, -1;
  0, 0, 0, 0, 0, 0, 0, 0;
  0, 0, 0, 0, 0, 0, 0, 0, 0;
  10, 5, 0, 0, 2, 0, 0, 0, 0, 1;
  ...
		

Crossrefs

Programs

  • Mathematica
    t[n_, m_] = MoebiusMu[n]*If[m == 1, n, If[Mod[n, m] == 0, n/m, 0]]; Table[t[n, m], {n, 1, 14}, {m, 1, n}] // Flatten (* Roger L. Bagula, Sep 06 2008 *)

Formula

Triangle read by rows, A128407 * A126988; 1<=k<=n.
t(n,m) = MoebiusMu(n) * A126988(n,m); t(n,m) = MoebiusMu(n) * if(m == 1, n, if(n mod m == 0, n/m, 0)). - Roger L. Bagula, Sep 06 2008

A156826 Square array read by antidiagonals up: same as A126988 except that the first row is A153881.

Original entry on oeis.org

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

Views

Author

Mats Granvik, Feb 16 2009

Keywords

Comments

Replace the zeros with -n/k. That is, the fraction of the row index divided by the column index with a negative sign. Then swap the element in the lower right corner with the element in the upper right corner and calculate the determinant. The result appears to be sequence A156827.

Examples

			Table begins:
   1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, ...
   2,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, ...
   3,  0,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, ...
   4,  2,  0,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0, ...
   5,  0,  0,  0,  1,  0,  0,  0,  0,  0,  0,  0,  0, ...
   6,  3,  2,  0,  0,  1,  0,  0,  0,  0,  0,  0,  0, ...
   7,  0,  0,  0,  0,  0,  1,  0,  0,  0,  0,  0,  0, ...
   8,  4,  0,  2,  0,  0,  0,  1,  0,  0,  0,  0,  0, ...
   9,  0,  3,  0,  0,  0,  0,  0,  1,  0,  0,  0,  0, ...
  10,  5,  0,  0,  2,  0,  0,  0,  0,  1,  0,  0,  0, ...
  11,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  0, ...
  12,  6,  4,  3,  0,  2,  0,  0,  0,  0,  0,  1,  0, ...
  13,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1, ...
		

Crossrefs

Programs

  • Excel
    =rounddown(if(mod(row();column())=0;row()/column();-row()/column())*if(row()=1;column();1);0)
    
  • Excel
    with fractions: =if(mod(row();column())=0;row()/column();-row()/column())*if(row()=1;column();1)

A157283 k X k determinants at the n-th row of A126988.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 3, -3, 1, 1, 4, 6, 0, 1, 1, 5, -10, -10, -5, 1, 1, 6, 15, -20, 15, -6, 1, 1, 7, -21, 0, 0, -21, -7, 1, 1, 8, 28, 56, 0, 0, 0, 0, 1, 1, 9, -36, 84, 126, 126, 0, 0, 0, 1, 1, 10, 45, 0, -210, 252, -210, 0, 0, -10, 1, 1, 11, -55, -165, 330, 0, 0, 330, 165, -55, -11, 1, 1
Offset: 1

Views

Author

Mats Granvik and Gary W. Adamson, Feb 26 2009

Keywords

Comments

The n-th value in the k-th column in this triangle is a k X k determinant of A126988 beginning at the n-th row and the first column of A126988. The absolute values of the nonzero values appear to be as in Pascal's triangle A007318. The second diagonal appears to be zero at nonsquare free column indices. There are a lot of zeros in the middle as the table gets bigger.

Examples

			Table begins:
1
1    1
1    2    1
1    3   -3    1
1    4    6    0    1
1    5  -10  -10   -5    1
1    6   15  -20   15   -6    1
1    7  -21    0    0  -21   -7    1
1    8   28   56    0    0    0    0    1
1    9  -36   84  126  126    0    0    0    1
1   10   45    0 -210  252 -210    0    0  -10    1
		

Crossrefs

A157379 Triangle read by rows: k X k determinants at the n-th row of A126988 without the first column of ones.

Original entry on oeis.org

1, 2, 1, 3, -3, 1, 4, 6, 0, 1, 5, -10, -10, -5, 1, 6, 15, -20, 15, -6, 1, 7, -21, 0, 0, -21, -7, 1, 8, 28, 56, 0, 0, 0, 0, 1, 9, -36, 84, 126, 126, 0, 0, 0, 1, 10, 45, 0, -210, 252, -210, 0, 0, -10, 1, 11, -55, -165, 330, 0, 0, 330, 165, -55, -11, 1, 12, 66, -220, -495, 0, 0, 792
Offset: 1

Views

Author

Mats Granvik & Gary W. Adamson, Feb 28 2009

Keywords

Examples

			Table begins:
   1;
   2,    1;
   3,   -3,    1;
   4,    6,    0,    1;
   5,  -10,  -10,   -5,    1;
   6,   15,  -20,   15,   -6,    1;
   7,  -21,    0,    0,  -21,   -7,    1;
   8,   28,   56,    0,    0,    0,    0,    1;
   9,  -36,   84,  126,  126,    0,    0,    0,    1;
  10,   45,    0, -210,  252, -210,    0,    0,  -10,    1;
		

Crossrefs

Cf. A157283.

A166139 Triangle T(n,k) read by rows. A080305(A126988(n,k)) if k|n, 0 otherwise.

Original entry on oeis.org

1, 2, 1, 3, 0, 1, 1, 2, 0, 1, 5, 0, 0, 0, 1, 1, 3, 2, 0, 0, 1, 7, 0, 0, 0, 0, 0, 1, 1, 1, 0, 2, 0, 0, 0, 1, 1, 0, 3, 0, 0, 0, 0, 0, 1, 1, 5, 0, 0, 2, 0, 0, 0, 0, 1, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 3, 0, 2, 0, 0, 0, 0, 0, 1, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
Offset: 1

Views

Author

Mats Granvik, Oct 08 2009

Keywords

Examples

			Table begins:
1
2,1
3,0,1
1,2,0,1
5,0,0,0,1
1,3,2,0,0,1
7,0,0,0,0,0,1
1,1,0,2,0,0,0,1
1,0,3,0,0,0,0,0,1
1,5,0,0,2,0,0,0,0,1
11,0,0,0,0,0,0,0,0,0,1
1,1,1,3,0,2,0,0,0,0,0,1
13,0,0,0,0,0,0,0,0,0,0,0,1
		

Crossrefs

Cf. A080305, row products A166140.

A166141 Triangle T(n,k) read by rows. A080304(A126988).

Original entry on oeis.org

1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 6, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 10, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 6, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
Offset: 1

Views

Author

Mats Granvik, Oct 08 2009

Keywords

Examples

			Table begins:
1
1,1
1,0,1
1,1,0,1
1,0,0,0,1
6,1,1,0,0,1
1,0,0,0,0,0,1
1,1,0,1,0,0,0,1
1,0,1,0,0,0,0,0,1
10,1,0,0,1,0,0,0,0,1
1,0,0,0,0,0,0,0,0,0,1
1,6,1,1,0,1,0,0,0,0,0,1
1,0,0,0,0,0,0,0,0,0,0,0,1
		

Crossrefs

Cf. A080304, row products A166142.

A127375 Triangle A126988 * A054521, as infinite lower triangular matrices.

Original entry on oeis.org

1, 3, 0, 4, 1, 0, 7, 0, 1, 0, 6, 1, 1, 1, 0, 12, 2, 0, 0, 1, 0, 8, 1, 1, 1, 1, 1, 0, 15, 0, 3, 0, 1, 0, 1, 0, 13, 4, 0, 1, 1, 0, 1, 1, 0, 18, 2, 3, 2, 0, 0, 1, 0, 1, 0, 12, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 28, 4, 3, 0, 3, 0, 1, 0, 0, 0, 1, 0, 14, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0
Offset: 1

Views

Author

Gary W. Adamson, Jan 12 2007

Keywords

Comments

Left column gives A000203.
Row sums give A018804.

Examples

			First few rows of the triangle are:
1;
3, 0;
4, 1, 0;
7, 0, 1, 0;
6, 1, 1, 1, 0;
12, 2, 0, 0, 1, 0;
8, 1, 1, 1, 1, 1, 0;
...
		

Crossrefs

Extensions

a(17) = 2 inserted and more terms from Georg Fischer, May 29 2023

A159906 Triangle read by rows, A126988 * A054533.

Original entry on oeis.org

1, 1, 1, 2, -1, 2, 2, 0, 0, 2, 4, -1, -1, -1, 4, 2, 0, 2, -1, 1, 2, 6, -1, -1, -1, -1, -1, 6, 4, 0, 0, 0, 0, 0, 0, 4, 6, -3, 3, 0, 0, -3, 0, 0, 6, 4, 2, -1, -3, 4, -1, 1, -1, 1, 4, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, 10, 4, -4, 4, 2, 2, 0, 0, -2, 0, 2, 0, 4
Offset: 1

Views

Author

Gary W. Adamson, Apr 25 2009

Keywords

Comments

Row sums = n, right and left borders = A000012, phi(n).

Examples

			First few rows of the triangle =
1;
1,...1;
2,..-1,...2;
2,...0,...0,...2;
4,..-1,..-1,..-1,...4;
2,...0,...2,..-1,...1,...2;
6,..-1,..-1,..-1,..-1,..-1,...6;
4,...0,...0,...0,...0,...0,...0,...4;
6,..-3,...3,...0,...0,..-3,...0,...0,...6;
4,...2,..-1,..-3,...4,..-1,...1,..-1,...1,...4;
10,.-1,..-1,..-1,..-1,..-1,..-1,..-1,..-1,..-1,...10;
4,..-4,...4,...2,...2,...0,...0,..-2,...0,...2,....0,...4;
12,.-1,..-1,..-1,..-1,..-1,..-1,..-1,..-1,..-1,...-1,..-1,...12;
6,...4,..-1,..-3,..-1,..-3,...6,..-1,...1,..-1,....1,...1,....1,...6;
8,..-7,...5,..-2,...8,..-2,...1,...1,..-2,..-4,....1,..-2,....1,...1,...8;
8,...0,...0,...0,...0,...0,...0,...0,...0,...0,....0,...0,....0,...0,...0,...8;
...
		

Crossrefs

Formula

Triangle read by rows, A126988 * A054533, where A054533 = the lower half of the Ramanujan sum table.

Extensions

a(29) split and more terms from Georg Fischer, May 29 2023

A008284 Triangle of partition numbers: T(n,k) = number of partitions of n in which the greatest part is k, 1 <= k <= n. Also number of partitions of n into k positive parts, 1 <= k <= n.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 1, 3, 3, 2, 1, 1, 1, 3, 4, 3, 2, 1, 1, 1, 4, 5, 5, 3, 2, 1, 1, 1, 4, 7, 6, 5, 3, 2, 1, 1, 1, 5, 8, 9, 7, 5, 3, 2, 1, 1, 1, 5, 10, 11, 10, 7, 5, 3, 2, 1, 1, 1, 6, 12, 15, 13, 11, 7, 5, 3, 2, 1, 1, 1, 6, 14, 18, 18, 14, 11, 7, 5, 3, 2, 1, 1, 1, 7, 16, 23, 23, 20, 15, 11, 7, 5, 3, 2, 1, 1
Offset: 1

Views

Author

Keywords

Comments

From Frederik Beaujean (beaujean(AT)mpp.mpg.de), Apr 09 2010: (Start)
A000041(n+1) = 1 + Sum_{r=1..n} Sum_{k=1..min(r,n-r+1)} T(r,k).
T(n, n-k) is also the number of partitions of k in which the greatest part is at most n-k. (End)
From Richard R. Forberg, Dec 26 2014: (Start)
Elements of T(n, k) for n <= 2+3k, equal A000041(n-k) - A000070(n-2k-1), with the assumption A000070(n) = 0 for n < 0.
The diagonal T(2+2k, k), for k > 1 equals A007042, and the diagonal T(3+3k,k), for k >= 1, equals A104384. (End)
T(-n, k) is used as a definition for A380038, which can therefore be seen as an extension of this sequence for negative n. - Friedjof Tellkamp, Jan 18 2025

Examples

			The triangle T(n,k) begins:
   n\k 1  2  3  4  5  6  7  8  9 10 11 12 ...
   1:  1
   2:  1  1
   3:  1  1  1
   4:  1  2  1  1
   5:  1  2  2  1  1
   6:  1  3  3  2  1  1
   7:  1  3  4  3  2  1  1
   8:  1  4  5  5  3  2  1  1
   9:  1  4  7  6  5  3  2  1  1
  10:  1  5  8  9  7  5  3  2  1  1
  11:  1  5 10 11 10  7  5  3  2  1  1
  12:  1  6 12 15 13 11  7  5  3  2  1  1
... Reformatted and extended by _Wolfdieter Lang_, Dec 03 2012; additional extension by _Bob Selcoe_, Jun 09 2013
T(7,3) = 4 because we have [3,3,1], [3,2,2], [3,2,1,1] and [3,1,1,1,1], each having greatest part 3; or [5,1,1], [4,2,1], [3,3,1] and [3,2,2] each having 3 parts.
* Example from formula above: T(10,4) = 9 because T(6,4) + T(6,3) + T(6,2) + T(6,1) = 2 + 3 + 3 + 1 = 9.
* P(n) = P(n-1) + DT(n-1). P(n) = unordered partitions of n. (A000041) DT(n-1) = sum of diagonals beginning at T(n-1,1).
Example P(11) = 56, P(10) = 42, sum DT(10) = 1 + 4 + 5 + 3 + 1 = 14. - _Bob Selcoe_, Jun 09 2013
From _Omar E. Pol_, Nov 19 2019: (Start)
Illustration of initial terms: T(n,k) is also the number of vertical line segments in the k-th column of the n-th diagram, which represents the partitions of n:
.
    1    1 1    1 1 1    1 2 1 1    1 2 2 1 1    1 3 3 2 1 1    1 3 4 3 2 1 1
.
   _|   _| |   _| | |   _| | | |   _| | | | |   _| | | | | |   _| | | | | | |
        _ _|   _ _| |   _ _| | |   _ _| | | |   _ _| | | | |   _ _| | | | | |
               _ _ _|   _ _ _| |   _ _ _| | |   _ _ _| | | |   _ _ _| | | | |
                        _ _|   |   _ _|   | |   _ _|   | | |   _ _|   | | | |
                        _ _ _ _|   _ _ _ _| |   _ _ _ _| | |   _ _ _ _| | | |
                                   _ _ _|   |   _ _ _|   | |   _ _ _|   | | |
                                   _ _ _ _ _|   _ _ _ _ _| |   _ _ _ _ _| | |
                                                _ _|   |   |   _ _|   |   | |
                                                _ _ _ _|   |   _ _ _ _|   | |
                                                _ _ _|     |   _ _ _|     | |
                                                _ _ _ _ _ _|   _ _ _ _ _ _| |
                                                               _ _ _|   |   |
                                                               _ _ _ _ _|   |
                                                               _ _ _ _|     |
                                                               _ _ _ _ _ _ _|
(End)
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, pp. 94, 96 and 307.
  • F. N. David, M. G. Kendall and D. E. Barton, Symmetric Function and Allied Tables, Cambridge, 1966, p. 219.
  • D. E. Knuth, The Art of Computer Programming, Volume 4, Fascicle 3: Generating All Combinations and Partitions, Addison-Wesley Professional, 2005, pp. 38, 45, 50 [From Frederik Beaujean (beaujean(AT)mpp.mpg.de), Apr 09 2010]
  • D. E. Knuth, The Art of Computer Programming, vol. 4A, Combinatorial Algorithms, Section 7.2.1.4, p. 400.
  • D. S. Mitrinovic et al., Handbook of Number Theory, Kluwer, Section XIV.2, p. 493.
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 294.

Crossrefs

A000041 is row sums and diagonal.
Partial sums of rows gives A026820.
Read from right to left gives A058398.
Subtriangle of A072233 without row n=0 and column m=0.
Cf. A007042, A104384 which are diagonals with slope -2, -3.

Programs

  • Haskell
    a008284 n k = a008284_tabl !! (n-1) !! (k-1)
    a008284_row n = a008284_tabl !! (n-1)
    a008284_tabl = [1] : f [[1]] where
       f xss = ys : f (ys : xss) where
         ys = (map sum $ zipWith take [1..] xss) ++ [1]
    -- Reinhard Zumkeller, Sep 05 2014
    
  • Maple
    G:=-1+1/product(1-t*x^j,j=1..15): Gser:=simplify(series(G,x=0,17)): for n from 1 to 14 do P[n]:=coeff(Gser,x^n) od: for n from 1 to 14 do seq(coeff(P[n],t^j),j=1..n) od; # yields sequence in triangular form; Emeric Deutsch, Feb 12 2006
    with(combstruct):for n from 0 to 18 do seq(count(Partition(n), size=m), m = 1 .. n) od; # Zerinvary Lajos, Mar 30 2009
    T := proc(n,k) option remember; if k < 0 or n < 0 then 0 elif k = 0 then if n = 0 then 1 else 0 fi else T(n - 1, k - 1) + T(n - k, k) fi end: seq(print(seq(T(n, k), k=1..n)),n=1..14); # Peter Luschny, Jul 24 2011
  • Mathematica
    Column[Table[ IntegerPartitions[n, {k}] // Length, {n, 1, 20}, {k, 1, n}], Center] (* Frederik Beaujean (beaujean(AT)mpp.mpg.de), Apr 09 2010 *)
    (*Recurrence closely related to natural numbers and number of divisors of n*)
    Clear[t]; nn = 14; t[n_, 1] = 1; t[n_, k_] := t[n, k] = If[n >= k, Sum[t[n - i, k - 1], {i, 1, n - 1}] - Sum[t[n - i, k], {i, 1, k - 1}], 0];Flatten[Table[Table[t[n, k], {k, 1, n}], {n, 1, nn}]][[1 ;; 96]] (* Mats Granvik, Jan 01 2015 *)
    Table[SeriesCoefficient[1/QPochhammer[a q, q], {q, 0, n}, {a, 0, k}], {n, 1, 15}, {k, 1, n}] // Column (* Vladimir Reshetnikov, Nov 18 2016 *)
    T[n_, k_] := T[n, k] = If[n>0 && k>0, T[n-1, k-1] + T[n-k, k], Boole[n==0 && k==0]]
    Table[T[n, k], {n, 1, 20}, {k, 1, n}] // Flatten (* Robert A. Russell, May 12 2018 after Knuth 7.2.1.4 (39) *)
  • PARI
    T(n,k)=#partitions(n-k,k)
    for(n=1,9,for(k=1,n,print1(T(n,k)", "))) \\ Charles R Greathouse IV, Jan 04 2016
    
  • PARI
    A8284=[]; A008284(n,k)={for(n=#A8284+1,n,A8284=concat(A8284,[vector(n,k,if(2*k1,A8284[n-k][k]+A8284[n-1][k-1],1),numbpart(n-k)))]));if(k,A8284[n][k],A8284[n])} \\ Without 2nd argument, return row n. - M. F. Hasler, Sep 26 2017
    
  • Python
    from functools import lru_cache
    @lru_cache(maxsize=None)
    def A008284_T(n,k):
        if k==n or k==1: return 1
        if k>n: return 0
        return A008284_T(n-1,k-1)+A008284_T(n-k,k) # Chai Wah Wu, Sep 21 2023
  • Sage
    from sage.combinat.partition import number_of_partitions_length
    [[number_of_partitions_length(n, k) for k in (1..n)] for n in (1..12)] # Peter Luschny, Aug 01 2015
    

Formula

T(n, k) = Sum_{i=1..k} T(n-k, i), for 1 <= k <= n-1; T(n, n) = 1 for n >= 1.
Or, T(n, 1) = T(n, n) = 1, T(n, k) = 0 (k > n), T(n, k) = T(n-1, k-1) + T(n-k, k).
G.f. for k-th column: x^k/(Product_{j=1..k} (1-x^j)). - Wolfdieter Lang, Nov 29 2000
G.f.: A(x, y) = Product_{n>=1} 1/(1-x^n)^(P_n(y)/n), where P_n(y) = Sum_{d|n} eulerphi(n/d)*y^d. - Paul D. Hanna, Jul 13 2004
If k >= n/2, T(n,k) = T(2(n-k),n-k) = A000041(n-k). - Franklin T. Adams-Watters, Jan 12 2006 [Relation included by Hans Loeblich, Apr 16 2019, relation extended by Evan Robinson, Jun 30 2021]
G.f.: G(t,x) = -1 + 1/Product_{j>=1} (1-t*x^j). - Emeric Deutsch, Feb 12 2006
A002865(n) = Sum_{k=2..floor((n+2)/2)} T(n-k+1,k-1). - Reinhard Zumkeller, Nov 04 2007
A000700(n) = Sum_{k=1..n} (-1)^(n-k) T(n,k). - Jeremy L. Martin, Jul 06 2013
G.f.: -1 + e^(F(x,z)), where F(x,z) = Sum_{n >= 1} (x*z)^n/(n*(1 - z^n)) is a g.f. for A126988. - Peter Bala, Jan 13 2015
Also, T(n, n-k) = k for k = 1, 2, 3; n >= 2k. T(n, 2) = floor(n/2). T(n, 3) = round(n^2/12). - M. F. Hasler, Sep 26 2017
T(n,k) = [n>0 & k>0] * (T(n-1,k-1) + T(n-k,k)) + [n==0 & k==0]. - Robert A. Russell, May 12 2018 from Knuth 7.2.1.4 (39)
T(n, k) = Sum_{i=0..n-1} T(n-ik-1, k-1) for k >= 1; T(-n, k) = 0 for n > 0; T(n, 0) = [n==0]. - Joshua Swanson (writing for Juexian Li), May 24 2020

A000593 Sum of odd divisors of n.

Original entry on oeis.org

1, 1, 4, 1, 6, 4, 8, 1, 13, 6, 12, 4, 14, 8, 24, 1, 18, 13, 20, 6, 32, 12, 24, 4, 31, 14, 40, 8, 30, 24, 32, 1, 48, 18, 48, 13, 38, 20, 56, 6, 42, 32, 44, 12, 78, 24, 48, 4, 57, 31, 72, 14, 54, 40, 72, 8, 80, 30, 60, 24, 62, 32, 104, 1, 84, 48, 68, 18, 96, 48, 72, 13, 74, 38, 124
Offset: 1

Views

Author

Keywords

Comments

Denoted by Delta(n) or Delta_1(n) in Glaisher 1907. - Michael Somos, May 17 2013
A069289(n) <= a(n). - Reinhard Zumkeller, Apr 05 2015
A000203, A001227 and this sequence have the same parity: A053866. - Omar E. Pol, May 14 2016
For the g.f.s given below by Somos Oct 29 2005, Jovovic, Oct 11 2002 and Arndt, Nov 09 2010, see the Hardy-Wright reference, proof of Theorem 382, p. 312, with x^2 replaced by x. - Wolfdieter Lang, Dec 11 2016
a(n) is also the total number of parts in all partitions of n into an odd number of equal parts. - Omar E. Pol, Jun 04 2017
It seems that a(n) divides A000203(n) for every n. - Ivan N. Ianakiev, Nov 25 2017 [Yes, see the formula dated Dec 14 2017].
Also, alternating row sums of A126988. - Omar E. Pol, Feb 11 2018
Where a(n) shows the number of equivalence classes of Hurwitz quaternions with norm n (equivalence defined by right multiplication with one of the 24 Hurwitz units as in A055672), A046897(n) seems to give the number of equivalence classes of Lipschitz quaternions with norm n (equivalence defined by right multiplication with one of the 8 Lipschitz units). - R. J. Mathar, Aug 03 2025

Examples

			G.f. = x + x^2 + 4*x^3 + x^4 + 6*x^5 + 4*x^6 + 8*x^7 + x^8 + 13*x^9 + 6*x^10 + 12*x^11 + ...
		

References

  • Jean-Marie De Koninck and Armel Mercier, 1001 Problèmes en Théorie Classique des Nombres, Problème 496, pp. 69-246, Ellipses, Paris, 2004.
  • G. H. Hardy, Ramanujan: twelve lectures on subjects suggested by his life and work, Cambridge, University Press, 1940, p. 132.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, Fifth Edition, Clarendon Press, Oxford, 2003, p. 312.
  • Friedrich Hirzebruch, Thomas Berger, and Rainer Jung, Manifolds and Modular Forms, Vieweg, 1994, p. 133.
  • John Riordan, Combinatorial Identities, Wiley, 1968, p. 187.
  • 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).

Crossrefs

Cf. A000005, A000203, A000265, A001227, A006128, A050999, A051000, A051001, A051002, A065442, A078471 (partial sums), A069289, A247837 (subset of the primes).

Programs

  • Haskell
    a000593 = sum . a182469_row  -- Reinhard Zumkeller, May 01 2012, Jul 25 2011
    
  • Magma
    m:=50; R:=PowerSeriesRing(Integers(), m); Coefficients(R!( (&+[j*x^j/(1+x^j): j in [1..2*m]])  )); // G. C. Greubel, Nov 07 2018
    
  • Magma
    [&+[d:d in Divisors(n)|IsOdd(d)]:n in [1..75]]; // Marius A. Burtea, Aug 12 2019
    
  • Maple
    A000593 := proc(n) local d,s; s := 0; for d from 1 by 2 to n do if n mod d = 0 then s := s+d; fi; od; RETURN(s); end;
  • Mathematica
    Table[a := Select[Divisors[n], OddQ[ # ]&]; Sum[a[[i]], {i, 1, Length[a]}], {n, 1, 60}] (* Stefan Steinerberger, Apr 01 2006 *)
    f[n_] := Plus @@ Select[ Divisors@ n, OddQ]; Array[f, 75] (* Robert G. Wilson v, Jun 19 2011 *)
    a[ n_] := If[ n < 1, 0, Sum[ -(-1)^d n / d, {d, Divisors[ n]}]]; (* Michael Somos, May 17 2013 *)
    a[ n_] := If[ n < 1, 0, DivisorSum[ n, -(-1)^# n / # &]]; (* Michael Somos, May 17 2013 *)
    a[ n_] := If[ n < 1, 0, Sum[ Mod[ d, 2] d, {d, Divisors[ n]}]]; (* Michael Somos, May 17 2013 *)
    a[ n_] := If[ n < 1, 0, Times @@ (If[ # < 3, 1, (#^(#2 + 1) - 1) / (# - 1)] & @@@ FactorInteger @ n)]; (* Michael Somos, Aug 15 2015 *)
    Array[Total[Divisors@ # /. d_ /; EvenQ@ d -> Nothing] &, {75}] (* Michael De Vlieger, Apr 07 2016 *)
    Table[SeriesCoefficient[n Log[QPochhammer[-1, x]], {x, 0, n}], {n, 1, 75}] (* Vladimir Reshetnikov, Nov 21 2016 *)
    Table[DivisorSum[n,#&,OddQ[#]&],{n,80}] (* Harvey P. Dale, Jun 19 2021 *)
  • PARI
    {a(n) = if( n<1, 0, sumdiv( n, d, (-1)^(d+1) * n/d))}; /* Michael Somos, May 29 2005 */
    
  • PARI
    N=66; x='x+O('x^N); Vec( serconvol( log(prod(j=1,N,1+x^j)), sum(j=1,N,j*x^j)))  /* Joerg Arndt, May 03 2008, edited by M. F. Hasler, Jun 19 2011 */
    
  • PARI
    s=vector(100);for(n=1,100,s[n]=sumdiv(n,d,d*(d%2)));s /* Zak Seidov, Sep 24 2011*/
    
  • PARI
    a(n)=sigma(n>>valuation(n,2)) \\ Charles R Greathouse IV, Sep 09 2014
    
  • Python
    from math import prod
    from sympy import factorint
    def A000593(n): return prod((p**(e+1)-1)//(p-1) for p, e in factorint(n).items() if p > 2) # Chai Wah Wu, Sep 09 2021
  • Sage
    [sum(k for k in divisors(n) if k % 2) for n in (1..75)] # Giuseppe Coppoletta, Nov 02 2016
    

Formula

Inverse Moebius Transform of [0, 1, 0, 3, 0, 5, ...].
Dirichlet g.f.: zeta(s)*zeta(s-1)*(1-2^(1-s)).
a(2*n) = A000203(2*n)-2*A000203(n), a(2*n+1) = A000203(2*n+1). - Henry Bottomley, May 16 2000
a(2*n) = A054785(2*n) - A000203(2*n). - Reinhard Zumkeller, Apr 23 2008
Multiplicative with a(p^e) = 1 if p = 2, (p^(e+1)-1)/(p-1) if p > 2. - David W. Wilson, Aug 01 2001
a(n) = Sum_{d divides n} (-1)^(d+1)*n/d, Dirichlet convolution of A062157 with A000027. - Vladeta Jovovic, Sep 06 2002
Sum_{k=1..n} a(k) is asymptotic to c*n^2 where c=Pi^2/24. - Benoit Cloitre, Dec 29 2002
G.f.: Sum_{n>0} n*x^n/(1+x^n). - Vladeta Jovovic, Oct 11 2002
G.f.: (theta_3(q)^4 + theta_2(q)^4 -1)/24.
G.f.: Sum_{k>0} -(-x)^k / (1 - x^k)^2. - Michael Somos, Oct 29 2005
a(n) = A050449(n)+A050452(n); a(A000079(n))=1; a(A005408(n))=A000203(A005408(n)). - Reinhard Zumkeller, Apr 18 2006
From Joerg Arndt, Nov 09 2010: (Start)
G.f.: Sum_{n>=1} (2*n-1) * q^(2*n-1) / (1-q^(2*n-1)).
G.f.: deriv(log(P)) = deriv(P)/P where P = Product_{n>=1} (1 + q^n). (End)
Dirichlet convolution of A000203 with [1,-2,0,0,0,...]. - R. J. Mathar, Jun 28 2011
a(n) = Sum_{k = 1..A001227(n)} A182469(n,k). - Reinhard Zumkeller, May 01 2012
G.f.: -1/Q(0), where Q(k) = (x-1)*(1-x^(2*k+1)) + x*(-1 +x^(k+1))^4/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, Apr 30 2013
a(n) = Sum_{k=1..n} k*A000009(k)*A081362(n-k). - Mircea Merca, Feb 26 2014
a(n) = A000203(n) - A146076(n). - Omar E. Pol, Apr 05 2016
a(2*n) = a(n). - Giuseppe Coppoletta, Nov 02 2016
From Wolfdieter Lang, Dec 11 2016: (Start)
G.f.: Sum_{n>=1} x^n*(1+x^(2*n))/(1-x^(2*n))^2, from the second to last equation of the proof to Theorem 382 (with x^2 -> x) of the Hardy-Wright reference, p. 312.
a(n) = Sum_{d|n} (-d)*(-1)^(n/d), commutating factors of the D.g.f. given above by Jovovic, Oct 11 2002. See also the a(n) version given by Jovovic, Sep 06 2002. (End)
a(n) = A000203(n)/A038712(n). - Omar E. Pol, Dec 14 2017
a(n) = A000203(n)/(2^(1 + (A183063(n)/A001227(n))) - 1). - Omar E. Pol, Nov 06 2018
a(n) = A000203(2n) - 2*A000203(n). - Ridouane Oudra, Aug 28 2019
From Peter Bala, Jan 04 2021: (Start)
a(n) = (2/3)*A002131(n) + (1/3)*A002129(n) = (2/3)*A002131(n) + (-1)^(n+1)*(1/3)*A113184(n).
a(n) = A002131(n) - (1/2)*A146076; a(n) = 2*A002131(n) - A000203(n). (End)
a(n) = A000203(A000265(n)) - John Keith, Aug 30 2021
Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k)/A000203(k) = A065442 - 1 = 0.60669... . - Amiram Eldar, Dec 14 2024
Previous Showing 21-30 of 61 results. Next