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-6 of 6 results.

A245579 Number of odd divisors of n multiplied by n.

Original entry on oeis.org

1, 2, 6, 4, 10, 12, 14, 8, 27, 20, 22, 24, 26, 28, 60, 16, 34, 54, 38, 40, 84, 44, 46, 48, 75, 52, 108, 56, 58, 120, 62, 32, 132, 68, 140, 108, 74, 76, 156, 80, 82, 168, 86, 88, 270, 92, 94, 96, 147, 150, 204, 104, 106, 216, 220, 112, 228, 116, 118, 240, 122
Offset: 1

Views

Author

Michael Somos, Jul 26 2014

Keywords

Examples

			G.f. = x + 2*x^2 + 6*x^3 + 4*x^4 + 10*x^5 + 12*x^6 + 14*x^7 + 8*x^8 + ...
For n = 10 there are two odd divisors of 10: 1 and 5, so a(10) = 2*10 = 20.
		

Crossrefs

Programs

  • Maple
    seq(n*numtheory:-tau(n/2^padic:-ordp(n,2)), n=1..100); # Robert Israel, Apr 26 2017
  • Mathematica
    a[ n_] := If[ n < 1, 0, n Sum[ Mod[d, 2], {d, Divisors @ n}]];
    (* Second program: *)
    Table[n DivisorSum[n, 1 &, OddQ], {n, 61}] (* Michael De Vlieger, Apr 24 2017 *)
  • PARI
    {a(n) = if( n<1, 0, n * sumdiv(n, d, d%2))};
    
  • PARI
    {a(n) = if( n<0, 0, polcoeff( sum(k=1, n, if( k%2, k * x^k / (1 - x^k)^2), x * O(x^n)), n))};
    
  • PARI
    {a(n) = if( n<1, 0, n * numdiv(n / 2^valuation(n, 2)))} \\ Fast when n has many divisors. Jens Kruse Andersen, Jul 26 2014
    
  • Python
    from sympy import divisors
    def a(n): return n*len(list(filter(lambda i: i%2==1, divisors(n)))) # Indranil Ghosh, Apr 24 2017
    
  • Python
    from math import prod
    from sympy import factorint
    def A245579(n): return n*prod(e+1 for e in factorint(n>>(~n&n-1).bit_length()).values()) # Chai Wah Wu, Dec 31 2023

Formula

a(n) is multiplicative with a(2^e) = 2^e, a(p^e) = p^e * (e+1) if p>2.
a(n) = n * A001227(n).
G.f.: Sum_{k>0 odd} k * x^k / (1 - x^k)^2.
From Amiram Eldar, Dec 31 2022: (Start)
Dirichlet g.f.: zeta(s-1)^2*(1-1/2^(s-1)).
Sum_{k=1..n} a(k) ~ n^2*log(n)/4 + (4*gamma + 2*log(2) - 1)*n^2/8, where gamma is Euler's constant (A001620). (End)

Extensions

Edited by N. J. A. Sloane, Apr 27 2022

A328365 Irregular triangle read by rows, T(n,k), n >= 1, k >= 1, in which row n lists in reverse order the partitions of n into consecutive parts.

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Oct 22 2019

Keywords

Comments

For m >= 0, row 2^m consists of just one element (2^m). - Paolo Xausa, May 24 2025

Examples

			Triangle begins:
  [1];
  [2];
  [1, 2], [3];
  [4];
  [2, 3], [5];
  [1, 2, 3], [6];
  [3, 4], [7];
  [8];
  [2, 3, 4], [4, 5], [9];
  [1, 2, 3, 4], [10];
  [5, 6], [11];
  [3, 4, 5], [12];
  [6, 7], [13];
  [2, 3, 4, 5], [14];
  [1, 2, 3, 4, 5], [4, 5, 6], [7, 8], [15];
  [16];
  [8, 9], [17];
  [3, 4, 5, 6], [5, 6, 7], [18];
  [9, 10], [19];
  [2, 3, 4, 5, 6], [20];
  [1, 2, 3, 4, 5, 6], [6, 7, 8], [10, 11], [21];
  [4, 5, 6, 7], [22];
  [11, 12], [23];
  [7, 8, 9], [24];
  [3, 4, 5, 6, 7], [12, 13], [25];
  [5, 6, 7, 8], [26];
  [2, 3, 4, 5, 6, 7], [8, 9, 10], [13, 14], [27];
  [1, 2, 3, 4, 5, 6, 7], [28];
  ...
