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-10 of 19 results. Next

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

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

A050999 Sum of squares of odd divisors of n.

Original entry on oeis.org

1, 1, 10, 1, 26, 10, 50, 1, 91, 26, 122, 10, 170, 50, 260, 1, 290, 91, 362, 26, 500, 122, 530, 10, 651, 170, 820, 50, 842, 260, 962, 1, 1220, 290, 1300, 91, 1370, 362, 1700, 26, 1682, 500, 1850, 122, 2366, 530, 2210, 10, 2451, 651, 2900, 170, 2810, 820, 3172, 50, 3620, 842, 3482
Offset: 1

Views

Author

Keywords

Comments

Denoted by Delta_2(n) in Glaisher 1907. - Michael Somos, May 17 2013
The sum of squares of even divisors of 2*k = 4*A001157(k), and the sum of squares of even divisors of 2*k-1 vanishes, for k >= 1. - Wolfdieter Lang, Jan 07 2017

Examples

			x + x^2 + 10*x^3 + x^4 + 26*x^5 + 10*x^6 + 50*x^7 + x^8 + 91*x^9 + 26*x^10 + ...
		

References

  • 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).

Crossrefs

Programs

  • Haskell
    a050999 = sum . map (^ 2) . a182469_row
    -- Reinhard Zumkeller, May 01 2012
    
  • Mathematica
    a[n_] := 1/2*Sum[(1 - (-1)^d)*d^2, {d, Divisors[n]}]; Table[a[n], {n, 1, 59}] (* Jean-François Alcover, Oct 23 2012, from 2nd formula *)
    a[ n_] := If[ n < 1, 0, Sum[ Mod[ d, 2] d^2, {d, Divisors@n}]] (* Michael Somos, May 17 2013 *)
    f[p_, e_] := If[p == 2, 1, (p^(2*e + 2) - 1)/(p^2 - 1)]; a[1] = 1; a[n_] := Times @@ (f @@@ FactorInteger[n]); Array[a, 100] (* Amiram Eldar, Nov 22 2020 *)
    Table[Total[Select[Divisors[n],OddQ]^2],{n,80}] (* Harvey P. Dale, Jul 19 2024 *)
  • PARI
    a(n)=sumdiv(n,d, if(d%2==1, d^2, 0 ) );  /* Joerg Arndt, Oct 07 2012 */
    
  • Python
    from sympy import divisor_sigma
    def A050999(n): return int(divisor_sigma(n>>(~n&n-1).bit_length(),2)) # Chai Wah Wu, Jul 16 2022

Formula

From Vladeta Jovovic, Sep 10 2001: (Start)
Multiplicative with a(p^e) = 1 if p = 2, (p^(2e+2)-1)/(p^2-1) if p > 2.
a(n) = (1/2)*Sum_{d|n} (1-(-1)^d)*d^2.
a(2n) = sigma_2(2n) - 4*sigma_2(n), a(2n+1) = sigma_2(2n+1), where sigma_2(n) is sum of squares of divisors of n (A001157).
More generally, if b(n, k) is the sum of k-th powers of odd divisors of n then b(2n, k) = sigma_k(2n)-2^k*sigma_k(n), b(2n+1, k) = sigma_k(2n+1). b(n, k) is multiplicative with a(p^e) = 1 if p = 2, (p^(k*e+k)-1)/(p^k-1) if p > 2. (End)
G.f. for b(n, k): Sum_{m>0} m^k*x^m*(1-(2^k-1)*x^m)/(1-x^(2*m)). - Vladeta Jovovic, Oct 19 2002
Dirichlet g.f. (1-2^(2-s))*zeta(s)*zeta(s-2). - R. J. Mathar, Apr 06 2011
Dirichlet convolution of A001157 with [1,-4,0,0,0,0...]. Dirichlet convolution of [1,-3,1,-3,1,-3,..] with A000290. Dirichlet convolution of [1,0,9,0,25,0,49,0,81,...] with A000012 (or A057427). - R. J. Mathar, Jun 28 2011
a(n) = sum(A182469(n,k)^2: k=1..A001227(n)). [Reinhard Zumkeller, May 01 2012]
Sum_{k=1..n} a(k) ~ zeta(3) * n^3 / 6. - Vaclav Kotesovec, Nov 09 2018
G.f.: Sum_{n >= 1} x^n*(1 + 6*x^(2*n) + x^(4*n))/(1 - x^(2*n))^3. - Peter Bala, Dec 19 2021
Sum_{k=1..n} (-1)^(k+1) * a(k) ~ zeta(3) * n^3 / 8. - Vaclav Kotesovec, Aug 07 2022

