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 32 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

A000188 (1) Number of solutions to x^2 == 0 (mod n). (2) Also square root of largest square dividing n. (3) Also max_{ d divides n } gcd(d, n/d).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Shadow transform of the squares A000290. - Vladeta Jovovic, Aug 02 2002
Labos Elemer and Henry Bottomley independently proved that (2) and (3) define the same sequence. Bottomley also showed that (1) and (2) define the same sequence.
Proof that (2) = (3): Let max{gcd(d, n/d)} = K, then d = Kx, n/d = Ky so n = KKxy where xy is the squarefree part of n, otherwise K is not maximal. Observe also that g = gcd(K, xy) is not necessarily 1. Thus K is also the "maximal square-root factor" of n. - Labos Elemer, Jul 2000
We can write sqrt(n) = b*sqrt(c) where c is squarefree. Then b = A000188(n) is the "inner square root" of n, c = A007913(n) and b*c = A019554(n) = "outer square root" of n.

Examples

			a(8) = 2 because the largest square dividing 8 is 4, the square root of which is 2.
a(9) = 3 because 9 is a perfect square and its square root is 3.
a(10) = 1 because 10 is squarefree.
		

Crossrefs

Cf. A019554 (outer square root), A053150 (inner 3rd root), A019555 (outer 3rd root), A053164 (inner 4th root), A053166 (outer 4th root), A015052 (outer 5th root), A015053 (outer 6th root).
Cf. A240976 (Dgf at s=2).

