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 24 results. Next

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

Original entry on oeis.org

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, 42, 40, 56, 30, 72, 32, 63, 48, 54, 48, 91, 38, 60, 56, 90, 42, 96, 44, 84, 78, 72, 48, 124, 57, 93, 72, 98, 54, 120, 72, 120, 80, 90, 60, 168, 62, 96, 104, 127, 84, 144, 68, 126, 96, 144
Offset: 1

Views

Author

Keywords

Comments

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).
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
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).
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]
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.]
Sum of number of common divisors of n and m, where m runs from 1 to n. - Naohiro Nomoto, Jan 10 2004
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).
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]
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
Also total number of parts in the partitions of n into equal parts. - Omar E. Pol, Jan 16 2013
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
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
a(n) + A000005(n) is an odd number iff n = 2m^2, m>=1. - Richard R. Forberg, Jan 15 2015
a(n) = a(n+1) for n = 14, 206, 957, 1334, 1364 (A002961). - Zak Seidov, May 03 2016
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
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
From Jianing Song, Nov 05 2022: (Start)
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.
The number of subgroups of C_n X C_n that are isomorphic to C_n is A001615(n). (End)

Examples

			For example, 6 is divisible by 1, 2, 3 and 6, so sigma(6) = 1 + 2 + 3 + 6 = 12.
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.
		

References

  • 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.
  • T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 38.
  • A. T. Benjamin and J. J. Quinn, Proofs that really count: the art of combinatorial proof, M.A.A. 2003, p. 116ff.
  • Florian Cajori, A History of Mathematical Notations, Dover edition (2012), par. 407.
  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 162, #16, (6), 2nd formula.
  • G. H. Hardy, Ramanujan: twelve lectures on subjects suggested by his life and work, AMS Chelsea Publishing, Providence, Rhode Island, 2002, pp. 141, 166.
  • H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, Fifth Edition, Clarendon Press, Oxford, 2003.
  • Ross Honsberger, "Mathematical Gems, Number One," The Dolciani Mathematical Expositions, Published and Distributed by The Mathematical Association of America, page 116.
  • Kanold, Hans Joachim, Kreisteilungspolynome und ungerade vollkommene Zahlen. (German), Ber. Math.-Tagung Tübingen 1946, (1947). pp. 84-87.
  • 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.
  • 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. S. Mitrinovic et al., Handbook of Number Theory, Kluwer, Section III.1, page 77.
  • G. Pólya, Induction and Analogy in Mathematics, vol. 1 of Mathematics and Plausible Reasoning, Princeton Univ Press 1954, page 92.
  • 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).
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, pages 91, 395.
  • Robert M. Young, Excursions in Calculus, The Mathematical Association of America, 1992 p. 361.

Crossrefs

See A034885, A002093 for records. Bisections give A008438, A062731. Values taken are listed in A007609. A054973 is an inverse function.
For partial sums see A024916.
Row sums of A127093.
Cf. A009194, A082062 (gcd(a(n),n) and its largest prime factor), A179931, A192795 (gcd(a(n),A001157(n)) and largest prime factor).
Cf. also A034448 (sum of unitary divisors).
Cf. A007955 (products of divisors).
A001227, A000593 and this sequence have the same parity: A053866. - Omar E. Pol, May 14 2016