A051000 Sum of cubes of odd divisors of n.

Original entry on oeis.org

1, 1, 28, 1, 126, 28, 344, 1, 757, 126, 1332, 28, 2198, 344, 3528, 1, 4914, 757, 6860, 126, 9632, 1332, 12168, 28, 15751, 2198, 20440, 344, 24390, 3528, 29792, 1, 37296, 4914, 43344, 757, 50654, 6860, 61544, 126, 68922, 9632, 79508, 1332, 95382, 12168, 103824, 28
Offset: 1

Views

Author

Keywords

Comments

The sum of cubes of even divisors of 2*k equals 8*A001158(k), and the sum of cubes of even divisors of 2*k-1 vanishes, for k >= 1. - Wolfdieter Lang, Jan 07 2017
Sum_{k>=1} 1/a(k) diverges. - Vaclav Kotesovec, Sep 21 2020

Crossrefs

Programs

  • Haskell
    a051000 = sum . map (^ 3) . a182469_row
    -- Reinhard Zumkeller, May 01 2012
    
  • Mathematica
    Table[Total[Select[Divisors[n],OddQ]^3],{n,50}] (* Harvey P. Dale, Jun 28 2012 *)
    f[2, e_] := 1; f[p_, e_] := (p^(3*e + 3) - 1)/(p^3 - 1); a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Sep 14 2020 *)
  • PARI
    a(n) = sumdiv(n, d, (d%2)*d^3); \\ Michel Marcus, Jan 04 2017
    
  • Python
    from sympy import divisor_sigma
    def A051000(n): return int(divisor_sigma(n>>(~n&n-1).bit_length(),3)) # Chai Wah Wu, Jul 16 2022

Formula

Dirichlet g.f.: (1-2^(3-s))*zeta(s)*zeta(s-3). Dirichlet convolution of (-1)^n*A176415(n) and A000578. - R. J. Mathar, Apr 06 2011
a(n) = Sum_{k=1..A001227(n)} A182469(n,k)^3. - Reinhard Zumkeller, May 01 2012
G.f.: Sum_{k>=1} (2*k - 1)^3*x^(2*k-1)/(1 - x^(2*k-1)). - Ilya Gutkovskiy, Jan 04 2017
Sum_{k=1..n} a(k) ~ Pi^4 * n^4 / 720. - Vaclav Kotesovec, Jan 31 2019
Multiplicative with a(2^e) = 1 and a(p^e) = (p^(3*e+3)-1)/(p^3-1) for p > 2. - Amiram Eldar, Sep 14 2020
For k>=0, a(2^k) = 1. - Vaclav Kotesovec, Sep 21 2020
G.f.: Sum_{n >= 1} x^n*(1 + 23*x^(2*n) + 23*x^(4*n) + x^(6*n))/(1 - x^(2*n))^4. See row 4 of A060187. - Peter Bala, Dec 20 2021
a(n) = Sum_{k=0..n-1} A000203(2*n-2*k-1)*A000203(2*k+1)/A006519(n)^3 (Ewell, 2007). - Amiram Eldar, Feb 24 2024

A051002 Sum of 5th powers of odd divisors of n.

Original entry on oeis.org

1, 1, 244, 1, 3126, 244, 16808, 1, 59293, 3126, 161052, 244, 371294, 16808, 762744, 1, 1419858, 59293, 2476100, 3126, 4101152, 161052, 6436344, 244, 9768751, 371294, 14408200, 16808, 20511150, 762744, 28629152, 1, 39296688, 1419858, 52541808, 59293, 69343958
Offset: 1

Views

Author

Keywords

Comments

The Apostol exercise F(x) is the g.f. of a(n)*(-1)^(n+1). - Michael Somos, Jul 05 2021

Examples

			G.f. = x + x^2 + 244*x^3 + x^4 + 3126*x^5 + 244*x^6 + 16808*x^7 + x^8 + ... - _Michael Somos_, Jul 05 2021
		