For n = 9 there are three partitions of 9 into consecutive parts, they are [9], [5, 4], [4, 3, 2], so the 9th row of triangle is [2, 3, 4], [4, 5], [9].
Note that in the below diagram the number of horizontal line segments in the n-th row equals A001227(n), the number of partitions of n into consecutive parts, so we can find the partitions of n into consecutive parts as follows: consider the vertical blocks of numbers that start exactly in the n-th row of the diagram, for example: for n = 15 consider the vertical blocks of numbers that start exactly in the 15th row. They are [1, 2, 3, 4, 5], [4, 5, 6], [7, 8], [15], equaling the 15th row of the above triangle.
Row        _
  1       |1|_
  2       |_ 2|_
  3       |1|  3|_
  4       |2|_   4|_
  5       |_ 2|    5|_
  6       |1|3|_     6|_
  7       |2|  3|      7|_
  8       |3|_ 4|_       8|_
  9       |_ 2|  4|        9|_
  10      |1|3|  5|_        10|_
  11      |2|4|_   5|         11|_
  12      |3|  3|  6|_          12|_
  13      |4|_ 4|    6|           13|_
  14      |_ 2|5|_   7|_            14|_
  15      |1|3|  4|    7|             15|_
  16      |2|4|  5|    8|_              16|_
  17      |3|5|_ 6|_     8|               17|_
  18      |4|  3|  5|    9|_                18|_
  19      |5|_ 4|  6|      9|                 19|_
  20      |_ 2|5|  7|_    10|_                  20|_
  21      |1|3|6|_   6|     10|                   21|_
  22      |2|4|  4|  7|     11|_                    22|_
  23      |3|5|  5|  8|_      11|                     23|_
  24      |4|6|_ 6|    7|     12|_                      24|_
  25      |5|  3|7|_   8|       12|                       25|_
  26      |6|_ 4|  5|  9|_      13|_                        26|_
  27      |_ 2|5|  6|    8|       13|                         27|_
  28      |1|3|6|  7|    9|       14|                           28|
  ...
The diagram is infinite. For more information about the diagram see A286001.
For an amazing connection with sum of divisors function (A000203) see A237593.
		

Crossrefs

Mirror of A299765.
Row n has length A204217(n).
Row sums give A245579.
Column 1 gives A118235.
Right border gives A000027.
Records give A000027.
Where records occur gives A285899.
The number of partitions into consecutive parts in row n is A001227(n).
For tables of partitions into consecutive parts see A286000 and A286001.