Programs

  • GAP
    A000203:=List([1..10^2],n->Sigma(n)); # Muniru A Asiru, Oct 01 2017
    
  • Haskell
    a000203 n = product $ zipWith (\p e -> (p^(e+1)-1) `div` (p-1)) (a027748_row n) (a124010_row n)
    -- Reinhard Zumkeller, May 07 2012
    
  • Magma
    [SumOfDivisors(n): n in [1..70]];
    
  • Magma
    [DivisorSigma(1,n): n in [1..70]]; // Bruno Berselli, Sep 09 2015
    
  • Maple
    with(numtheory): A000203 := n->sigma(n); seq(A000203(n), n=1..100);
  • Mathematica
    Table[ DivisorSigma[1, n], {n, 100}]
    a[ n_] := SeriesCoefficient[ QPolyGamma[ 1, 1, q] / Log[q]^2, {q, 0, n}]; (* Michael Somos, Apr 25 2013 *)
  • Maxima
    makelist(divsum(n),n,1,1000); /* Emanuele Munarini, Mar 26 2011 */
    
  • MuPAD
    numlib::sigma(n)$ n=1..81 // Zerinvary Lajos, May 13 2008
    
  • PARI
    {a(n) = if( n<1, 0, sigma(n))};
    
  • PARI
    {a(n) = if( n<1, 0, direuler( p=2, n, 1 / (1 - X) /(1 - p*X))[n])};
    
  • 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 */
    
  • 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
    
  • Python
    from sympy import divisor_sigma
    def a(n): return divisor_sigma(n, 1)
    print([a(n) for n in range(1, 71)]) # Michael S. Branicky, Jan 03 2021
    
  • Python
    from math import prod
    from sympy import factorint
    def a(n): return prod((p**(e+1)-1)//(p-1) for p, e in factorint(n).items())
    print([a(n) for n in range(1, 51)]) # Michael S. Branicky, Feb 25 2024
    (APL, Dyalog dialect) A000203 ← +/{ð←⍵{(0=⍵|⍺)/⍵}⍳⌊⍵*÷2 ⋄ 1=⍵:ð ⋄ ð,(⍵∘÷)¨(⍵=(⌊⍵*÷2)*2)↓⌽ð} ⍝ Antti Karttunen, Feb 20 2024
  • SageMath
    [sigma(n, 1) for n in range(1, 71)]  # Zerinvary Lajos, Jun 04 2009
    
  • 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
    
  • 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
    

Formula

Multiplicative with a(p^e) = (p^(e+1)-1)/(p-1). - David W. Wilson, Aug 01 2001
For the following bounds and many others, see Mitrinovic et al. - N. J. A. Sloane, Oct 02 2017
If n is composite, a(n) > n + sqrt(n).
a(n) < n*sqrt(n) for all n.
a(n) < (6/Pi^2)*n^(3/2) for n > 12.
G.f.: -x*deriv(eta(x))/eta(x) where eta(x) = Product_{n>=1} (1-x^n). - Joerg Arndt, Mar 14 2010
L.g.f.: -log(Product_{j>=1} (1-x^j)) = Sum_{n>=1} a(n)/n*x^n. - Joerg Arndt, Feb 04 2011
Dirichlet convolution of phi(n) and tau(n), i.e., a(n) = sum_{d|n} phi(n/d)*tau(d), cf. A000010, A000005.
a(n) is odd iff n is a square or twice a square. - Robert G. Wilson v, Oct 03 2001
a(n) = a(n*prime(n)) - prime(n)*a(n). - Labos Elemer, Aug 14 2003 (Clarified by Omar E. Pol, Apr 27 2016)
a(n) = n*A000041(n) - Sum_{i=1..n-1} a(i)*A000041(n-i). - Jon Perry, Sep 11 2003
a(n) = -A010815(n)*n - Sum_{k=1..n-1} A010815(k)*a(n-k). - Reinhard Zumkeller, Nov 30 2003
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
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
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
For odd n, a(n) = A000593(n). For even n, a(n) = A000593(n) + A074400(n/2). - Jonathan Vos Post, Mar 26 2006
Equals the inverse Moebius transform of the natural numbers. Equals row sums of A127093. - Gary W. Adamson, May 20 2007
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
a(n) = A054785(2*n) - A000593(2*n). - Reinhard Zumkeller, Apr 23 2008
a(n) = n*Sum_{k=1..n} A060642(n,k)/k*(-1)^(k+1). - Vladimir Kruchinin, Aug 10 2010
Dirichlet convolution of A037213 and A034448. - R. J. Mathar, Apr 13 2011
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
a(n) = A001065(n) + n. - Mats Granvik, May 20 2012
a(n) = A006128(n) - A220477(n). - Omar E. Pol, Jan 17 2013
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
a(n) = Sum_{k=1..A003056(n)} (-1)^(k-1)*A000330(k)*A000716(n-A000217(k)). - Mircea Merca, Mar 05 2014
a(n) = A240698(n, A000005(n)). - Reinhard Zumkeller, Apr 10 2014
a(n) = Sum_{d^2|n} A001615(n/d^2) = Sum_{d^3|n} A254981(n/d^3). - Álvar Ibeas, Mar 06 2015
a(3*n) = A144613(n). a(3*n + 1) = A144614(n). a(3*n + 2) = A144615(n). - Michael Somos, Jul 19 2015
a(n) = Sum{i=1..n} Sum{j=1..i} cos((2*Pi*n*j)/i). - Michel Lagneau, Oct 14 2015
a(n) = A000593(n) + A146076(n). - Omar E. Pol, Apr 05 2016
a(n) = A065475(n) + A048050(n). - Omar E. Pol, Nov 28 2016
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
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
From Antti Karttunen, Nov 25 2017: (Start)
a(n) = A048250(n) + A162296(n).
a(n) = A092261(n) * A295294(n). [This can be further expanded, see comment in A291750.] (End)
a(n) = A000593(n) * A038712(n). - Ivan N. Ianakiev and Omar E. Pol, Nov 26 2017
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
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
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
a(n) = Sum_{i=1..n} tau(gcd(n, i)). - Ridouane Oudra, Oct 15 2019
From Peter Bala, Jan 19 2021: (Start)
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.
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)
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
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
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
Sum_{n>=1} a(n)/exp(2*Pi*n) = 1/24 - 1/(8*Pi) = A319462. - Vaclav Kotesovec, May 07 2023
a(n) < (7n*A001221(n) + 10*n)/6 [Duncan, 1961] (see Duncan and Tattersall). - Stefano Spezia, Jul 13 2025

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