References

  • T. M. Apostol, Modular Functions and Dirichlet Series in Number Theory, Springer-Verlag, 1990, page 25, Exercise 15.

Crossrefs

Programs

  • Mathematica
    a[n_] := Select[ Divisors[n], OddQ]^5 // Total; Table[a[n], {n, 1, 34}] (* Jean-François Alcover, Oct 25 2012 *)
    f[2, e_] := 1; f[p_, e_] := (p^(5*e + 5) - 1)/(p^5 - 1); a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Sep 14 2020 *)
    a[ n_] := If[n == 0, 0, DivisorSigma[5, n / 2^IntegerExponent[n, 2]]]; (* Michael Somos, Jul 05 2021 *)
  • PARI
    a(n) = sumdiv(n , d, (d%2)*d^5); \\ Michel Marcus, Jan 14 2014
    
  • PARI
    a(n)=sumdiv(n>>valuation(n,2), d, d^5) \\ Charles R Greathouse IV, Jul 05 2021
    
  • Python
    from sympy import divisor_sigma
    def A051002(n): return int(divisor_sigma(n>>(~n&n-1).bit_length(),5)) # Chai Wah Wu, Jul 16 2022

Formula

Dirichlet g.f.: (1-2^(5-s))*zeta(s)*zeta(s-5). - R. J. Mathar, Apr 06 2011
G.f.: Sum_{k>=1} (2*k - 1)^5*x^(2*k-1)/(1 - x^(2*k-1)). - Ilya Gutkovskiy, Jan 04 2017
The preceding g.f. is also 34*sigma_5(x^2) - 64*sigma_5(x^4) - sigma_5(-x), with sigma_5 the g.f. of A001160. Compare this with the Apostol reference which gives the g.f. of a(n)*(-1)^(n+1). - Wolfdieter Lang, Jan 31 2017
Multiplicative with a(2^e) = 1 and a(p^e) = (p^(5*e+5)-1)/(p^5-1) for p > 2. - Amiram Eldar, Sep 14 2020
Sum_{k=1..n} a(k) ~ Pi^6 * n^6 / 11340. - Vaclav Kotesovec, Sep 24 2020
G.f.: Sum_{n >= 1} x^n*R(5,x^(2*n))/(1 - x^(2*n))^6, where R(5,x) = 1 + 237*x + 1682*x^2 + 1682*x^3 + 237*x^4 + x^5 is the fifth row polynomial of A060187. - Peter Bala, Dec 20 2021

A285425 Square array A(n,k), n>=1, k>=0, read by antidiagonals, where column k is the expansion of Sum_{j>=1} (2*j - 1)^k*x^(2*j-1)/(1 - x^(2*j-1)).

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 4, 1, 1, 1, 10, 1, 2, 1, 1, 28, 1, 6, 2, 1, 1, 82, 1, 26, 4, 2, 1, 1, 244, 1, 126, 10, 8, 1, 1, 1, 730, 1, 626, 28, 50, 1, 3, 1, 1, 2188, 1, 3126, 82, 344, 1, 13, 2, 1, 1, 6562, 1, 15626, 244, 2402, 1, 91, 6, 2, 1, 1, 19684, 1, 78126, 730, 16808, 1, 757, 26, 12, 2
Offset: 1

Views

Author

Ilya Gutkovskiy, May 14 2017

Keywords

Comments

A(n,k) is the sum of k-th powers of odd divisors of n.

Examples

			Square array begins:
1,  1,   1,    1,    1,     1,  ...
1,  1,   1,    1,    1,     1,  ...
2,  4,  10,   28,   82,   244,  ...
1,  1,   1,    1,    1,     1,  ...
2,  6,  26,  126,  626,  3126,  ...
2,  4,  10,   28,   82,   244,  ...
		

Crossrefs

Programs

  • Mathematica
    Table[Function[k, SeriesCoefficient[Sum[(2 i - 1)^k x^(2 i - 1)/(1 - x^(2 i - 1)), {i, 1, n}], {x, 0, n}]][j - n], {j, 0, 12}, {n, 1, j}] // Flatten

Formula

G.f. of column k: Sum_{j>=1} (2*j - 1)^k*x^(2*j-1)/(1 - x^(2*j-1)).

Extensions

