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.

A000203 a(n) = sigma(n), the sum of the divisors of n. Also called sigma_1(n).

This page as a plain text file.
%I A000203 M2329 N0921 #612 Aug 07 2025 08:36:33
%S A000203 1,3,4,7,6,12,8,15,13,18,12,28,14,24,24,31,18,39,20,42,32,36,24,60,31,
%T A000203 42,40,56,30,72,32,63,48,54,48,91,38,60,56,90,42,96,44,84,78,72,48,
%U A000203 124,57,93,72,98,54,120,72,120,80,90,60,168,62,96,104,127,84,144,68,126,96,144
%N A000203 a(n) = sigma(n), the sum of the divisors of n. Also called sigma_1(n).
%C A000203 Multiplicative: If the canonical factorization of n into prime powers is the product of p^e(p) then sigma_k(n) = Product_p ((p^((e(p)+1)*k))-1)/(p^k-1).
%C A000203 Sum_{d|n} 1/d^k is equal to sigma_k(n)/n^k. So sequences A017665-A017712 also give the numerators and denominators of sigma_k(n)/n^k for k = 1..24. The power sums sigma_k(n) are in sequences A000203 (this sequence) (k=1), A001157-A001160 (k=2,3,4,5), A013954-A013972 for k = 6,7,...,24. - Ahmed Fares (ahmedfares(AT)my-deja.com), Apr 05 2001
%C A000203 A number n is abundant if sigma(n) > 2n (cf. A005101), perfect if sigma(n) = 2n (cf. A000396), deficient if sigma(n) < 2n (cf. A005100).
%C A000203 a(n) is the number of sublattices of index n in a generic 2-dimensional lattice. - Avi Peretz (njk(AT)netvision.net.il), Jan 29 2001 [In the language of group theory, a(n) is the number of index-n subgroups of Z x Z. - _Jianing Song_, Nov 05 2022]
%C A000203 The sublattices of index n are in one-to-one correspondence with matrices [a b; 0 d] with a>0, ad=n, b in [0..d-1]. The number of these is Sum_{d|n} d = sigma(n), which is a(n). A sublattice is primitive if gcd(a,b,d) = 1; the number of these is n * Product_{p|n} (1+1/p), which is A001615. [Cf. Grady reference.]
%C A000203 Sum of number of common divisors of n and m, where m runs from 1 to n. - _Naohiro Nomoto_, Jan 10 2004
%C A000203 a(n) is the cardinality of all extensions over Q_p with degree n in the algebraic closure of Q_p, where p>n. - Volker Schmitt (clamsi(AT)gmx.net), Nov 24 2004. Cf. A100976, A100977, A100978 (p-adic extensions).
%C A000203 Let s(n) = a(n-1) + a(n-2) - a(n-5) - a(n-7) + a(n-12) + a(n-15) - a(n-22) - a(n-26) + ..., then a(n) = s(n) if n is not pentagonal, i.e., n != (3 j^2 +- j)/2 (cf. A001318), and a(n) is instead s(n) - ((-1)^j)*n if n is pentagonal. - _Gary W. Adamson_, Oct 05 2008 [corrected Apr 27 2012 by _William J. Keith_ based on Ewell and by _Andrey Zabolotskiy_, Apr 08 2022]
%C A000203 Write n as 2^k * d, where d is odd. Then a(n) is odd if and only if d is a square. - _Jon Perry_, Nov 08 2012
%C A000203 Also total number of parts in the partitions of n into equal parts. - _Omar E. Pol_, Jan 16 2013
%C A000203 Note that sigma(3^4) = 11^2. On the other hand, Kanold (1947) shows that the equation sigma(q^(p-1)) = b^p has no solutions b > 2, q prime, p odd prime. - _N. J. A. Sloane_, Dec 21 2013, based on postings to the Number Theory Mailing List by _Vladimir Letsko_ and _Luis H. Gallardo_
%C A000203 Limit_{m->infinity} (Sum_{n=1..prime(m)} a(n)) / prime(m)^2 = zeta(2)/2 = Pi^2/12 (A072691). See more at A244583. - _Richard R. Forberg_, Jan 04 2015
%C A000203 a(n) + A000005(n) is an odd number iff n = 2m^2, m>=1. - _Richard R. Forberg_, Jan 15 2015
%C A000203 a(n) = a(n+1) for n = 14, 206, 957, 1334, 1364 (A002961). - _Zak Seidov_, May 03 2016
%C A000203 Equivalent to the Riemann hypothesis: a(n) < H(n) + exp(H(n))*log(H(n)), for all n>1, where H(n) is the n-th harmonic number (Jeffrey Lagarias). See A057641 for more details. - _Ilya Gutkovskiy_, Jul 05 2016
%C A000203 a(n) is the total number of even parts in the partitions of 2*n into equal parts. More generally, a(n) is the total number of parts congruent to 0 mod k in the partitions of k*n into equal parts (the comment dated Jan 16 2013 is the case for k = 1). - _Omar E. Pol_, Nov 18 2019
%C A000203 From _Jianing Song_, Nov 05 2022: (Start)
%C A000203 a(n) is also the number of order-n subgroups of C_n X C_n, where C_n is the cyclic group of order n. Proof: by the correspondence theorem in the group theory, there is a one-to-one correspondence between the order-n subgroups of C_n X C_n = (Z x Z)/(nZ x nZ) and the index-n subgroups of Z x Z containing nZ x nZ. But an index-n normal subgroup of a (multiplicative) group G contains {g^n : n in G} automatically. The desired result follows from the comment from _Naohiro Nomoto_ above.
%C A000203 The number of subgroups of C_n X C_n that are isomorphic to C_n is A001615(n). (End)
%D A000203 M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 840.
%D A000203 T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 38.
%D A000203 A. T. Benjamin and J. J. Quinn, Proofs that really count: the art of combinatorial proof, M.A.A. 2003, p. 116ff.
%D A000203 Florian Cajori, A History of Mathematical Notations, Dover edition (2012), par. 407.
%D A000203 L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 162, #16, (6), 2nd formula.
%D A000203 G. H. Hardy, Ramanujan: twelve lectures on subjects suggested by his life and work, AMS Chelsea Publishing, Providence, Rhode Island, 2002, pp. 141, 166.
%D A000203 H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, Fifth Edition, Clarendon Press, Oxford, 2003.
%D A000203 Ross Honsberger, "Mathematical Gems, Number One," The Dolciani Mathematical Expositions, Published and Distributed by The Mathematical Association of America, page 116.
%D A000203 Kanold, Hans Joachim, Kreisteilungspolynome und ungerade vollkommene Zahlen. (German), Ber. Math.-Tagung Tübingen 1946, (1947). pp. 84-87.
%D A000203 M. Krasner, Le nombre des surcorps primitifs d'un degré donné et le nombre des surcorps métagaloisiens d'un degré donné d'un corps de nombres p-adiques. Comptes Rendus Hebdomadaires, Académie des Sciences, Paris 254, 255, 1962.
%D A000203 A. Lubotzky, Counting subgroups of finite index, Proceedings of the St. Andrews/Galway 93 group theory meeting, Th. 2.1. LMS Lecture Notes Series no. 212 Cambridge University Press 1995.
%D A000203 D. S. Mitrinovic et al., Handbook of Number Theory, Kluwer, Section III.1, page 77.
%D A000203 G. Pólya, Induction and Analogy in Mathematics, vol. 1 of Mathematics and Plausible Reasoning, Princeton Univ Press 1954, page 92.
%D A000203 N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
%D A000203 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%D A000203 James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, pages 91, 395.
%D A000203 Robert M. Young, Excursions in Calculus, The Mathematical Association of America, 1992 p. 361.
%H A000203 Daniel Forgues, <a href="/A000203/b000203.txt">Table of n, a(n) for n = 1..100000</a> (first 20000 terms from N. J. A. Sloane)
%H A000203 M. Abramowitz and I. A. Stegun, eds., <a href="https://www.convertit.com/Go/ConvertIt/Reference/AMS55.ASP">Handbook of Mathematical Functions</a>, National Bureau of Standards, Applied Math. Series 55, Tenth Printing, 1972 [alternative scanned copy].
%H A000203 B. Apostol and L. Petrescu, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL16/Apostol/apostol3.html">Extremal Orders of Certain Functions Associated with Regular Integers (mod n)</a>, Journal of Integer Sequences, 2013, # 13.7.5.
%H A000203 Joerg Arndt, <a href="https://arxiv.org/abs/1202.6525">On computing the generalized Lambert series</a>, arXiv:1202.6525v3 [math.CA], (2012).
%H A000203 M. Baake and U. Grimm, <a href="https://citeseerx.ist.psu.edu/document?repid=rep1&amp;type=pdf&amp;doi=8f8b9f732b38349f5a0a6ca1cf48c2512ea0bad9">Quasicrystalline combinatorics</a>
%H A000203 Henry Bottomley, <a href="/A000203/a000203.gif">Illustration of initial terms</a>
%H A000203 C. K. Caldwell, The Prime Glossary, <a href="https://t5k.org/glossary/page.php?sort=SigmaFunction">sigma function</a>
%H A000203 Imanuel Chen and Michael Z. Spivey, <a href="https://www.pugetsound.edu/sites/default/files/file/chen_1.pdf">Integral Generalized Binomial Coefficients of Multiplicative Functions</a>, Preprint 2015; Summer Research Paper 238, Univ. Puget Sound.
%H A000203 D. Christopher and T. Nadu, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL18/Christopher/chris7.html">Partitions with Fixed Number of Sizes</a>, Journal of Integer Sequences, 15 (2015), #15.11.5.
%H A000203 J. N. Cooper and A. W. N. Riasanovsky, <a href="https://people.math.sc.edu/cooper/Sigma.pdf">On the Reciprocal of the Binary Generating Function for the Sum of Divisors</a>, 2012. - _N. J. A. Sloane_, Dec 25 2012
%H A000203 R. L. Duncan, <a href="https://doi.org/10.2307/2311587">Note on the Divisors of a Number</a>, The American Mathematical Monthly, 68(4), 356-359, (1961).
%H A000203 Jason Earls, <a href="https://fs.unm.edu/SNJ14.pdf#page=243">The Smarandache sum of composites between factors function</a>, in Smarandache Notions Journal (2004), Vol. 14.1, page 243.
%H A000203 L. Euler, <a href="http://eulerarchive.maa.org/docs/translations/E175en.pdf">Discovery of a most extraordinary law of numbers, relating to the sum of their divisors</a>
%H A000203 L. Euler, <a href="https://scholarlycommons.pacific.edu/euler-works/243/">Observatio de summis divisorum</a>
%H A000203 L. Euler, <a href="https://arxiv.org/abs/math/0411587">An observation on the sums of divisors</a>, arXiv:math/0411587 [math.HO], 2004-2009.
%H A000203 J. A. Ewell, <a href="https://dx.doi.org/10.1090/S0002-9939-1977-0441836-8">Recurrences for the sum of divisors</a>, Proc. Amer. Math. Soc. 64 (2) 1977.
%H A000203 Farideh Firoozbakht and M. F. Hasler, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL13/Hasler/hasler2.html">Variations on Euclid's formula for Perfect Numbers</a>, JIS 13 (2010) #10.3.1.
%H A000203 Daniele A. Gewurz and Francesca Merola, <a href="http://www.cs.uwaterloo.ca/journals/JIS/VOL6/Gewurz/gewurz5.html">Sequences realized as Parker vectors ...</a>, J. Integer Seqs., Vol. 6, 2003.
%H A000203 Johan Gielis and Ilia Tavkhelidze, <a href="https://arxiv.org/abs/1904.01414">The general case of cutting of GML surfaces and bodies</a>, arXiv:1904.01414 [math.GM], 2019.
%H A000203 J. W. L. Glaisher, <a href="https://gdz.sub.uni-goettingen.de/id/PPN600494829_0020?tify=%7B%22pages%22:%5B107%5D%7D">On the function chi(n)</a>, Quarterly Journal of Pure and Applied Mathematics, 20 (1884), 97-167.
%H A000203 J. W. L. Glaisher, <a href="/A002171/a002171.pdf">On the function chi(n)</a>, Quarterly Journal of Pure and Applied Mathematics, 20 (1884), 97-167. [Annotated scanned copy]
%H A000203 M. J. Grady, <a href="https://www.jstor.org/stable/30037550">A group theoretic approach to a famous partition formula</a>, Amer. Math. Monthly, 112 (No. 7, 2005), 645-651.
%H A000203 Masazumi Honda and Takuya Yoda, <a href="https://arxiv.org/abs/2203.17091">String theory, N = 4 SYM and Riemann hypothesis</a>, arXiv:2203.17091 [hep-th], 2022.
%H A000203 Douglas E. Iannucci, <a href="https://arxiv.org/abs/1910.11835">On sums of the small divisors of a natural number</a>, arXiv:1910.11835 [math.NT], 2019.
%H A000203 Antti Karttunen, <a href="/A000203/a000203.txt">Scheme program for computing this sequence</a>.
%H A000203 P. A. MacMahon, <a href="https://dx.doi.org/10.1112/plms/s2-19.1.75">Divisors of numbers and their continuations in the theory of partitions</a>, Proc. London Math. Soc., 19 (1921), 75-113.
%H A000203 M. Maia and M. Mendez, <a href="https://arxiv.org/abs/math.CO/0503436">On the arithmetic product of combinatorial species</a>, arXiv:math.CO/0503436, 2005.
%H A000203 K. Matthews, <a href="http://www.numbertheory.org/php/factor.html">Factorizing n and calculating phi(n),omega(n),d(n),sigma(n) and mu(n)</a>
%H A000203 Walter Nissen, <a href="http://upforthecount.com/math/abundance.html">Abundancy : Some Resources</a>
%H A000203 P. Pollack and C. Pomerance, <a href="https://doi.org/10.1090/btran/10">Some problems of Erdős on the sum-of-divisors function</a>, For Richard Guy on his 99th birthday: May his sequence be unbounded, Trans. Amer. Math. Soc. Ser. B 3 (2016), 1-26; <a href="http://pollack.uga.edu/reversal-errata.pdf">errata</a>.
%H A000203 Carl Pomerance and Hee-Sung Yang, <a href="https://www.math.dartmouth.edu/~carlp/uupaper7.pdf">Variant of a theorem of Erdős on the sum-of-proper-divisors function</a>, Math. Comp. 83 (2014), 1903-1913.
%H A000203 John S. Rutherford, <a href="https://doi.org/10.1107/S0108767392000898">The enumeration and symmetry-significant properties of derivative lattices</a>, Act. Cryst. (1992) A48, 500-508. - _N. J. A. Sloane_, Mar 14 2009
%H A000203 John S. Rutherford, <a href="https://doi.org/10.1107/S0108767392007657">The enumeration and symmetry-significant properties of derivative lattices II</a>, Acta Cryst. A49 (1993), 293-300. - _N. J. A. Sloane_, Mar 14 2009
%H A000203 John S. Rutherford, <a href="https://dx.doi.org/10.1107/S010876730804333X">Sublattice enumeration. IV. Equivalence classes of plane sublattices by parent Patterson symmetry and colour lattice group type</a>, Acta Cryst. (2009). A65, 156-163. [See Table 1]. - _N. J. A. Sloane_, Feb 23 2009
%H A000203 N. J. A. Sloane, <a href="https://arxiv.org/abs/2301.03149">"A Handbook of Integer Sequences" Fifty Years Later</a>, arXiv:2301.03149 [math.NT], 2023, p. 3.
%H A000203 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/DivisorFunction.html">Divisor Function</a>
%H A000203 Wikipedia, <a href="http://en.wikipedia.org/wiki/Divisor_function">Divisor function</a>
%H A000203 <a href="/index/Su#sublatts">Index entries for sequences related to sublattices</a>
%H A000203 <a href="/index/Si#SIGMAN">Index entries for sequences related to sigma(n)</a>
%H A000203 <a href="/index/Cor#core">Index entries for "core" sequences</a>
%F A000203 Multiplicative with a(p^e) = (p^(e+1)-1)/(p-1). - _David W. Wilson_, Aug 01 2001
%F A000203 For the following bounds and many others, see Mitrinovic et al. - _N. J. A. Sloane_, Oct 02 2017
%F A000203 If n is composite, a(n) > n + sqrt(n).
%F A000203 a(n) < n*sqrt(n) for all n.
%F A000203 a(n) < (6/Pi^2)*n^(3/2) for n > 12.
%F A000203 G.f.: -x*deriv(eta(x))/eta(x) where eta(x) = Product_{n>=1} (1-x^n). - _Joerg Arndt_, Mar 14 2010
%F A000203 L.g.f.: -log(Product_{j>=1} (1-x^j)) = Sum_{n>=1} a(n)/n*x^n. - _Joerg Arndt_, Feb 04 2011
%F A000203 Dirichlet convolution of phi(n) and tau(n), i.e., a(n) = sum_{d|n} phi(n/d)*tau(d), cf. A000010, A000005.
%F A000203 a(n) is odd iff n is a square or twice a square. - _Robert G. Wilson v_, Oct 03 2001
%F A000203 a(n) = a(n*prime(n)) - prime(n)*a(n). - _Labos Elemer_, Aug 14 2003 (Clarified by _Omar E. Pol_, Apr 27 2016)
%F A000203 a(n) = n*A000041(n) - Sum_{i=1..n-1} a(i)*A000041(n-i). - _Jon Perry_, Sep 11 2003
%F A000203 a(n) = -A010815(n)*n - Sum_{k=1..n-1} A010815(k)*a(n-k). - _Reinhard Zumkeller_, Nov 30 2003
%F A000203 a(n) = f(n, 1, 1, 1), where f(n, i, x, s) = if n = 1 then s*x else if p(i)|n then f(n/p(i), i, 1+p(i)*x, s) else f(n, i+1, 1, s*x) with p(i) = i-th prime (A000040). - _Reinhard Zumkeller_, Nov 17 2004
%F A000203 Recurrence: n^2*(n-1)*a(n) = 12*Sum_{k=1..n-1} (5*k*(n-k) - n^2)*a(k)*a(n-k), if n>1. - Dominique Giard (dominique.giard(AT)gmail.com), Jan 11 2005
%F A000203 G.f.: Sum_{k>0} k * x^k / (1 - x^k) = Sum_{k>0} x^k / (1 - x^k)^2. Dirichlet g.f.: zeta(s)*zeta(s-1). - _Michael Somos_, Apr 05 2003. See the Hardy-Wright reference, p. 312. first equation, and p. 250, Theorem 290. - _Wolfdieter Lang_, Dec 09 2016
%F A000203 For odd n, a(n) = A000593(n). For even n, a(n) = A000593(n) + A074400(n/2). - _Jonathan Vos Post_, Mar 26 2006
%F A000203 Equals the inverse Moebius transform of the natural numbers. Equals row sums of A127093. - _Gary W. Adamson_, May 20 2007
%F A000203 A127093 * [1/1, 1/2, 1/3, ...] = [1/1, 3/2, 4/3, 7/4, 6/5, 12/6, 8/7, ...]. Row sums of triangle A135539. - _Gary W. Adamson_, Oct 31 2007
%F A000203 a(n) = A054785(2*n) - A000593(2*n). - _Reinhard Zumkeller_, Apr 23 2008
%F A000203 a(n) = n*Sum_{k=1..n} A060642(n,k)/k*(-1)^(k+1). - _Vladimir Kruchinin_, Aug 10 2010
%F A000203 Dirichlet convolution of A037213 and A034448. - _R. J. Mathar_, Apr 13 2011
%F A000203 G.f.: A(x) = x/(1-x)*(1 - 2*x*(1-x)/(G(0) - 2*x^2 + 2*x)); G(k) = -2*x - 1 - (1+x)*k + (2*k+3)*(x^(k+2)) - x*(k+1)*(k+3)*((-1 + (x^(k+2)))^2)/G(k+1); (continued fraction). - _Sergei N. Gladkovskii_, Dec 06 2011
%F A000203 a(n) = A001065(n) + n. - _Mats Granvik_, May 20 2012
%F A000203 a(n) = A006128(n) - A220477(n). - _Omar E. Pol_, Jan 17 2013
%F A000203 a(n) = Sum_{k=1..A003056(n)} (-1)^(k-1)*A196020(n,k). - conjectured by _Omar E. Pol_, Feb 02 2013, and proved by _Max Alekseyev_, Nov 17 2013
%F A000203 a(n) = Sum_{k=1..A003056(n)} (-1)^(k-1)*A000330(k)*A000716(n-A000217(k)). - _Mircea Merca_, Mar 05 2014
%F A000203 a(n) = A240698(n, A000005(n)). - _Reinhard Zumkeller_, Apr 10 2014
%F A000203 a(n) = Sum_{d^2|n} A001615(n/d^2) = Sum_{d^3|n} A254981(n/d^3). - _Álvar Ibeas_, Mar 06 2015
%F A000203 a(3*n) = A144613(n). a(3*n + 1) = A144614(n). a(3*n + 2) = A144615(n). - _Michael Somos_, Jul 19 2015
%F A000203 a(n) = Sum{i=1..n} Sum{j=1..i} cos((2*Pi*n*j)/i). - _Michel Lagneau_, Oct 14 2015
%F A000203 a(n) = A000593(n) + A146076(n). - _Omar E. Pol_, Apr 05 2016
%F A000203 a(n) = A065475(n) + A048050(n). - _Omar E. Pol_, Nov 28 2016
%F A000203 a(n) = (Pi^2*n/6)*Sum_{q>=1} c_q(n)/q^2, with the Ramanujan sums c_q(n) given in A054533 as a c_n(k) table. See the Hardy reference, p. 141, or Hardy-Wright, Theorem 293, p. 251. - _Wolfdieter Lang_, Jan 06 2017
%F A000203 G.f. also (1 - E_2(q))/24, with the g.f. E_2 of A006352. See e.g., Hardy, p. 166, eq. (10.5.5). - _Wolfdieter Lang_, Jan 31 2017
%F A000203 From _Antti Karttunen_, Nov 25 2017: (Start)
%F A000203 a(n) = A048250(n) + A162296(n).
%F A000203 a(n) = A092261(n) * A295294(n). [This can be further expanded, see comment in A291750.] (End)
%F A000203 a(n) = A000593(n) * A038712(n). - _Ivan N. Ianakiev_ and _Omar E. Pol_, Nov 26 2017
%F A000203 a(n) = Sum_{q=1..n} c_q(n) * floor(n/q), where c_q(n) is the Ramanujan's sum function given in A054533. - _Daniel Suteu_, Jun 14 2018
%F A000203 a(n) = Sum_{k=1..n} gcd(n, k) / phi(n / gcd(n, k)), where phi(k) is the Euler totient function. - _Daniel Suteu_, Jun 21 2018
%F A000203 a(n) = (2^(1 + (A000005(n) - A001227(n))/(A000005(n) - A183063(n))) - 1)*A000593(n) = (2^(1 + (A183063(n)/A001227(n))) - 1)*A000593(n). - _Omar E. Pol_, Nov 03 2018
%F A000203 a(n) = Sum_{i=1..n} tau(gcd(n, i)). - _Ridouane Oudra_, Oct 15 2019
%F A000203 From _Peter Bala_, Jan 19 2021: (Start)
%F A000203 G.f.: A(x) = Sum_{n >= 1} x^(n^2)*(x^n + n*(1 - x^(2*n)))/(1 - x^n)^2 - differentiate equation 5 in Arndt w.r.t. x, and set x = 1.
%F A000203 A(x) = F(x) + G(x), where F(x) is the g.f. of A079667 and G(x) is the g.f. of A117004. (End)
%F A000203 a(n) = Sum_{k=1..n} tau(n/gcd(n,k))*phi(gcd(n,k))/phi(n/gcd(n,k)). - _Richard L. Ollerton_, May 07 2021
%F A000203 With the convention that a(n) = 0 for n <= 0 we have the recurrence a(n) = t(n) + Sum_{k >= 1} (-1)^(k+1)*(2*k + 1)*a(n - k*(k + 1)/2), where t(n) = (-1)^(m+1)*(2*m+1)*n/3 if n = m*(m + 1)/2, with m positive, is a triangular number else t(n) = 0. For example, n = 10 = (4*5)/2 is a triangular number, t(10) = -30, and so a(10) = -30 + 3*a(9) - 5*a(7) + 7*a(4) = -30 + 39 - 40 + 49 = 18. - _Peter Bala_, Apr 06 2022
%F A000203 Recurrence: a(p^x) = p*a(p^(x-1)) + 1, if p is prime and for any integer x. E.g., a(5^3) = 5*a(5^2) + 1 = 5*31 + 1 = 156. - _Jules Beauchamp_, Nov 11 2022
%F A000203 Sum_{n>=1} a(n)/exp(2*Pi*n) = 1/24 - 1/(8*Pi) = A319462. - _Vaclav Kotesovec_, May 07 2023
%F A000203 a(n) < (7n*A001221(n) + 10*n)/6 [Duncan, 1961] (see Duncan and Tattersall). - _Stefano Spezia_, Jul 13 2025
%e A000203 For example, 6 is divisible by 1, 2, 3 and 6, so sigma(6) = 1 + 2 + 3 + 6 = 12.
%e A000203 Let L = <V,W> be a 2-dimensional lattice. The 7 sublattices of index 4 are generated by <4V,W>, <V,4W>, <4V,W+-V>, <2V,2W>, <2V+W,2W>, <2V,2W+V>. Compare A001615.
%p A000203 with(numtheory): A000203 := n->sigma(n); seq(A000203(n), n=1..100);
%t A000203 Table[ DivisorSigma[1, n], {n, 100}]
%t A000203 a[ n_] := SeriesCoefficient[ QPolyGamma[ 1, 1, q] / Log[q]^2, {q, 0, n}]; (* _Michael Somos_, Apr 25 2013 *)
%o A000203 (Magma) [SumOfDivisors(n): n in [1..70]];
%o A000203 (Magma) [DivisorSigma(1,n): n in [1..70]]; // _Bruno Berselli_, Sep 09 2015
%o A000203 (PARI) {a(n) = if( n<1, 0, sigma(n))};
%o A000203 (PARI) {a(n) = if( n<1, 0, direuler( p=2, n, 1 / (1 - X) /(1 - p*X))[n])};
%o A000203 (PARI) {a(n) = if( n<1, 0, polcoeff( sum( k=1, n, x^k / (1 - x^k)^2, x * O(x^n)), n))}; /* _Michael Somos_, Jan 29 2005 */
%o A000203 (PARI) max_n = 30; ser = - sum(k=1,max_n,log(1-x^k)); a(n) = polcoeff(ser,n)*n \\ _Gottfried Helms_, Aug 10 2009
%o A000203 (MuPAD) numlib::sigma(n)$ n=1..81 // _Zerinvary Lajos_, May 13 2008
%o A000203 (SageMath) [sigma(n, 1) for n in range(1, 71)]  # _Zerinvary Lajos_, Jun 04 2009
%o A000203 (Maxima) makelist(divsum(n),n,1,1000); /* _Emanuele Munarini_, Mar 26 2011 */
%o A000203 (Haskell)
%o A000203 a000203 n = product $ zipWith (\p e -> (p^(e+1)-1) `div` (p-1)) (a027748_row n) (a124010_row n)
%o A000203 -- _Reinhard Zumkeller_, May 07 2012
%o A000203 (Scheme) (definec (A000203 n) (if (= 1 n) n (let ((p (A020639 n)) (e (A067029 n))) (* (/ (- (expt p (+ 1 e)) 1) (- p 1)) (A000203 (A028234 n)))))) ;; Uses macro definec from http://oeis.org/wiki/Memoization#Scheme - _Antti Karttunen_, Nov 25 2017
%o A000203 (Scheme) (define (A000203 n) (let ((r (sqrt n))) (let loop ((i (inexact->exact (floor r))) (s (if (integer? r) (- r) 0))) (cond ((zero? i) s) ((zero? (modulo n i)) (loop (- i 1) (+ s i (/ n i)))) (else (loop (- i 1) s)))))) ;; (Stand-alone program) - _Antti Karttunen_, Feb 20 2024
%o A000203 (GAP)
%o A000203 A000203:=List([1..10^2],n->Sigma(n)); # _Muniru A Asiru_, Oct 01 2017
%o A000203 (Python)
%o A000203 from sympy import divisor_sigma
%o A000203 def a(n): return divisor_sigma(n, 1)
%o A000203 print([a(n) for n in range(1, 71)]) # _Michael S. Branicky_, Jan 03 2021
%o A000203 (Python)
%o A000203 from math import prod
%o A000203 from sympy import factorint
%o A000203 def a(n): return prod((p**(e+1)-1)//(p-1) for p, e in factorint(n).items())
%o A000203 print([a(n) for n in range(1, 51)]) # _Michael S. Branicky_, Feb 25 2024
%o A000203 (APL, Dyalog dialect) A000203 ← +/{ð←⍵{(0=⍵|⍺)/⍵}⍳⌊⍵*÷2 ⋄ 1=⍵:ð ⋄ ð,(⍵∘÷)¨(⍵=(⌊⍵*÷2)*2)↓⌽ð} ⍝ _Antti Karttunen_, Feb 20 2024
%Y A000203 See A034885, A002093 for records. Bisections give A008438, A062731. Values taken are listed in A007609. A054973 is an inverse function.
%Y A000203 For partial sums see A024916.
%Y A000203 Row sums of A127093.
%Y A000203 sigma_i (i=0..25): A000005, A000203, A001157, A001158, A001159, A001160, A013954, A013955, A013956, A013957, A013958, A013959, A013960, A013961, A013962, A013963, A013964, A013965, A013966, A013967, A013968, A013969, A013970, A013971, A013972, A281959.
%Y A000203 Cf. A144736, A158951, A158902, A174740, A147843, A001158, A001160, A001065, A002192, A001001, A001615 (primitive sublattices), A039653, A088580, A074400, A083728, A006352, A002659, A083238, A000593, A050449, A050452, A051731, A027748, A124010, A069192, A057641, A001318.
%Y A000203 Cf. A009194, A082062 (gcd(a(n),n) and its largest prime factor), A179931, A192795 (gcd(a(n),A001157(n)) and largest prime factor).
%Y A000203 Cf. also A034448 (sum of unitary divisors).
%Y A000203 Cf. A007955 (products of divisors).
%Y A000203 Cf. A144613, A144614, A144615, A146076.
%Y A000203 A001227, A000593 and this sequence have the same parity: A053866. - _Omar E. Pol_, May 14 2016
%Y A000203 Cf. A001221, A054533.
%K A000203 easy,core,nonn,nice,mult
%O A000203 1,2
%A A000203 _N. J. A. Sloane_