A007437 Inverse Moebius transform of triangular numbers.

Original entry on oeis.org

1, 4, 7, 14, 16, 31, 29, 50, 52, 74, 67, 119, 92, 137, 142, 186, 154, 247, 191, 294, 266, 323, 277, 455, 341, 446, 430, 553, 436, 686, 497, 714, 634, 752, 674, 1001, 704, 935, 878, 1150, 862, 1298, 947, 1323, 1222, 1361, 1129, 1767, 1254, 1674, 1486, 1834
Offset: 1

Views

Author

Keywords

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Maple
    with(numtheory):
    a:= proc(n) option remember;
          add(d*(d+1)/2, d=divisors(n))
        end:
    seq(a(n), n=1..60);  # Alois P. Heinz, Feb 09 2011
  • Mathematica
    a[n_] := (DivisorSigma[1, n] + DivisorSigma[2, n])/2; Table[a[n], {n, 1, 60}] (* Jean-François Alcover, Mar 10 2014, after Benoit Cloitre *)
  • PARI
    a(n)=if(n<1,1,sumdiv(n,d,(d^2+d))/2); /* Joerg Arndt, Aug 14 2012 */
    
  • PARI
    my(N=66, x='x+O('x^N)); Vec(sum(k=1, N, binomial(k+1, 2)*x^k/(1-x^k))) \\ Seiichi Manyama, Apr 19 2021

Formula