Offset changed by Ilya Gutkovskiy, Oct 25 2018

A321810 Sum of 6th powers of odd divisors of n.

Original entry on oeis.org

1, 1, 730, 1, 15626, 730, 117650, 1, 532171, 15626, 1771562, 730, 4826810, 117650, 11406980, 1, 24137570, 532171, 47045882, 15626, 85884500, 1771562, 148035890, 730, 244156251, 4826810, 387952660, 117650, 594823322, 11406980, 887503682
Offset: 1

Views

Author

N. J. A. Sloane, Nov 24 2018

Keywords

Crossrefs

Column k=6 of A285425.
Cf. A050999, A051000, A051001, A051002, A321811 - A321816 (analog for 2nd .. 12th powers).
Cf. A321543 - A321565, A321807 - A321836 for related sequences.

Programs

  • Mathematica
    f[2, e_] := 1; f[p_, e_] := (p^(6*e + 6) - 1)/(p^6 - 1); a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Nov 02 2022 *)
  • PARI
    apply( A321810(n)=sigma(n>>valuation(n,2),6), [1..30]) \\ M. F. Hasler, Nov 26 2018
    
  • Python
    from sympy import divisor_sigma
    def A321810(n): return int(divisor_sigma(n>>(~n&n-1).bit_length(),6)) # Chai Wah Wu, Jul 16 2022

Formula

a(n) = A013954(A000265(n)) = sigma_6(odd part of n); in particular, a(2^k) = 1 for all k >= 0. - M. F. Hasler, Nov 26 2018
G.f.: Sum_{k>=1} (2*k - 1)^6*x^(2*k-1)/(1 - x^(2*k-1)). - Ilya Gutkovskiy, Dec 22 2018
From Amiram Eldar, Nov 02 2022: (Start)
Multiplicative with a(2^e) = 1 and a(p^e) = (p^(6*e+6)-1)/(p^6-1) for p > 2.
Sum_{k=1..n} a(k) ~ c * n^7, where c = zeta(7)/14 = 0.0720249... . (End)
a(n) + a(n/2)*2^6 = A013954(n) where a(.)=0 for non-integer arguments. - R. J. Mathar, Aug 15 2023

A352032 Sum of the 4th powers of the odd proper divisors of n.

Original entry on oeis.org

0, 1, 1, 1, 1, 82, 1, 1, 82, 626, 1, 82, 1, 2402, 707, 1, 1, 6643, 1, 626, 2483, 14642, 1, 82, 626, 28562, 6643, 2402, 1, 51332, 1, 1, 14723, 83522, 3027, 6643, 1, 130322, 28643, 626, 1, 196964, 1, 14642, 57893, 279842, 1, 82, 2402, 391251, 83603, 28562, 1, 538084, 15267
Offset: 1

Views

Author

Wesley Ivan Hurt, Mar 01 2022

Keywords

Examples

			a(10) = 626; a(10) = Sum_{d|10, d<10, d odd} d^4 = 1^4 + 5^4 = 626.
		

Crossrefs

Sum of the k-th powers of the odd proper divisors of n for k=0..10: A091954 (k=0), A091570 (k=1), A351647 (k=2), A352031 (k=3), this sequence (k=4), A352033 (k=5), A352034 (k=6), A352035 (k=7), A352036 (k=8), A352037 (k=9), A352038 (k=10).

Programs

  • Mathematica
    f[2, e_] := 1; f[p_, e_] := (p^(4*e+4) - 1)/(p^4 - 1); a[1] = 0; a[n_] := Times @@ f @@@ FactorInteger[n] - If[OddQ[n], n^4, 0]; Array[a, 60] (* Amiram Eldar, Oct 11 2023 *)

Formula