Programs

  • Haskell
    a000188 n = product $ zipWith (^)
                          (a027748_row n) $ map (`div` 2) (a124010_row n)
    -- Reinhard Zumkeller, Apr 22 2012
    
  • Maple
    with(numtheory):A000188 := proc(n) local i: RETURN(op(mul(i,i=map(x->x[1]^floor(x[2]/2),ifactors(n)[2])))); end;
  • Mathematica
    Array[Function[n, Count[Array[PowerMod[#, 2, n ] &, n, 0 ], 0 ] ], 100]
    (* Second program: *)
    nMax = 90; sList = Range[Floor[Sqrt[nMax]]]^2; Sqrt[#] &/@ Table[ Last[ Select[ sList, Divisible[n, #] &]], {n, nMax}] (* Harvey P. Dale, May 11 2011 *)
    a[n_] := With[{d = Divisors[n]}, Max[GCD[d, Reverse[d]]]] (* Mamuka Jibladze, Feb 15 2015 *)
    f[p_, e_] := p^Floor[e/2]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Sep 18 2020 *)
  • PARI
    a(n)=if(n<1,0,sum(i=1,n,i*i%n==0))
    
  • PARI
    a(n)=sqrtint(n/core(n)) \\ Zak Seidov, Apr 07 2009
    
  • PARI
    a(n)=core(n, 1)[2] \\ Michel Marcus, Feb 27 2013
    
  • Python
    from sympy.ntheory.factor_ import core
    from sympy import integer_nthroot
    def A000188(n): return integer_nthroot(n//core(n),2)[0] # Chai Wah Wu, Jun 14 2021

Formula

a(n) = n/A019554(n) = sqrt(A008833(n)).
a(n) = Sum_{d^2|n} phi(d), where phi is the Euler totient function A000010.
Multiplicative with a(p^e) = p^floor(e/2). - David W. Wilson, Aug 01 2001
Dirichlet series: Sum_{n >= 1} a(n)/n^s = zeta(2*s - 1)*zeta(s)/zeta(2*s), (Re(s) > 1).
Dirichlet convolution of A037213 and A008966. - R. J. Mathar, Feb 27 2011
Finch & Sebah show that the average order of a(n) is 3 log n/Pi^2. - Charles R Greathouse IV, Jan 03 2013
a(n) = sqrt(n/A007913(n)). - M. F. Hasler, May 08 2014
Sum_{n>=1} lambda(n)*a(n)*x^n/(1-x^n) = Sum_{n>=1} n*x^(n^2), where lambda() is the Liouville function A008836 (cf. A205801). - Mamuka Jibladze, Feb 15 2015
a(2*n) = a(n)*(A096268(n-1) + 1). - observed by Velin Yanev, Jul 14 2017, The formula says that a(2n) = 2*a(n) only when 2-adic valuation of n (A007814(n)) is odd, otherwise a(2n) = a(n). This follows easily from the definition (2). - Antti Karttunen, Nov 28 2017
Sum_{k=1..n} a(k) ~ 3*n*((log(n) + 3*gamma - 1)/Pi^2 - 12*zeta'(2)/Pi^4), where gamma is the Euler-Mascheroni constant A001620. - Vaclav Kotesovec, Dec 01 2020
Conjecture: a(n) = Sum_{k=1..n} A010052(n*k). - Velin Yanev, Jul 04 2021
G.f.: Sum_{k>=1} phi(k) * x^(k^2) / (1 - x^(k^2)). - Ilya Gutkovskiy, Aug 20 2021

Extensions

Edited by M. F. Hasler, May 08 2014

A066839 a(n) = sum of positive divisors k of n with k <= sqrt(n).

Original entry on oeis.org

1, 1, 1, 3, 1, 3, 1, 3, 4, 3, 1, 6, 1, 3, 4, 7, 1, 6, 1, 7, 4, 3, 1, 10, 6, 3, 4, 7, 1, 11, 1, 7, 4, 3, 6, 16, 1, 3, 4, 12, 1, 12, 1, 7, 9, 3, 1, 16, 8, 8, 4, 7, 1, 12, 6, 14, 4, 3, 1, 21, 1, 3, 11, 15, 6, 12, 1, 7, 4, 15, 1, 24, 1, 3, 9, 7, 8, 12, 1, 20, 13, 3, 1, 23, 6, 3, 4, 15, 1, 26, 8, 7, 4, 3
Offset: 1

Views

Author

Leroy Quet, Jan 20 2002

Keywords

Comments

Row sums of the table in A161906. - Reinhard Zumkeller, Mar 08 2013
Conjecture: a(n) is the total number of parts in all partitions of n into consecutive parts that differ by 2. - Omar E. Pol, May 03 2020. This conjecture is true (the g.f. for these partitions agrees with the g.f. given below by Michael Somos). - N. J. A. Sloane, Dec 02 2020
Column 2 of A334466. - Omar E. Pol, Dec 03 2020

Examples

			a(9) = 4 = 1 + 3 because 1 and 3 are the positive divisors of 9 that are <= sqrt(9).
a(20) = 7: the divisors of 20 are 1, 2, 4, 5, 10 and 20. a(20) = 1 + 2 + 4 = 7.
		

Crossrefs

Programs

  • Haskell
    a066839 = sum . a161906_row  -- Reinhard Zumkeller, Mar 08 2013
    
  • Maple
    with(numtheory):for n from 1 to 200 do c[n] := 0:d := divisors(n):for i from 1 to nops(d) do if d[i]<=n^.5+10^(-10) then c[n] := c[n]+d[i]:fi:od:od:seq(c[i],i=1..200);
    # alternative
    seq(add(d, d in select(x->x^2<=n, numtheory[divisors](n))), n=1..100); # Ridouane Oudra, Jun 24 2025
  • Mathematica
    f[n_] := Plus @@ Select[ Divisors@n, # <= Sqrt@n &]; Array[f, 94] (* Robert G. Wilson v, Mar 04 2010 *)
    Table[Sum[If[n > k*(k-1), k, 0], {k, Divisors[n]}], {n, 1, 100}] (* Vaclav Kotesovec, Oct 22 2024 *)
  • PARI
    a(n)=sumdiv(n,d, (d^2<=n)*d) /* Michael Somos, Nov 19 2005 */
    
  • PARI
    { for (n=1, 1000, d=divisors(n); s=sum(k=1, ceil(length(d)/2), d[k]); write("b066839.txt", n, " ", s) ) } \\ Harry J. Smith, Mar 31 2010
    
  • Python
    from itertools import takewhile
    from sympy import divisors
    def A066839(n): return sum(takewhile(lambda x:x**2<=n,divisors(n))) # Chai Wah Wu, Dec 19 2023
  • Sage
    [sum(k for k in divisors(n) if k^2<=n) for n in (1..94)] # Giuseppe Coppoletta, Jan 21 2015
    

Formula

G.f.: Sum_{k>0} k*x^(k^2)/(1-x^k). - Michael Somos, Nov 19 2005
a(n) = Sum_{i=1..floor(sqrt(n))} (-(n mod i) + (n-1) mod i + 1). - José de Jesús Camacho Medina, Feb 21 2021
a(p^(2k+1)) = a(p^(2k)) = (p^(k+1)-1)/(p-1) = A000203(p^k) for k>=0 and p prime. - Chai Wah Wu, Dec 23 2023
Sum_{k=1..n} a(k) ~ 2 * n^(3/2) / 3 [Iannucci, 2019]. - Vaclav Kotesovec, Oct 23 2024
a(n) = A070039(n) + A037213(n). - Ridouane Oudra, Jun 24 2025

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Apr 12 2002

A070039 Sum of the divisors of n that are < sqrt(n).

Original entry on oeis.org

0, 1, 1, 1, 1, 3, 1, 3, 1, 3, 1, 6, 1, 3, 4, 3, 1, 6, 1, 7, 4, 3, 1, 10, 1, 3, 4, 7, 1, 11, 1, 7, 4, 3, 6, 10, 1, 3, 4, 12, 1, 12, 1, 7, 9, 3, 1, 16, 1, 8, 4, 7, 1, 12, 6, 14, 4, 3, 1, 21, 1, 3, 11, 7, 6, 12, 1, 7, 4, 15, 1, 24, 1, 3, 9, 7, 8, 12, 1, 20, 4, 3, 1, 23, 6, 3, 4, 15, 1, 26, 8, 7, 4, 3, 6
Offset: 1

Views

Author

Labos Elemer, Apr 19 2002

Keywords

Examples

			a(96) = 1+2+3+4+6+8+12 = 36; a(225) = 1+3+5+9 = 18.
		

Crossrefs

Programs

  • Maple
    seq(add(d, d in select(x->x^2Ridouane Oudra, Jun 24 2025
  • Mathematica
    di[x_] := Divisors[x] lds[x_] := Ceiling[DivisorSigma[0, x]/2] rd[x_] := Reverse[Divisors[x]] td[x_] := Table[Part[rd[x], w], {w, 1, lds[x]}] sud[x_] := Apply[Plus, td[x]] Table[DivisorSigma[1, w]-sud[w], {w, 1, 128}]
    Table[DivisorSum[n,#&,#Harvey P. Dale, Oct 26 2015 *)
  • PARI
    a(n)=if(n<1, 0, sumdiv(n,d, (d^2Michael Somos, Nov 19 2005 */

Formula

a(n) = sigma(n) - A070038(n).
a(n) = Sum_{n>=1} n*x^(n^2+n)/(1-x^n). - Vladeta Jovovic, Feb 09 2005
a(n) = Sum_{d|n, dWesley Ivan Hurt, Jun 17 2023
a(n) = A066839(n) - A037213(n). - Ridouane Oudra, Jun 24 2025

A020884 Ordered short legs of primitive Pythagorean triangles.

Original entry on oeis.org

3, 5, 7, 8, 9, 11, 12, 13, 15, 16, 17, 19, 20, 20, 21, 23, 24, 25, 27, 28, 28, 29, 31, 32, 33, 33, 35, 36, 36, 37, 39, 39, 40, 41, 43, 44, 44, 45, 47, 48, 48, 49, 51, 51, 52, 52, 53, 55, 56, 57, 57, 59, 60, 60, 60, 61, 63, 64, 65, 65, 67, 68, 68, 69, 69, 71, 72, 73, 75, 75, 76, 76, 77
Offset: 1

Views

Author

Keywords

Comments

Consider primitive Pythagorean triangles (A^2 + B^2 = C^2, (A, B) = 1, A <= B); sequence gives values of A, sorted.
Union of A081874 and A081925. - Lekraj Beedassy, Jul 28 2006
Each term in this sequence is given by f(m,n) = m^2 - n^2 or g(m,n) = 2mn where m and n are relatively prime positive integers with m > n, m and n not both odd. For example, a(1) = f(2,1) = 2^2 - 1^2 = 3 and a(4) = g(4,1) = 2*4*1 = 8. - Agola Kisira Odero, Apr 29 2016
All powers of 2 greater than 4 (2^2) are terms, and are generated by the function g(m,n) = 2mn. - Torlach Rush, Nov 08 2019

Crossrefs

Cf. A009004, A020882, A020883, A020885, A020886. Different from A024352.
Cf. A024359 (gives the number of times n occurs).
Cf. A037213.

Programs

  • Haskell
    a020884 n = a020884_list !! (n-1)
    a020884_list = f 1 1 where
       f u v | v > uu `div` 2        = f (u + 1) (u + 2)
             | gcd u v > 1 || w == 0 = f u (v + 2)
             | otherwise             = u : f u (v + 2)
             where uu = u ^ 2; w = a037213 (uu + v ^ 2)
    -- Reinhard Zumkeller, Nov 09 2012
  • Mathematica
    shortLegs = {}; amx = 99; Do[For[b = a + 1, b < (a^2/2), c = (a^2 + b^2)^(1/2); If[c == IntegerPart[c] && GCD[a, b, c] == 1, AppendTo[shortLegs, a]]; b = b + 2], {a, 3, amx}]; shortLegs (* Vladimir Joseph Stephan Orlovsky, Aug 07 2008 *)
    Take[Union[Sort/@({Times@@#,(Last[#]^2-First[#]^2)/2}&/@(Select[Subsets[Range[1,101,2],{2}],GCD@@#==1&]))][[;;,1]],80] (* Harvey P. Dale, Feb 06 2025 *)

Extensions

Extended and corrected by David W. Wilson

A064840 a(n) = tau(n)*sigma(n).

Original entry on oeis.org

1, 6, 8, 21, 12, 48, 16, 60, 39, 72, 24, 168, 28, 96, 96, 155, 36, 234, 40, 252, 128, 144, 48, 480, 93, 168, 160, 336, 60, 576, 64, 378, 192, 216, 192, 819, 76, 240, 224, 720, 84, 768, 88, 504, 468, 288, 96, 1240, 171, 558, 288, 588, 108, 960, 288, 960, 320, 360
Offset: 1

Views

Author

Vladeta Jovovic, Oct 25 2001

Keywords

Comments

Dirichlet convolution of A034761 with (the Dirichlet inverse of A037213). - R. J. Mathar, Feb 11 2011

Examples

			For n = 10, a(10) = sigma(10) * tau(10) = 18 * 4 = 72. - _Indranil Ghosh_, Jan 20 2017
		

Crossrefs

Programs

  • Magma
    [ NumberOfDivisors(n)*SumOfDivisors(n) : n in [1..40]];
    
  • Maple
    with(numtheory): seq(sigma(n)*tau(n), n=1..58) ; # Zerinvary Lajos, Jun 04 2008
  • Mathematica
    Table[ DivisorSigma[0, n] * DivisorSigma[1, n], {n, 1, 58}] (* Jean-François Alcover, Mar 26 2013 *)
  • PARI
    { for (n=1, 1000, a=numdiv(n)*sigma(n); write("b064840.txt", n, " ", a) ) } \\ Harry J. Smith, Sep 28 2009

Formula

Multiplicative with a(p^e) = (p^(e+1)-1)*(e+1)/(p-1). a(n) = (1/2)*Sum_{i|n, j|n} (i+j).
Dirichlet g.f. (zeta(s)*zeta(s-1))^2/zeta(2s-1). - R. J. Mathar, Feb 11 2011
Sum_{k=1..n} a(k) ~ Pi^4 * n^2 / (144*Zeta(3)) * (2*log(n) - 1 + 4*gamma - 4*Zeta'(3)/Zeta(3) + 24*Zeta'(2)/Pi^2), where gamma is the Euler-Mascheroni constant A001620. - Vaclav Kotesovec, Jan 31 2019

A069290 Sum of the square roots of the square divisors of n.

Original entry on oeis.org

1, 1, 1, 3, 1, 1, 1, 3, 4, 1, 1, 3, 1, 1, 1, 7, 1, 4, 1, 3, 1, 1, 1, 3, 6, 1, 4, 3, 1, 1, 1, 7, 1, 1, 1, 12, 1, 1, 1, 3, 1, 1, 1, 3, 4, 1, 1, 7, 8, 6, 1, 3, 1, 4, 1, 3, 1, 1, 1, 3, 1, 1, 4, 15, 1, 1, 1, 3, 1, 1, 1, 12, 1, 1, 6, 3, 1, 1, 1, 7, 13, 1, 1, 3, 1, 1, 1, 3, 1, 4, 1, 3, 1, 1, 1, 7, 1, 8, 4, 18, 1, 1
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 14 2002

Keywords

Comments

a(m)=1 iff m is squarefree (A005117).

Examples

			Square divisors for n=48: {1, 2^2, 4^2}, so a(48) = 1+2+4 = 7.
		

Crossrefs

Programs

  • Mathematica
    nn = 102;f[list_, i_] := list[[i]]; a =Table[If[IntegerQ[n^(1/2)], n^(1/2), 0], {n, 1, nn}]; b =Table[1, {n, 1, nn}]; Table[DirichletConvolve[f[a, n], f[b, n], n, m], {m, 1, nn}] (* Geoffrey Critzer, Feb 21 2015 *)
    f[p_, e_] := (p^(Floor[e/2] + 1) - 1)/(p-1); a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Sep 20 2020 *)
  • PARI
    vector(102, n, sumdiv(n, d, issquare(d)*sqrtint(d)))
    
  • PARI
    a(n)={my(s=0);fordiv(n,d,if(issquare(d),s+=sqrtint(d)));s;} \\ Joerg Arndt, Feb 22 2015
    
  • Python
    from math import prod
    from sympy import factorint
    def A069290(n): return prod((p**(q//2+1)-1)//(p-1) for p, q in factorint(n).items()) # Chai Wah Wu, Jun 14 2021

Formula

Multiplicative with a(p^e) = (p^(floor(e/2)+1)-1)/(p-1). - Vladeta Jovovic, Apr 23 2002
G.f.: Sum_{k>=1} k*x^k^2/(1-x^k^2). - Ralf Stephan, Apr 21 2003
Dirichlet g.f.: zeta(2s-1)*zeta(s). Inverse Mobius transform of A037213. - R. J. Mathar, Oct 31 2011
Sum_{k=1..n} a(k) ~ n/2 * (log(n) - 1 + 3*gamma), where gamma is the Euler-Mascheroni constant A001620. - Vaclav Kotesovec, Jan 31 2019
a(n) = Sum_{k=1..n} (1 - ceiling(n/k^2) + floor(n/k^2)) * k. - Wesley Ivan Hurt, Jan 28 2021
a(n) = A000203(A000188(n)). - Amiram Eldar, Sep 01 2023
a(n) = Sum_{d|n} d^(1/2)*(1-(-1)^tau(d))/2, [See Mathar comment]. - Wesley Ivan Hurt, Jul 09 2025

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Jul 01 2002

A094727 Triangle read by rows: T(n,k) = n + k, 0 <= k < n, n >= 1.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, May 24 2004

Keywords

Comments

All numbers m occur ceiling(m/2) times, see A004526.
The LCM of the n-th row is A076100. - Michel Marcus, Mar 18 2018

Examples

			Triangle begins:
  1;
  2,  3;
  3,  4,  5;
  4,  5,  6,  7;
  5,  6,  7,  8,  9;
  6,  7,  8,  9, 10, 11;
  7,  8,  9, 10, 11, 12, 13;
  8,  9, 10, 11, 12, 13, 14, 15;
  9, 10, 11, 12, 13, 14, 15, 16, 17;
  ... - _Philippe Deléham_, Mar 30 2013
		

Crossrefs

Programs

  • Haskell
    a094727 n k = n + k
    a094727_row n = a094727_tabl !! (n-1)
    a094727_tabl = iterate (\row@(h:_) -> (h + 1) : map (+ 2) row) [1]
    -- Reinhard Zumkeller, Jul 22 2012
    
  • Magma
    z:=12; &cat[ [m+n-1: m in [1..n] ]: n in [1..z] ];
    
  • Mathematica
    Table[n + Range[0, n-1], {n, 12}]//Flatten (* Michael De Vlieger, Dec 16 2016 *)
  • Python
    from math import isqrt
    def A094727(n): return ((a:=(m:=isqrt(k:=n<<1))+(k>m*(m+1)))*(3-a)>>1)+n-1 # Chai Wah Wu, Jun 19 2025
  • SageMath
    flatten([[n+k for k in range(n)] for n in range(1,16)]) # G. C. Greubel, Mar 10 2024
    

Formula

T(n+1, k) = T(n, k) + 1 = T(n, k+1); T(n+1, k+1) = T(n, k) + 2.
T(n, n - A005843(k)) = A005843(n-k) for 0 <= k <= n/2.
T(n, n - A005408(k)) = A005408(n-k) for 0 <= k < n/2.
T(A005408(n), n) = A016777(n), n >= 0.
Sum_{k=1..n} T(n, k) = A000326(n) (row sums).
T(n, k) = A002024(n,k) + A002260(n,k) - 1. - Reinhard Zumkeller, Apr 27 2006
As a sequence rather than as a table: If m = floor((sqrt(8n-7)+1)/2), a(n) = n - m*(m-3)/2 - 1. - Carl R. White, Jul 30 2009
T(n, k) = n+k-1, n >= k >= 1. - Vincenzo Librandi, Nov 23 2009 [corrected by Klaus Brockhaus, Nov 23 2009]
T(n,k) = A037213((A214604(n,k) + A214661(n,k)) / 2). - Reinhard Zumkeller, Jul 25 2012
From Boris Putievskiy, Jan 16 2013: (Start)
a(n) = A002260(n) + A003056(n).
a(n) = i+t, where i=n-t*(t+1)/2, t=floor((-1+sqrt(8*n-7))/2). (End)
From G. C. Greubel, Mar 10 2024: (Start)
T(3*n-3, n) = A016813(n-1).
T(4*n-4, n) = A016861(n-1).
Sum_{k=0..n-1} (-1)^k*T(n, k) = A319556(n).
Sum_{k=0..floor((n-1)/2)} T(n-k, k) = A093005(n).
Sum_{k=0..floor((n-1)/2)} (-1)^k*T(n-k, k) = A078112(n-1).
Sum_{j=1..n} (Sum_{k=0..n-1} T(j, k)) = A002411(n) (sum of n rows). (End)

A055029 Number of inequivalent Gaussian primes of norm n.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Jun 09 2000

Keywords

Comments

These are the primes in the ring of integers a+bi, a and b rational integers, i = sqrt(-1).
Two primes are considered equivalent if they differ by multiplication by a unit (+-1, +-i).

Examples

			There are 8 Gaussian primes of norm 5, +-1+-2i and +-2+-i, but only two inequivalent ones (2+-i).
		

References

  • R. K. Guy, Unsolved Problems in Number Theory, A16.
  • L. W. Reid, The Elements of the Theory of Algebraic Numbers, MacMillan, NY, 1910, see Chap. V.

Crossrefs

Programs

Formula

a(n) = A055028(n)/4.
a(n) = 2 if n is a prime = 1 (mod 4); a(n) = 1 if n is 2, or p^2 where p is a prime = 3 (mod 4); a(n) = 0 otherwise. - Franklin T. Adams-Watters, May 05 2006
a(n) = if n = 2 then 1 else 2*A079260(n) + A079261(A037213(n)). - Reinhard Zumkeller, Nov 11 2012

Extensions

More terms from Reiner Martin, Jul 20 2001

A007968 Type of happy factorization of n.

Original entry on oeis.org

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

Views

Author

Keywords

Crossrefs

Programs

  • Haskell
    a007968 = (\(hType,,,_,_) -> hType) . h
    h 0 = (0, 0, 0, 0, 0)
    h x = if a > 0 then (0, a, a, a, a) else h' 1 divs
          where a = a037213 x
                divs = a027750_row x
                h' r []                                = h' (r + 1) divs
                h' r (d:ds)
                 | d' > 1 && rest1 == 0 && ss == s ^ 2 = (1, d, d', r, s)
                 | rest2 == 0 && odd u && uu == u ^ 2  = (2, d, d', t, u)
                 | otherwise                           = h' r ds
                 where (ss, rest1) = divMod (d * r ^ 2 + 1) d'
                       (uu, rest2) = divMod (d * t ^ 2 + 2) d'
                       s = a000196 ss; u = a000196 uu; t = 2 * r - 1
                       d' = div x d
    hs = map h [0..]
    hCouples = map (\(, factor1, factor2, , _) -> (factor1, factor2)) hs
    sqrtPair n = genericIndex sqrtPairs (n - 1)
    sqrtPairs = map (\(, , _, sqrt1, sqrt2) -> (sqrt1, sqrt2)) hs
    -- Reinhard Zumkeller, Oct 11 2015

Formula

a(A000290(n)) = 0; a(A007969(n)) = 1; a(A007970(n)) = 2.
Showing 1-10 of 32 results. Next