Coefficients in expansion of Sum_{n >= 1} x^n/(1-x^n)^3.
G.f.: Sum_{n>=1} (n*(n+1)/2) * x^n/(1-x^n). - Joerg Arndt, Jan 30 2011
a(n) = Sum_{d|n} d*(d+1)/2 = (1/2)*(sigma(n) + sigma_2(n)) = (1/2)*(A000203(n) + A001157(n)). - Benoit Cloitre, Apr 08 2002
Row sums of triangles A134544 and A134545. - Gary W. Adamson, Oct 31 2007
Row sums of triangle A134839 - Gary W. Adamson, Nov 12 2007
Dirichlet g.f. zeta(s)*(zeta(s-1) + zeta(s-2))/2. - Franklin T. Adams-Watters, Nov 05 2009
L.g.f.: -log(Product_{k>=1} (1 - x^k)^((k+1)/2)) = Sum_{n>=1} a(n)*x^n/n. - Ilya Gutkovskiy, Mar 12 2018
Sum_{k=1..n} a(k) ~ Zeta(3) * n^3 / 6. - Vaclav Kotesovec, Nov 06 2018
a(n) = Sum_{i=1..n} i*A135539(n,i). - Ridouane Oudra, Jul 22 2022

Extensions

More terms from Christian G. Bower.

A071324 Alternating sum of all divisors of n; divisors nonincreasing, starting with n.

Original entry on oeis.org

1, 1, 2, 3, 4, 4, 6, 5, 7, 6, 10, 8, 12, 8, 12, 11, 16, 13, 18, 12, 16, 12, 22, 16, 21, 14, 20, 18, 28, 22, 30, 21, 24, 18, 32, 25, 36, 20, 28, 24, 40, 32, 42, 30, 36, 24, 46, 32, 43, 31, 36, 36, 52, 40, 48, 38, 40, 30, 58, 40, 60, 32, 46, 43, 56, 48, 66, 48, 48, 42, 70, 49, 72
Offset: 1

Views

Author

Reinhard Zumkeller, May 18 2002, Jul 03 2008

Keywords

Comments

Alternating row sums of A056538. - Omar E. Pol, Feb 17 2024
Does a constant analogous to the median abundancy index (see A353617) exist for this function? Particularly, does a constant exist such that the numbers having the value a(n)/n greater than this constant have natural density exactly 1/2? Using the first 10^7 values, one observes that if it exists, this constant appears to converge around 0.726. - Shreyansh Jaiswal, Apr 16 2025

Examples

			Divisors of 20: {1,2,4,5,10,20} therefore a(20) = 20 - 10 + 5 - 4 + 2 - 1 = 12.
		

Crossrefs

Cf. A000010, A000203, A071322, a(n) = abs(A071323(n)).
Cf. A056538.

