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.

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

A352257 Sum of all parts of all partitions of n into an odd number of consecutive parts.

Original entry on oeis.org

1, 2, 3, 4, 5, 12, 7, 8, 18, 10, 11, 24, 13, 14, 45, 16, 17, 36, 19, 40, 42, 22, 23, 48, 50, 26, 54, 56, 29, 90, 31, 32, 66, 34, 105, 72, 37, 38, 78, 80, 41, 126, 43, 44, 180, 46, 47, 96, 98, 100, 102, 52, 53, 162, 110, 112, 114, 58, 59, 180, 61, 62, 252, 64, 130, 198
Offset: 1

Views

Author

Omar E. Pol, Mar 09 2022

Keywords

Comments

a(n) is n times the number of partitions of n into an odd number of consecutive parts.

Examples

			For n = 15 the partitions of 15 into an odd number of consecutive parts are [15], [6, 5, 4] and [5, 4, 3, 2, 1], so a(15) = 15 + 6 + 5 + 4 + 5 + 4 + 3 + 2 + 1 = 15*3 = 45.
		

Crossrefs

Programs

  • PARI
    a(n) = my(q = sqrt(2*n)); n*sumdiv(n, d, (d%2) && (d < q)); \\ Michel Marcus, Mar 11 2022; after A082647

Formula

a(n) = n*A082647(n).
a(n) = A245579(n) - A352505(n). - Omar E. Pol, Mar 19 2022

A352446 Total number of parts in all partitions of n into an even number of consecutive parts.

Original entry on oeis.org

0, 0, 2, 0, 2, 0, 2, 0, 2, 4, 2, 0, 2, 4, 2, 0, 2, 4, 2, 0, 8, 4, 2, 0, 2, 4, 8, 0, 2, 4, 2, 0, 8, 4, 2, 8, 2, 4, 8, 0, 2, 4, 2, 8, 8, 4, 2, 0, 2, 4, 8, 8, 2, 4, 12, 0, 8, 4, 2, 8, 2, 4, 8, 0, 12, 4, 2, 8, 8, 4, 2, 0, 2, 4, 18, 8, 2, 16, 2, 0, 8, 4, 2, 8, 12, 4, 8, 0, 2, 16, 2
Offset: 1

Views

Author

Omar E. Pol, Mar 16 2022

Keywords

Examples

			For n = 21  the partitions of 21 into an even number of consecutive parts are [11, 10] and [6, 5, 4, 3, 2, 1]. The total number of parts in these two partitions is equal to 2 + 6 = 8, so a(21) = 8.
On the other hand consider the diagram below which is formed by the even-indexed staircase walks from the diagram of A286000.
The diagram is infinite and we have that:
The m-th staircase walk starts at row A014105(m).
The number of horizontal line segment in the n-th row equals A131576(n), the number of partitions of n into an even number of consecutive parts.
a(n) is the total length of all vertical line segments that are below and that share one vertex with the horizontal line segments that are in the n-th level of the diagram.
---------------------------------------------
   n    a(n)              Diagram
---------------------------------------------
   1      0
   2      0                               _
   3      2                              |2
   4      0                             _|1
   5      2                            |3
   6      0                           _|2
   7      2                          |4
   8      0                         _|3
   9      2                        |5     _
  10      4                       _|4    |4
  11      2                      |6      |3
  12      0                     _|5      |2
  13      2                    |7       _|1
  14      4                   _|6      |5
  15      2                  |8        |4
  16      0                 _|7        |3
  17      2                |9         _|2
  18      4               _|8        |6
  19      2              |10         |5
  20      0             _|9          |4   _
  21      8            |11          _|3  |6
  22      4           _|10         |7    |5
  23      2          |12           |6    |4
  24      0         _|11           |5    |3
  25      2        |13            _|4    |2
  26      4       _|12           |8     _|1
  27      8      |14             |7    |7
  28      0      |13             |6    |6
...
For n = 21 the number of horizontal line segment in the 21th row of the diagram equals A131576(21) = 2, the number of partitions of 21 into an even number of consecutive parts.
The total length of all vertical line segments that are below and that share one vertex with the horizontal line segments that are in the 21-th level of the diagram is equal to 2 + 6 = 8, so a(21) = 8.
		

Crossrefs

For more information about the diagram see A286000 and A237593.

Formula

a(n) = A204217(n) - A341309(n), conjectured.
Conjecture: G.f.: Sum_{k>=1} 2*k*x^(k*(2*k+1))/(1-x^(2*k)). - Vaclav Kotesovec, Oct 23 2024
Showing 1-3 of 3 results.