a(n) = Sum_{d|n, d
G.f.: Sum_{k>=1} (2*k-1)^4 * x^(4*k-2) / (1 - x^(2*k-1)). - Ilya Gutkovskiy, Mar 02 2022
From Amiram Eldar, Oct 11 2023: (Start)
a(n) = A051001(n) - n^4*A000035(n).
Sum_{k=1..n} a(k) ~ c * n^5, where c = (zeta(5)-1)/10 = 0.0036927755... . (End)

A352050 Sum of the 4th powers of the divisor complements of the odd proper divisors of n.

Original entry on oeis.org

0, 16, 81, 256, 625, 1312, 2401, 4096, 6642, 10016, 14641, 20992, 28561, 38432, 51331, 65536, 83521, 106288, 130321, 160256, 196963, 234272, 279841, 335872, 391250, 456992, 538083, 614912, 707281, 821312, 923521, 1048576, 1200643, 1336352, 1503651, 1700608, 1874161
Offset: 1

Author

Wesley Ivan Hurt, Mar 01 2022

Keywords

Examples

			a(10) = 10^4 * Sum_{d|10, d<10, d odd} 1 / d^4 = 10^4 * (1/1^4 + 1/5^4) = 10016.
		

Crossrefs

Sum of the k-th powers of the divisor complements of the odd proper divisors of n for k=0..10: A091954 (k=0), A352047 (k=1), A352048 (k=2), A352049 (k=3), this sequence (k=4), A352051 (k=5), A352052 (k=6), A352053 (k=7), A352054 (k=8), A352055 (k=9), A352056 (k=10).

Programs

  • Maple
    f:= proc(n) local m,d;
          m:= n/2^padic:-ordp(n,2);
          add((n/d)^4, d = select(`<`,numtheory:-divisors(m),n))
    end proc:map(f, [$1..40]); # Robert Israel, Apr 03 2023
  • Mathematica
    A352050[n_]:=DivisorSum[n,1/#^4&,#A352050,50] (* Paolo Xausa, Aug 09 2023 *)
    a[n_] := DivisorSigma[-4, n/2^IntegerExponent[n, 2]] * n^4 - Mod[n, 2]; Array[a, 100] (* Amiram Eldar, Oct 13 2023 *)
  • PARI
    a(n) = n^4 * sigma(n >> valuation(n, 2), -4) - n % 2; \\ Amiram Eldar, Oct 13 2023

Formula

a(n) = n^4 * Sum_{d|n, d
G.f.: Sum_{k>=2} k^4 * x^k / (1 - x^(2*k)). - Ilya Gutkovskiy, May 14 2023
From Amiram Eldar, Oct 13 2023: (Start)
a(n) = A051001(n) * A006519(n)^4 - A000035(n).
Sum_{k=1..n} a(k) = c * n^5 / 5, where c = 31*zeta(5)/32 = 1.00452376... . (End)

A321816 Sum of 12th powers of odd divisors of n.

Original entry on oeis.org

1, 1, 531442, 1, 244140626, 531442, 13841287202, 1, 282430067923, 244140626, 3138428376722, 531442, 23298085122482, 13841287202, 129746582562692, 1, 582622237229762, 282430067923, 2213314919066162, 244140626, 7355841353205284, 3138428376722
Offset: 1

Author

N. J. A. Sloane, Nov 24 2018

Keywords

Crossrefs

Column k=12 of A285425.
Cf. A050999, A051000, A051001, A051002, A321810 - A321815 (analog for 2nd .. 11th powers).
Cf. A321543 - A321565, A321807 - A321836 for related sequences.

Programs

  • Mathematica
    a[n_] := DivisorSum[n, #^12&, OddQ[#]&]; Array[a, 20] (* Amiram Eldar, Dec 07 2018 *)
  • PARI
    apply( A321816(n)=sigma(n>>valuation(n,2),12), [1..30]) \\ M. F. Hasler, Nov 26 2018
    
  • Python
    from sympy import divisor_sigma
    def A321816(n): return int(divisor_sigma(n>>(~n&n-1).bit_length(),12)) # Chai Wah Wu, Jul 16 2022

Formula

a(n) = A013960(A000265(n)) = sigma_12(odd part of n); in particular, a(2^k) = 1 for all k >= 0. - M. F. Hasler, Nov 26 2018
G.f.: Sum_{k>=1} (2*k - 1)^12*x^(2*k-1)/(1 - x^(2*k-1)). - Ilya Gutkovskiy, Dec 22 2018
From Amiram Eldar, Nov 02 2022: (Start)
Multiplicative with a(2^e) = 1 and a(p^e) = (p^(12*e+12)-1)/(p^12-1) for p > 2.
Sum_{k=1..n} a(k) ~ c * n^13, where c = zeta(13)/26 = 0.0384662... . (End)
Showing 1-10 of 19 results. Next