Programs

  • Maple
    with(numtheory): a:=proc(n) local k, t:=0, A:=divisors(n); for k to tau(n) do t:= t+A[k]*(-1)^(tau(n)-k) end do; return t; end proc; seq(a(n), n=1..60); # Ridouane Oudra, Nov 23 2022
  • Mathematica
    a[n_] := Plus @@ (-(d = Divisors[n])*(-1)^(Range[Length[d],1,-1])); Array[a, 100] (* Amiram Eldar, Mar 11 2020 *)
    Table[Total[Times@@@Partition[Riffle[Reverse[Divisors[n]],{1,-1},{2,-1,2}],2]],{n,80}] (* Harvey P. Dale, Nov 06 2022 *)
  • PARI
    a(n) = my(d=Vecrev(divisors(n))); sum(k=1, #d, (-1)^(k+1)*d[k]); \\ Michel Marcus, Aug 11 2018
    (APL, Dyalog dialect)
    divisors ← {⍺←⍵{(0=⍵|⍺)/⍵}⍳⌊⍵*÷2 ⋄ 1=⍵:⍺ ⋄ ⍺,(⍵∘÷)¨(⍵=(⌊⍵*÷2)*2)↓⌽⍺}
    A071324 ← {-/⌽(divisors ⍵)} ⍝ Antti Karttunen, Feb 16 2024
    
  • Python
    from sympy import divisors;  from functools import lru_cache
    cached_divisors = lru_cache()(divisors)
    def a(n):  return sum(d if i%2==0 else -d for i, d in enumerate(reversed(cached_divisors(n))))
    A071324 = [a(i) for i in range(1, 74)]  # Jwalin Bhatt, Apr 02 2025

Formula

a(A028983(n)) mod 2 = 0; a(A028982(n)) mod 2 = 1.
a(n) = Sum_{i=1..n} (A135539(n,i) mod 2). - Ridouane Oudra, Nov 23 2022
From Shreyansh Jaiswal, Apr 16 2025: (Start)
a(p) = p-1 for prime p.
For odd n, 2n/3 <= a(n) <= n.
For even n, n/2 <= a(n) <= 5n/6.
a(n) >= A000010(n) for n>=1. (End)

A184389 a(n) = Sum_{k=1..tau(n)} k, where tau is the number of divisors of n (A000005).

Original entry on oeis.org

1, 3, 3, 6, 3, 10, 3, 10, 6, 10, 3, 21, 3, 10, 10, 15, 3, 21, 3, 21, 10, 10, 3, 36, 6, 10, 10, 21, 3, 36, 3, 21, 10, 10, 10, 45, 3, 10, 10, 36, 3, 36, 3, 21, 21, 10, 3, 55, 6, 21, 10, 21, 3, 36, 10, 36, 10, 10, 3, 78, 3, 10, 21, 28, 10, 36, 3, 21, 10, 36, 3, 78
Offset: 1

Views

Author

Jaroslav Krizek, Jan 12 2011

Keywords

Comments

Length of row n in triangle A187207. - Omar E. Pol, Aug 07 2011
Number of pairs of even divisors of 2n, (d1,d2), such that d1<=d2. - Wesley Ivan Hurt, Aug 24 2020

Examples

			For n = 4; tau(4) = 3; a(4) = 1+2+3 = 6.
		

Crossrefs

Cf. A000005 (tau), A000217 (triangular numbers).

Programs

Formula

a(n) = A000217(A000005(n)) = (1/2)*A000005(n)*(A000005(n)+1).
a(n) = A066446(n) + A000005(n) = A035116(n) - A066446(n). - Reinhard Zumkeller, Sep 08 2015
Dirichlet g.f.: zeta(s)^2*(zeta(s)^2 + zeta(2*s))/(2*zeta(2*s)). - Ilya Gutkovskiy, Jun 25 2016
a(n) = Sum_{d1|(2*n), d2|(2*n), d1 and d2 even, d1<=d2} 1. - Wesley Ivan Hurt, Aug 24 2020
a(n) = Sum_{d|n} A018892(d). - Daniel Suteu, Jan 08 2021
a(n) = Sum_{d|n} A135539(n,d). - Ridouane Oudra, May 29 2025
a(n) = A337362(n) + A129308(n). - Ridouane Oudra, May 30 2025

A321014 Number of divisors of n which are greater than 3.

Original entry on oeis.org

0, 0, 0, 1, 1, 1, 1, 2, 1, 2, 1, 3, 1, 2, 2, 3, 1, 3, 1, 4, 2, 2, 1, 5, 2, 2, 2, 4, 1, 5, 1, 4, 2, 2, 3, 6, 1, 2, 2, 6, 1, 5, 1, 4, 4, 2, 1, 7, 2, 4, 2, 4, 1, 5, 3, 6, 2, 2, 1, 9, 1, 2, 4, 5, 3, 5, 1, 4, 2, 6, 1, 9, 1, 2, 4, 4, 3, 5, 1, 8, 3, 2, 1, 9, 3, 2, 2, 6, 1, 9, 3, 4, 2, 2
Offset: 1

Views

Author

N. J. A. Sloane, Nov 04 2018

Keywords

References

  • Marjorie Senechal, "Introduction to lattice geometry." In M. Waldschmidt et al., eds., From Number Theory to Physics, pp. 476-495. Springer, Berlin, Heidelberg, 1992. See Cor. 3.7.

Crossrefs

A072527 is a shifted version.
Column k=4 of A135539.

Programs

  • Maple
    d2:=proc(n) local c;
    if n <= 3 then return(0); fi;
    c:=NumberTheory[tau](n)-1;
    if (n mod 2)=0 then c:=c-1; fi;
    if (n mod 3)=0 then c:=c-1; fi; c; end;
    [seq(d2(n),n=1..120)];
  • Mathematica
    nmax = 94; Rest[CoefficientList[Series[Sum[x^k/(1 - x^k), {k, 4, nmax}], {x, 0, nmax}], x]] (* Ilya Gutkovskiy, Nov 07 2018 *)
  • PARI
    a(n) = sumdiv(n, d, d>3); \\ Michel Marcus, Nov 06 2018
    
  • PARI
    a(n) = numdiv(n) - 3 + !!(n%2) + !!(n%3) \\ David A. Corneth, Nov 07 2018
    
  • PARI
    my(N=100, x='x+O('x^N)); concat([0, 0, 0], Vec(sum(k=1, N, x^(4*k)/(1-x^k)))) \\ Seiichi Manyama, Jan 07 2023