Programs

  • Mathematica
    Table[With[{h = Floor[n/2] - Boole[EvenQ@ n]},Append[Array[Which[Total@ # == n, #, Total@ Most@ # == n, Most[#], True, Nothing] &@ NestWhile[Append[#, #[[-1]] + 1] &, {#}, Total@ # <= n &, 1, h - # + 1] &, h], {n}]], {n, 24}] // Flatten (* Michael De Vlieger, Oct 22 2019 *)

A328361 Triangle read by rows: T(n,k) is the total number of k's in all partitions of n into consecutive parts, (1 <= k <= n).

Original entry on oeis.org

1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 2, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1
Offset: 1

Views

Author

Omar E. Pol, Oct 20 2019

Keywords

Comments

Iff n is a power of 2 (A000079) then row n lists n - 1 zeros together with 1.
Iff n is an odd prime (A065091) then row n lists (n - 3)/2 zeros, 1, 1, (n - 3)/2 zeros, 1.

Examples

			Triangle begins:
1;
0, 1;
1, 1, 1;
0, 0, 0, 1;
0, 1, 1, 0, 1;
1, 1, 1, 0, 0, 1;
0, 0, 1, 1, 0, 0, 1;
0, 0, 0, 0, 0, 0, 0, 1;
0, 1, 1, 2, 1, 0, 0, 0, 1;
1, 1, 1, 1, 0, 0, 0, 0, 0, 1;
0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1;
0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1;
0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1;
0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1;
1, 1, 1, 2, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1;
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1;
...
For n = 9 there are three partitions of 9 into consecutive parts, they are [9], [5, 4], [4, 3, 2], so the 9th row of triangle is [0, 1, 1, 2, 1, 0, 0, 0, 1].
		

Crossrefs

Row sums give A204217.
Column 1 gives A010054, n >= 1.
Leading diagonal gives A000012.

A285899 Total number of parts in all partitions of all positive integers <= n into consecutive parts.

Original entry on oeis.org

1, 2, 5, 6, 9, 13, 16, 17, 23, 28, 31, 35, 38, 43, 54, 55, 58, 66, 69, 75, 87, 92, 95, 99, 107, 112, 124, 132, 135, 148, 151, 152, 164, 169, 184, 196, 199, 204, 216, 222, 225, 240, 243, 252, 278, 283, 286, 290, 300, 310, 322, 331, 334, 351, 369, 377, 389, 394, 397, 414, 417, 422, 450, 451, 469, 488, 491, 500, 512, 529
Offset: 1

Views

Author

Omar E. Pol, May 02 2017

Keywords

Comments

Partial sums of A204217.
Sum of first n rows of the triangle A285914.
Where records occur in A328365. - Omar E. Pol, Oct 22 2019
Row sums of A328368. - Omar E. Pol, Nov 04 2019

Examples

			For n = 15 there are four partitions of 15 into consecutive parts: [15], [8, 7], [6, 5, 4] and [5, 4, 3, 2, 1]. The total number of parts in these four partitions is 11, and a(14) = 43, so a(15) = 43 + 11 = 54.
		

Crossrefs

A127446 Triangle T(n,k) = n*A051731(n,k) read by rows.

Original entry on oeis.org

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

Views

Author

Gary W. Adamson, Jan 14 2007

Keywords

Comments

Replace the 1's in row n of A051731 with n's.
T(n,k) is the sum of the k's in the partitions of n into equal parts. - Omar E. Pol, Nov 25 2019

Examples

			First few rows of the triangle:
  1;
  2, 2;
  3, 0, 3;
  4, 4, 0, 4;
  5, 0, 0, 0, 5;
  6, 6, 6, 0, 0, 6;
  7, 0, 0, 0, 0, 0, 7;
  ...
For n = 6 the partitions of 6 into equal parts are [6], [3,3], [2,2,2], [1,1,1,1,1,1], so the sum of the k's are [6, 6, 6, 0, 0, 6] respectively, equaling the 6th row of triangle. - _Omar E. Pol_, Nov 25 2019
		

Crossrefs

Cf. A038040 (row sums), A051731, A126988, A244051, A328362.

Programs

  • Haskell
    a127446 n k = a127446_tabl !! (n-1) !! (k-1)
    a127446_row n = a127446_tabl !! (n-1)
    a127446_tabl = zipWith (\v ws -> map (* v) ws) [1..] a051731_tabl
    -- Reinhard Zumkeller, Jan 21 2014
  • Maple
    A127446 := proc(n,k) if n mod k = 0 then n; else 0; fi; end: for n from 1 to 20 do for k from 1 to n do printf("%d,",A127446(n,k)) ; od: od: # R. J. Mathar, May 08 2009
  • Mathematica
    Flatten[Table[If[Mod[n, k] == 0, n, 0], {n, 20}, {k, n}]] (* Vincenzo Librandi, Nov 02 2016 *)

Formula

T(n,k) = k*A126988(n,k). - Omar E. Pol, Nov 25 2019

Extensions

Edited and extended by R. J. Mathar, May 08 2009

A328371 Irregular triangle read by rows: T(n,k) is the sum of all parts of all partitions of all positive integers <= n into k consecutive parts.

Original entry on oeis.org

1, 3, 6, 3, 10, 3, 15, 8, 21, 8, 6, 28, 15, 6, 36, 15, 6, 45, 24, 15, 55, 24, 15, 10, 66, 35, 15, 10, 78, 35, 27, 10, 91, 48, 27, 10, 105, 48, 27, 24, 120, 63, 42, 24, 15, 136, 63, 42, 24, 15, 153, 80, 42, 24, 15, 171, 80, 60, 42, 15, 190, 99, 60, 42, 15, 210, 99, 60, 42, 35, 231, 120, 81, 42, 35, 21
Offset: 1

Views

Author

Omar E. Pol, Nov 02 2019

Keywords

Comments

Column k lists the partial sums of the k-th column of triangle A285891.

Examples

			Triangle begins:
    1;
    3;
    6,   3;
   10,   3;
   15,   8;
   21,   8,   6;
   28,  15,   6;
   36,  15,   6;
   45,  24,  15;
   55,  24,  15, 10;
   66,  35,  15, 10;
   78,  35,  27, 10;
   91,  48,  27, 10;
  105,  48,  27, 24,
  120,  63,  42, 24, 15;
  136,  63,  42, 24, 15;
  153,  80,  42, 24, 15;
  171,  80,  60, 42, 15;
  190,  99,  60, 42, 15;
  210,  99,  60, 42, 35;
  231, 120,  81, 42, 35, 21;
  253, 120,  81, 64, 35, 21;
  276, 143,  81, 64, 35, 21;
  300, 143, 105, 64, 35, 21;
  325, 168, 105, 64, 60, 21;
  351, 168, 105, 90, 60, 21;
  378, 195, 132, 90, 60, 48;
  406, 195, 132, 90, 60, 48, 28;
...
		

Crossrefs

Row sums give A285900.
Row n has length A003056(n).
Column 1 gives the nonzero terms of A000217.
Column k starts with A000217(k) in the row A000217(k).

Programs

  • PARI
    tt(n, k) = n*(if (k % 2, (n % k) == 0, ((n - k/2) % k) == 0)); \\ A285891
    t(n, k) = sum(j=k*(k+1)/2, n, tt(j, k));
    tabf(nn) = {for (n=1, nn, for (k=1, floor((sqrt(1+8*n)-1)/2), print1(t(n, k), ", "); ); print(); ); } \\ Michel Marcus, Nov 04 2019
Showing 1-6 of 6 results.