Formula

G.f.: Sum_{k>=4} x^k/(1 - x^k). - Ilya Gutkovskiy, Nov 06 2018
a(n) = Sum_{d|n, d>3} 1. - Wesley Ivan Hurt, Apr 28 2020
G.f.: Sum_{k>=1} x^(4*k)/(1 - x^k). - Seiichi Manyama, Jan 07 2023
Sum_{k=1..n} a(k) ~ n * (log(n) + 2*gamma - 17/6), where gamma is Euler's constant (A001620). - Amiram Eldar, Jan 08 2024

A140773 Consider the products of all pairs of (not necessarily distinct) positive divisors of n. a(n) is the number of these products that divide n. a(n) also is the number of the products that are divisible by n.

Original entry on oeis.org

1, 2, 2, 4, 2, 5, 2, 6, 4, 5, 2, 10, 2, 5, 5, 9, 2, 10, 2, 10, 5, 5, 2, 16, 4, 5, 6, 10, 2, 14, 2, 12, 5, 5, 5, 20, 2, 5, 5, 16, 2, 14, 2, 10, 10, 5, 2, 24, 4, 10, 5, 10, 2, 16, 5, 16, 5, 5, 2, 28, 2, 5, 10, 16, 5, 14, 2, 10, 5, 14, 2, 32, 2, 5, 10, 10, 5, 14, 2, 24, 9, 5, 2, 28, 5, 5, 5, 16, 2, 28, 5
Offset: 1

Views

Author

Leroy Quet, May 29 2008

Keywords

Comments

Number of 3D grids of n congruent boxes with two different edge lengths, in a box, modulo rotation (cf. A034836 for cubes instead of boxes and A007425 for boxes with three different edge lengths; cf. A000005 for the 2D case). - Manfred Boergens, Feb 25 2021
Number of distinct faces obtainable by arranging n unit cubes into a cuboid. - Chris W. Milson, Mar 14 2021

Examples

			The divisors of 20 are 1,2,4,5,10,20. There are 10 pairs of divisors whose product divides 20: 1*1=1, 1*2=2, 1*4=4, 1*5=5, 1*10=10, 1*20=20, 2*2=4, 2*5=10, 2*10=20, 4*5 = 20. Likewise, there are 10 products that are divisible by 20: 4*5=20, 2*10=20, 4*10=40, 10*10=100, 1*20=20, 2*20=40, 4*20=80, 5*20=100, 10*20=200, 20*20=400. So a(20) = 10.
		

Crossrefs

Cf. A140774.
Cf. A369255 (parity), A369256 (positions of odd terms), A378213 (Dirichlet inverse).

Programs

  • Mathematica
    (* first do *) Needs["Combinatorica`"] (* then *) f[n_] := Count[ n/Times @@@ Union[Sort /@ Tuples[Divisors@ n, 2]], Integer]; Array[f, 91] (* _Robert G. Wilson v, May 31 2008 *)
    d=Divisors[n]; r=Length[d]; Sum[Ceiling[Length[Divisors[d[[j]]]]/2],{j,r}] (* Manfred Boergens, Feb 25 2021 *)
  • PARI
    \\ Two implementations, after the two different interpretations given by the author of the sequence:
    A140773v1(n) = { my(ds = divisors(n),s=0); for(i=1,#ds,for(j=i,#ds,if(!(n%(ds[i]*ds[j])),s=s+1))); s; }
    A140773v2(n) = { my(ds = divisors(n),s=0); for(i=1,#ds,for(j=i,#ds,if(!((ds[i]*ds[j])%n),s=s+1))); s; }
    \\ Antti Karttunen, May 19 2017
    
  • Python
    # See C. W. Milson link.

Formula

a(n) = Sum_{m|n} A038548(m) = Sum_{m|n} ceiling(d(m)/2), where d(m) = number of divisors of m (A000005). - Manfred Boergens, Feb 25 2021
a(n) = Sum_{d|n} A135539(d,n/d). - Ridouane Oudra, Jul 10 2021
a(n) = (A007425(n) + A046951(n))/2. - Ridouane Oudra, Apr 10 2024
G.f.: Sum_{k>=1} Sum_{d|k} x^(k^2/d)/(1 - x^k). - Miles Wilson, Jun 12 2025

Extensions

Corrected and extended by Robert G. Wilson v, May 31 2008

A064945 a(n) = Sum_{i|n, j|n, j >= i} i.

Original entry on oeis.org

1, 4, 5, 11, 7, 22, 9, 26, 18, 30, 13, 64, 15, 38, 38, 57, 19, 82, 21, 87, 48, 54, 25, 156, 38, 62, 58, 109, 31, 179, 33, 120, 68, 78, 68, 244, 39, 86, 78, 213, 43, 224, 45, 153, 143, 102, 49, 348, 66, 166, 98, 175, 55, 268, 96, 267, 108, 126, 61, 542, 63, 134, 181
Offset: 1

Views

Author

Vladeta Jovovic, Oct 28 2001

Keywords

Examples

			a(6) = dot_product(4,3,2,1)*(1,2,3,6) = 4*1+3*2+2*3+1*6 = 22.
		

Crossrefs

Programs

  • Haskell
    a064945 = sum . zipWith (*) [1..] . reverse . a027750_row'
    -- Reinhard Zumkeller, Jul 14 2015
    
  • Maple
    with(numtheory): seq(add((tau(n)-i+1)*sort(convert(divisors(n),'list'))[i],i=1..tau(n)), n=1..200);
  • Mathematica
    A064945[n_] := #.Range[Length[#], 1, -1] & [Divisors[n]];
    Array[A064945, 100] (* Paolo Xausa, Aug 07 2025 *)
  • PARI
    a(n) = my(d=divisors(n), t=length(d)); sum(i=1, t, (t - i + 1)*d[i]); \\ Harry J. Smith, Oct 01 2009
    
  • PARI
    a(n)=my(d=divisors(n)); sum(i=1,#d,(#d+1-i)*d[i]) \\ Charles R Greathouse IV, Jun 10 2015
    
  • Python
    from sympy import divisors, divisor_sigma
    def A064945(n): return (divisor_sigma(n,0)+1)*divisor_sigma(n)-sum(a*b for a, b in enumerate(divisors(n),1)) # Chai Wah Wu, Aug 07 2025

Formula

a(n) = Sum_{i=1..tau(n)} (tau(n)-i+1)*d_i, where {d_i}, i=1..tau(n), is the increasing sequence of divisors of n.
a(n) = Sum_{i=1..A000005(n)} (A000005(n)-i+1)*A027750(n, i). - Michel Marcus, Jun 10 2015
From Ridouane Oudra, Aug 02 2025: (Start)
a(n) = Sum_{d|n} d*A135539(n,d).
a(n) = A064947(n) + A000203(n).
a(n) = (A064949(n) + A000203(n))/2.
a(n) = A064949(n) - A064947(n).
a(n) = A337360(n) - A064944(n).
a(n) = A064840(n) - A064946(n). (End)

A086671 Sum of floor(sqrt(d)) where d runs through the divisors of n.

Original entry on oeis.org

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

Views

Author

Jon Perry, Jul 27 2003

Keywords

Examples

			10 has divisors 1,2,5,10. floor(sqrt(d)) gives 1,1,2,3, therefore a(10)=7.
		

Crossrefs

Programs

  • Maple
    A086671:= proc(n)
        add(floor(sqrt(d)), d = numtheory[divisors](n))
    end proc; # R. J. Mathar, Oct 26 2013
  • Mathematica
    Table[DivisorSum[n, Floor[Sqrt[#]] &], {n, 100}] (* T. D. Noe, Oct 28 2013 *)
  • PARI
    for (n=1,100,s=0; fordiv(i=n,i,s+=floor(sqrt(i))); print1(","s))
    
  • PARI
    a(n) = sumdiv(n, d, sqrtint(d)); \\ Michel Marcus, Mar 03 2020

Formula

a(n) = Sum_{d|n} floor(sqrt(d)). - Wesley Ivan Hurt, Oct 25 2013
G.f.: sum(k>=1, floor(sqrt(k))*x^k/(1-x^k) ). - Mircea Merca, Feb 22 2014
a(n) = Sum_{i=1..floor(sqrt(n))} A135539(n,i^2). - Ridouane Oudra, Apr 15 2022

A338648 Number of divisors of n which are greater than 4.

Original entry on oeis.org

0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 2, 2, 1, 3, 1, 3, 2, 2, 1, 4, 2, 2, 2, 3, 1, 5, 1, 3, 2, 2, 3, 5, 1, 2, 2, 5, 1, 5, 1, 3, 4, 2, 1, 6, 2, 4, 2, 3, 1, 5, 3, 5, 2, 2, 1, 8, 1, 2, 4, 4, 3, 5, 1, 3, 2, 6, 1, 8, 1, 2, 4, 3, 3, 5, 1, 7, 3, 2, 1, 8, 3, 2, 2, 5, 1, 9, 3, 3, 2, 2, 3, 8, 1, 4, 4, 6, 1, 5, 1, 5, 6, 2, 1, 8, 1, 6
Offset: 1

Views

Author

Ilya Gutkovskiy, Apr 22 2021

Keywords

Crossrefs

Programs

  • Mathematica
    Table[DivisorSum[n, 1 &, # > 4 &], {n, 1, 110}]
    nmax = 110; CoefficientList[Series[Sum[x^(5 k)/(1 - x^k), {k, 1, nmax}], {x, 0, nmax}], x] // Drop[#, 1] &
    nmax = 110; CoefficientList[Series[-Log[Product[(1 - x^k)^(1/k), {k, 5, nmax}]], {x, 0, nmax}], x] Range[0, nmax] // Drop[#, 1] &
  • PARI
    a(n) = sumdiv(n, d, d>4); \\ Michel Marcus, Apr 22 2021; corrected Jun 13 2022
    
  • PARI
    my(N=100, x='x+O('x^N)); concat([0, 0, 0, 0], Vec(sum(k=5, N, x^k/(1-x^k)))) \\ Seiichi Manyama, Jan 07 2023

Formula

G.f.: Sum_{k>=1} x^(5*k) / (1 - x^k).
L.g.f.: -log( Product_{k>=5} (1 - x^k)^(1/k) ).
a(n) = A000005(n) - A083040(n).
G.f.: Sum_{k>=5} x^k/(1 - x^k). - Seiichi Manyama, Jan 07 2023
Sum_{k=1..n} a(k) ~ n * (log(n) + 2*gamma - 37/12), where gamma is Euler's constant (A001620). - Amiram Eldar, Jan 08 2024

Extensions

a(1)-a(4) prepended by David A. Corneth, Jun 13 2022
Showing 1-10 of 24 results. Next