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

A027750 Triangle read by rows in which row n lists the divisors of n.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Or, in the list of natural numbers (A000027), replace n with its divisors.
This gives the first elements of the ordered pairs (a,b) a >= 1, b >= 1 ordered by their product ab.
Also, row n lists the largest parts of the partitions of n whose parts are not distinct. - Omar E. Pol, Sep 17 2008
Concatenation of n-th row gives A037278(n). - Reinhard Zumkeller, Aug 07 2011
{A210208(n,k): k=1..A073093(n)} subset of {T(n,k): k=1..A000005(n)} for all n. - Reinhard Zumkeller, Mar 18 2012
Row sums give A000203. Right border gives A000027. - Omar E. Pol, Jul 29 2012
Indices of records are in A006218. - Irina Gerasimova, Feb 27 2013
The number of primes in the n-th row is omega(n) = A001221(n). - Michel Marcus, Oct 21 2015
The row polynomials P(n,x) = Sum_{k=1..A000005(n)} T(n,k)*x^k with composite n which are irreducible over the integers are given in A292226. - Wolfdieter Lang, Nov 09 2017
T(n,k) is also the number of parts in the k-th partition of n into equal parts (see example). - Omar E. Pol, Nov 20 2019
Let there be an infinite number of tiles, each labeled with a positive integer m, initially placed on square m of an infinite 1D board. At step n, the leftmost unblocked tile (i.e., the top tile of the leftmost nonempty stack) moves forward exactly m squares, where m is its label. Tiles that land on the same square form a stack, and only the top tile of any stack may move. This sequence records the label m of the tile that moves at step n. - Ali Sada, May 23 2025
All divisors of a positive integer n form a finite set. Extending divisibility to n = 0 by using the definition (k|n <=> exists m such that m*k = n) makes the set of divisors infinite, suggesting the definition was not intended for zero, as arithmetic functions typically apply to n >= 1. So to preserve a core property when generalizing (cardinality), one can define divisors of n >= 0 as the fixed points of the greatest common divisor on the set [n] = {0, 1, 2, ..., n}. By this definition, the divisors of 0 are {0}, since 0|0 and gcd(0, 0) = 0. This definition is not circular because the gcd can be effectively calculated using the Euclidean algorithm. (Cf. links.) - Peter Luschny, Jun 02 2025

Examples

			Triangle begins:
  1;
  1, 2;
  1, 3;
  1, 2, 4;
  1, 5;
  1, 2, 3, 6;
  1, 7;
  1, 2, 4, 8;
  1, 3, 9;
  1, 2, 5, 10;
  1, 11;
  1, 2, 3, 4, 6, 12;
  ...
For n = 6 the partitions of 6 into equal parts are [6], [3,3], [2,2,2], [1,1,1,1,1,1], so the number of parts are [1, 2, 3, 6] respectively, the same as the divisors of 6. - _Omar E. Pol_, Nov 20 2019
		

Crossrefs

Cf. A000005 (row length), A001221, A027749, A027751, A056534, A056538, A127093, A135010, A161700, A163280, A240698 (partial sums of rows), A240694 (partial products of rows), A247795 (parities), A292226, A244051.

Programs

  • Haskell
    a027750 n k = a027750_row n !! (k-1)
    a027750_row n = filter ((== 0) . (mod n)) [1..n]
    a027750_tabf = map a027750_row [1..]
    -- Reinhard Zumkeller, Jan 15 2011, Oct 21 2010
    
  • Magma
    [Divisors(n) : n in [1..20]];
    
  • Maple
    seq(op(numtheory:-divisors(a)), a = 1 .. 20) # Matt C. Anderson, May 15 2017
  • Mathematica
    Flatten[ Table[ Flatten [ Divisors[ n ] ], {n, 1, 30} ] ]
  • PARI
    v=List();for(n=1,20,fordiv(n,d,listput(v,d)));Vec(v) \\ Charles R Greathouse IV, Apr 28 2011
    
  • Python
    from sympy import divisors
    for n in range(1, 16):
        print(divisors(n)) # Indranil Ghosh, Mar 30 2017

Formula

a(A006218(n-1) + k) = k-divisor of n, 1 <= k <= A000005(n). - Reinhard Zumkeller, May 10 2006
T(n,k) = n / A056538(n,k) = A056538(n,n-k+1), 1 <= k <= A000005(n). - Reinhard Zumkeller, Sep 28 2014

Extensions

More terms from Scott Lindhurst (ScottL(AT)alumni.princeton.edu)

A001065 Sum of proper divisors (or aliquot parts) of n: sum of divisors of n that are less than n.

Original entry on oeis.org

0, 1, 1, 3, 1, 6, 1, 7, 4, 8, 1, 16, 1, 10, 9, 15, 1, 21, 1, 22, 11, 14, 1, 36, 6, 16, 13, 28, 1, 42, 1, 31, 15, 20, 13, 55, 1, 22, 17, 50, 1, 54, 1, 40, 33, 26, 1, 76, 8, 43, 21, 46, 1, 66, 17, 64, 23, 32, 1, 108, 1, 34, 41, 63, 19, 78, 1, 58, 27, 74, 1, 123, 1, 40, 49, 64, 19, 90, 1, 106
Offset: 1

Views

Author

Keywords

Comments

Also total number of parts in all partitions of n into equal parts that do not contain 1 as a part. - Omar E. Pol, Jan 16 2013
Related concepts: If a(n) < n, n is said to be deficient, if a(n) > n, n is abundant, and if a(n) = n, n is perfect. If there is a cycle of length 2, so that a(n) = b and a(b) = n, b and n are said to be amicable. If there is a longer cycle, the numbers in the cycle are said to be sociable. See examples. - Juhani Heino, Jul 17 2017
Sum of the smallest parts in the partitions of n into two parts such that the smallest part divides the largest. - Wesley Ivan Hurt, Dec 22 2017
a(n) is also the total number of parts congruent to 0 mod k in the partitions of k*n into equal parts that do not contain k as a part (the comment dated Jan 16 2013 is the case for k = 1). - Omar E. Pol, Nov 23 2019
Fixed points are in A000396. - Alois P. Heinz, Mar 10 2024

Examples

			x^2 + x^3 + 3*x^4 + x^5 + 6*x^6 + x^7 + 7*x^8 + 4*x^9 + 8*x^10 + x^11 + ...
For n = 44, sum of divisors of n = sigma(n) = 84; so a(44) = 84-44 = 40.
Related concepts: (Start)
From 1 to 17, all n are deficient, except 6 and 12 seen below. See A005100.
Abundant numbers: a(12) = 16, a(18) = 21. See A005101.
Perfect numbers: a(6) = 6, a(28) = 28. See A000396.
Amicable numbers: a(220) = 284, a(284) = 220. See A259180.
Sociable numbers: 12496 -> 14288 -> 15472 -> 14536 -> 14264 -> 12496. See A122726. (End)
For n = 10 the sum of the divisors of 10 that are less than 10 is 1 + 2 + 5 = 8. On the other hand, the partitions of 10 into equal parts that do not contain 1 as a part are [10], [5,5], [2,2,2,2,2], there are 8 parts, so a(10) = 8. - _Omar E. Pol_, Nov 24 2019
		

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.
  • George E. Andrews, Number Theory. New York: Dover, 1994; Pages 1, 75-92; p. 92 #15: Sigma(n) / d(n) >= n^(1/2).
  • Carl Pomerance, The first function and its iterates, pp. 125-138 in Connections in Discrete Mathematics, ed. S. Butler et al., Cambridge, 2018.
  • H. J. J. te Riele, Perfect numbers and aliquot sequences, pp. 77-94 in J. van de Lune, ed., Studieweek "Getaltheorie en Computers", published by Math. Centrum, Amsterdam, Sept. 1980.
  • 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, page 91.

Crossrefs

Least inverse: A070015, A359132.
Values taken: A078923, values not taken: A005114.
Records: A034090, A034091.
First differences: A053246, partial sums: A153485.
a(n) = n - A033879(n) = n + A033880(n). - Omar E. Pol, Dec 30 2013
Row sums of A141846 and of A176891. - Gary W. Adamson, May 02 2010
Row sums of A176079. - Mats Granvik, May 20 2012
Alternating row sums of A231347. - Omar E. Pol, Jan 02 2014
a(n) = sum (A027751(n,k): k = 1..A000005(n)-1). - Reinhard Zumkeller, Apr 05 2013
For n > 1: a(n) = A240698(n,A000005(n)-1). - Reinhard Zumkeller, Apr 10 2014
A134675(n) = A007434(n) + a(n). - Conjectured by John Mason and proved by Max Alekseyev, Jan 07 2015
Cf. A037020 (primes), A053868, A053869 (odd and even terms).
Cf. A048138 (number of occurrences), A238895, A238896 (record values thereof).
Cf. A007956 (products of proper divisors).
Cf. A005100, A005101, A000396, A259180, A122726 (related concepts).

Programs

  • Haskell
    a001065 n = a000203 n - n  -- Reinhard Zumkeller, Sep 15 2011
    
  • Magma
    [SumOfDivisors(n)-n: n in [1..100]]; // Vincenzo Librandi, May 06 2015
    
  • Maple
    A001065 := proc(n)
        numtheory[sigma](n)-n ;
    end proc:
    seq( A001065(n),n=1..100) ;
  • Mathematica
    Table[ Plus @@ Select[ Divisors[ n ], #Zak Seidov, Sep 10 2009 *)
    Table[DivisorSigma[1, n] - n, {n, 1, 80}] (* Jean-François Alcover, Apr 25 2013 *)
    Array[Plus @@ Most@ Divisors@# &, 80] (* Robert G. Wilson v, Dec 24 2017 *)
  • MuPAD
    numlib::sigma(n)-n$ n=1..81 // Zerinvary Lajos, May 13 2008
    
  • PARI
    {a(n) = if( n==0, 0, sigma(n) - n)} /* Michael Somos, Sep 20 2011 */
    
  • Python
    from sympy import divisor_sigma
    def A001065(n): return divisor_sigma(n)-n # Chai Wah Wu, Nov 04 2022
    
  • Sage
    [sigma(n, 1)-n for n in range(1, 81)] # Stefano Spezia, Jul 14 2025

Formula

G.f.: Sum_{k>0} k * x^(2*k)/(1 - x^k). - Michael Somos, Jul 05 2006
a(n) = sigma(n) - n = A000203(n) - n. - Lekraj Beedassy, Jun 02 2005
a(n) = A155085(-n). - Michael Somos, Sep 20 2011
Equals inverse Mobius transform of A051953 = A051731 * A051953. Example: a(6) = 6 = (1, 1, 1, 0, 0, 1) dot (0, 1, 1, 2, 1, 4) = (0 + 1 + 1 + 0 + 0 + 4), where A051953 = (0, 1, 1, 2, 1, 4, 1, 4, 3, 6, 1, 8, ...) and (1, 1, 1, 0, 0, 1) = row 6 of A051731 where the 1's positions indicate the factors of 6. - Gary W. Adamson, Jul 11 2008
a(n) = A006128(n) - A220477(n) - n. - Omar E. Pol Jan 17 2013
a(n) = Sum_{i=1..floor(n/2)} i*(1-ceiling(frac(n/i))). - Wesley Ivan Hurt, Oct 25 2013
Dirichlet g.f.: zeta(s-1)*(zeta(s) - 1). - Ilya Gutkovskiy, Aug 07 2016
a(n) = 1 + A048050(n), n > 1. - R. J. Mathar, Mar 13 2018
Erdős (Elem. Math. 28 (1973), 83-86) shows that the density of even integers in the range of a(n) is strictly less than 1/2. The argument of Coppersmith (1987) shows that the range of a(n) has density at most 47/48 < 1. - N. J. A. Sloane, Dec 21 2019
G.f.: Sum_{k >= 2} x^k/(1 - x^k)^2. Cf. A296955. (This follows from the fact that if g(z) = Sum_{n >= 1} a(n)*z^n and f(z) = Sum_{n >= 1} a(n)*z^(N*n)/(1 - z^n) then f(z) = Sum_{k >= N} g(z^k), taking a(n) = n and N = 2.) - Peter Bala, Jan 13 2021
Faster converging g.f.: Sum_{n >= 1} q^(n*(n+1))*(n*q^(3*n+2) - (n + 1)*q^(2*n+1) - (n - 1)*q^(n+1) + n)/((1 - q^n)*(1 - q^(n+1))^2). (In equation 1 in Arndt, after combining the two n = 0 summands to get -t/(1 - t), apply the operator t*d/dt to the resulting equation and then set t = q and x = 1.) - Peter Bala, Jan 22 2021
a(n) = Sum_{d|n} d * (1 - [n = d]), where [ ] is the Iverson bracket. - Wesley Ivan Hurt, Jan 28 2021
a(n) = Sum_{i=1..n} ((n-1) mod i) - (n mod i). [See also A176079.] - José de Jesús Camacho Medina, Feb 23 2021

A240694 Partial products of divisors of n, cf. A027750.

Original entry on oeis.org

1, 1, 2, 1, 3, 1, 2, 8, 1, 5, 1, 2, 6, 36, 1, 7, 1, 2, 8, 64, 1, 3, 27, 1, 2, 10, 100, 1, 11, 1, 2, 6, 24, 144, 1728, 1, 13, 1, 2, 14, 196, 1, 3, 15, 225, 1, 2, 8, 64, 1024, 1, 17, 1, 2, 6, 36, 324, 5832, 1, 19, 1, 2, 8, 40, 400, 8000, 1, 3, 21, 441, 1, 2
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 10 2014

Keywords

Comments

Triangle read by rows in which row n lists the partial products of divisors of n. - Omar E. Pol, Apr 12 2014

Examples

			.    n |  n-th row of A240694     |  n-th row of A027750
.  ----+--------------------------+---------------------
.    1 |  1                       |  1
.    2 |  1, 2                    |  1, 2
.    3 |  1, 3                    |  1, 3
.    4 |  1, 2, 8                 |  1, 2, 4
.    5 |  1, 5                    |  1, 5
.    6 |  1, 2, 6, 36             |  1, 2, 3, 6
.    7 |  1, 7                    |  1, 7
.    8 |  1, 2, 8, 64             |  1, 2, 4, 8
.    9 |  1, 3, 27                |  1, 3, 9
.   10 |  1, 2, 10, 100           |  1, 2, 5, 10
.   11 |  1, 11                   |  1, 11
.   12 |  1, 2, 6, 24, 144, 1728  |  1, 2, 3, 4, 6, 12
.   13 |  1, 13                   |  1, 13 .
		

Crossrefs

Cf. A000005 (row lengths), A007955, A020639, A027750, A240698.

Programs

  • Haskell
    a240694 n k = a240694_tabf !! (n-1) !! (k-1)
    a240694_row n = a240694_tabf !! (n-1)
    a240694_tabf = map (scanl1 (*)) a027750_tabf
    
  • Mathematica
    Table[FoldList[Times,Divisors[n]],{n,30}]//Flatten (* Harvey P. Dale, Jul 29 2021 *)
  • PARI
    row(n) = my(d=divisors(n)); vector(#d, k, prod(i=1, k, d[i])); \\ Michel Marcus, Jan 24 2022

Formula

T(n,1) = 1, T(n,k) = T(n,k-1) * A027750(n,k), 1 < k <= n.
T(n,1) = 1;
T(n,2) = A020639(n), n > 1;
T(n,A000005(n)) = A007955(n);
T(n,A000005(n)-1) = A007956(n), n > 1.

A289776 Least k such that the sum of the first n divisors of k is a prime number.

Original entry on oeis.org

2, 4, 30, 16, 84, 36, 60, 144, 144, 144, 144, 210, 324, 360, 630, 756, 756, 576, 660, 840, 840, 2040, 900, 900, 2304, 1980, 1980, 1980, 4320, 5184, 3300, 4620, 5460, 7056, 3960, 4680, 2520, 3600, 3600, 3600, 10080, 8100, 3600, 6300, 9900, 7920, 11088, 14400
Offset: 2

Views

Author

Michel Lagneau, Jul 12 2017

Keywords

Comments

The corresponding primes are 3, 7, 11, 31, 23, 37, 43, 61, 79, 103, 139, 191, 523, 167, 263, 347, 431, 787, 641, ...
The squares in the sequence are 4, 16, 36, 144, 324, 576, 900, 2304, 3600, 5184, 7056, 8100, 14400, ...

Examples

			a(4)=30 because the sum of the first 4 divisors of 30 is 1 + 2 + 3 + 5 = 11, which is prime, and there is no integer below 30 with this property.
		

Crossrefs

Programs

  • Maple
    with(numtheory):nn:=10^6:
    for n from 2 to 50 do:
    ii:=0:
       for k from 2 to nn while(ii=0) do:
         x:=divisors(k):n0:=nops(x):
           for l from 1 to n0 while(ii=0) do:
            p:=sum('x[i]', 'i'=1..l):
            if type(p,prime)=true and l=n
             then
             ii:=1:printf (`%d %d \n`,n,k):
             else fi:
            od:
          od:
      od:
  • Mathematica
    Table[k = 1; While[Nand[Length@ # >= n, PrimeQ@ Total@ Take[PadRight[#, n], n]] &@ Divisors@ k, k++]; k, {n, 2, 49}] (* Michael De Vlieger, Jul 12 2017 *)
  • PARI
    a(n) = k=1; while((d=divisors(k)) && ((#dMichel Marcus, Jul 12 2017
    
  • Python
    from sympy import divisors, isprime
    def A289776(n):
        i = 1
        while len(divisors(i)) < n or not isprime(sum(divisors(i)[:n])):
            i += 1
        return i # Chai Wah Wu, Aug 05 2017

A289712 Smallest integer such that the sum of its n smallest divisors is a square.

Original entry on oeis.org

1, 3, 15, 22, 12, 36, 24, 66, 126, 420, 90, 364, 270, 264, 240, 210, 672, 780, 864, 1050, 672, 720, 924, 1092, 1344, 3240, 3312, 1260, 3600, 1200, 8910, 1080, 27104, 5940, 1680, 8568, 8910, 14280, 6384, 5670, 5544, 9600, 43092, 42900, 5280, 3360, 9504, 8580, 21600, 54288
Offset: 1

Views

Author

Michel Lagneau, Sep 02 2017

Keywords

Comments

The first corresponding squares are 1, 4, 9, 36, 16, 25, 36, 144, 81, ...
The first squares in the sequence are 1, 36, 3600, ...

Examples

			a(4)=22 because the sum of the first 4 divisors of 22, i.e., 1 + 2 + 11 + 22 = 36, is a square, and 22 is the smallest integer with this property.
		

Crossrefs

Programs

  • Maple
    N:= 5*10^5: # to get terms before the first term > N
    for k from 1 to N do
      d:= sort(convert(numtheory:-divisors(k),list));
      s:= ListTools:-PartialSums(d);
      for m from 1 to nops(d) do
        if not assigned(A[m]) and issqr(s[m]) then A[m]:= k fi
      od
    od:
    iA:= map(op,{indices(A)}):
    seq(A[i],i=1..min({$1..max(iA)+1} minus iA)-1); # Robert Israel, Oct 01 2017
  • Mathematica
    Table[k=1;While[Nand[Length@#>=n,IntegerQ[Sqrt[Total@Take[PadRight[#,n],n]]]]&@Divisors@k,k++];k,{n,1,50}] (* Program from Michael De Vlieger adapted for this sequence. See A289776. *)
  • PARI
    isok(k, n) = {my(v = divisors(k)); if (#v < n, return(0)); issquare(sum(j=1, n, v[j]));}
    a(n) = {my(k = 1); while(!isok(k,n), k++); k;} \\ Michel Marcus, Sep 04 2017

A290126 Least k such that the sum of the n greatest divisors of k is a prime number.

Original entry on oeis.org

2, 2, 4, 28, 16, 140, 24, 90, 120, 108, 60, 144, 300, 288, 120, 672, 252, 432, 240, 630, 960, 756, 480, 1200, 1080, 1728, 1680, 1008, 720, 2016, 840, 3150, 2160, 2700, 1980, 4800, 2520, 3780, 3240, 8736, 3960, 3600, 6720, 6930, 10800, 6300, 4200, 16848, 9240, 5040
Offset: 1

Views

Author

Michel Lagneau, Jul 20 2017

Keywords

Comments

The corresponding primes are 2, 3, 7, 53, 31, 307, 59, 223, 331, 277, 167, 397, 853, 809, 359, 1973, 727, 1237, ...
The squares of the sequence are 4, 16, 144, 3600, ...

Examples

			a(4)=28 because the sum of the last 4 divisors of 28: 28+14+7+4 = 53 is a prime number.
		

Crossrefs

Programs

  • Maple
    M:= 20000: # to get all terms before the first term > M
    R:= 'R':
    for k from 2 to M do
       F:= ListTools:-PartialSums(sort(convert(
          numtheory:-divisors(k),list),`>`));
       for n in select(t -> isprime(F[t]),[$1..nops(F)]) do
        if not assigned(R[n]) then R[n]:= k fi
       od
    od:
    inds:= map(op,{indices(R)}):
    N:= min({$1..max(inds)+1} minus inds):
    seq(R[i],i=1..N-1);  # Robert Israel, Jul 24 2017
  • Mathematica
    Table[k=1;While[Nand[Length@#>=n,PrimeQ[Total@Take[PadLeft[#,n],n]]]&@Divisors@k,k++];k,{n,1,20}](* Program from Michael De Vlieger adapted for this sequence. See A289776 *)
  • PARI
    a(n) = {my(i = 2, d);  while(1, d = divisors(i); if(#d >= n, if(isprime(sum(j=#d-n+1,#d,d[j])), return(i), i++), i++)); i} \\ David A. Corneth, Jul 20 2017
    
  • Python
    from sympy import divisors, isprime
    def A290126(n):
        i = 1
        while len(divisors(i)) < n or not isprime(sum(divisors(i)[-n:])):
            i += 1
        return i # Chai Wah Wu, Aug 05 2017

A375574 Let d(1)

Original entry on oeis.org

1, 6, 6, 28, 28, 24, 126, 234, 224, 360, 504, 980, 990, 1260, 1764, 1680, 840, 1080, 4140, 960, 5760, 4620, 9180, 11088, 8960, 6120, 11880, 25740, 7140, 2520, 2016, 25344, 9720, 48672, 11760, 10920, 15120, 14112, 61740, 55200, 74340, 91800, 8190, 78624, 70200
Offset: 1

Views

Author

Michel Lagneau, Aug 19 2024

Keywords

Comments

The index i of s among the divisors of k is i = A375593(n), i.e. s = d(A375593(n)).

Examples

			*----*------*---------*---------------------------------*
| n  | a(n) |  i |  i-th   |  sum of n first divisors   |
|    |      |    | divisor |         of a(n)            |
*----*------*---------*---------------------------------*
| 2  |   6  |  3 |    3    | 1+2 = 3                    |
*----*------*----*---------*----------------------------*
| 3  |   6  |  4 |    6    | 1+2+3 = 6                  |
*----*------*----*---------*----------------------------*
| 4  |  28  |  5 |   14    | 1+2+4+7 = 14               |
*----*------*----*---------*----------------------------*
| 5  |  28  |  6 |   28    | 1+2+4+7+14 = 28            |
*----*------*----*---------*----------------------------*
| 6  |  24  |  8 |   24    | 1+2+3+4+6+8 = 24           |
*----*------*----*---------*----------------------------*
| 7  | 126  | 10 |   42    | 1+2+3+6+7+9+14 = 42        |
*----*------*----*---------*----------------------------*
| 8  | 234  | 10 |   78    | 1+2+3+6+9+13+18+26 = 78    |
*----*------*----*---------*----------------------------*
| 9  | 224  | 11 |  112    | 1+2+4+7+8+14+16+28+32 = 112|
|----*------*----*---------*----------------------------*
		

Crossrefs

Programs

  • Maple
    with(numtheory):nn:=10^6:T:=array(1..44):i:=0:
    for n from 2 to 45 do:
     ii:=1:
      for a from 6 to nn while ii=1
    do:
        d:=divisors(a):n0:=nops(d):
         if n0>=n
          then
           s:=sum('d[j]', 'j'=1..n):
           for m from 1 to n0 do:
            if s=d[m]
             then
              ii:=0:printf(`%d %d\n`,n,a):i:=i+1:T[i]:=a:
               else
              fi :
            od :fi:
      od:od:print(T):
  • PARI
    \\ See Corneth link
    
  • Python
    from sympy import divisors
    from itertools import count, islice
    def agen(): # generator of terms
        adict, n = dict(), 1
        for k in count(1):
            d = divisors(k)
            if len(d) < n-1: continue
            dset, s = set(d), 0
            for i, di in enumerate(d, 1):
                s += di
                if i >= n and i not in adict and s in dset: adict[i] = k
            while n in adict: yield adict[n]; n += 1
    print(list(islice(agen(), 50))) # Michael S. Branicky, Aug 20 2024

Extensions

a(1) = 1 prepended by David A. Corneth, Aug 20 2024

A289872 a(n) is the number of partial sums of the divisors of n that are the sum of divisors of some integer.

Original entry on oeis.org

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

Views

Author

Michel Marcus, Jul 14 2017

Keywords

Examples

			For n=2, the divisors are 1, 2; the partial sums are 1, 3; 1=sigma(1) and 3=sigma(2); so a(2)=2.
For n=10, the divisors are 1, 2, 5, 10; the partial sums are 1, 3, 8, 18; 1=sigma(1), 3=sigma(2), 8=sigma(7) and 18=sigma(10); so a(10)=4.
		

Crossrefs

Programs

  • Maple
    M:= 1000: # get a(n) for n=1..m where m is the first number with sigma(m+1) > M
    S:= Vector(M):
    for n from 1 to M-1 do
      v:= numtheory:-sigma(n);
      if v > M then if not assigned(nmax) then nmax:= n-1 fi
      elif S[v] = 0 then S[v]:= 1
      fi;
    od:
    seq(add(S[i],i=ListTools:-PartialSums(sort(convert(numtheory:-divisors(n),list)))), n = 1..nmax); # Robert Israel, Jul 14 2017
  • Mathematica
    s = Union@ DivisorSigma[1, Range[10^6]]; Array[Count[Accumulate@ Divisors@ #, k_ /; MemberQ[s, k]] &, 90] (* Michael De Vlieger, Jul 14 2017 *)
  • PARI
    issigma(n) = {for (k=1, n, if (sigma(k) == n, return (1));); 0;}
    a(n) = {d = divisors(n); v = vector(#d, k, sum(j=1, k, d[j])); sum(k=1, #v, issigma(v[k]));}

Formula

For n>=1 and p prime, a(p^n) = n+1.

A295265 Numbers m such that sum of its i first divisors equals the sum of its j first non-divisors for some i, j.

Original entry on oeis.org

4, 8, 10, 13, 14, 16, 19, 20, 21, 22, 26, 28, 30, 32, 34, 38, 39, 40, 43, 44, 46, 50, 52, 53, 56, 58, 60, 62, 63, 64, 68, 70, 72, 74, 76, 80, 82, 86, 88, 89, 90, 92, 94, 98, 99, 100, 103, 104, 106, 110, 111, 112, 116, 117, 118, 122, 124, 128, 130, 132, 134, 135
Offset: 1

Views

Author

Michel Lagneau, Feb 22 2018

Keywords

Comments

Or numbers m such that Sum_{k=1..i} d(k) = Sum_{k=1..j} nd(k) for some i, j where d(k) are the i first divisors and nd(k) the j non-divisors of m.
The corresponding sums are 3, 3, 3, 14, 3, 3, 20, 3, 11, 3, 3, (3 or 14), 11, 3, 3, 3, 17, 3, 44, 3, 3, 3, 3, 54, 3, 3, 15, 3, 11, 3, 3, 3, 33, 3, 3, 3, ... containing the set of primes {3, 11, 17, 23, 29, 37, 41, 43, 53, 59, 61, 71, 79, ...}.
The equality Sum_{k=1..i} d(k) = Sum_{k=1..j} nd(k) is not always unique, for instance for a(12) = 28, we find 1 + 2 = 3 and 1 + 2 + 4 + 7 = 3 + 5 + 6 = 14.
The primes of the sequence are 13, 19, 43, 53, 89, 103, 151, 229, 251, 349, 433, ... (primes of the form k(k+1)/2 - 2; see A124199).
+-----+-----+-----+------+-----------------------------------------+
| n | i | j | a(n) | Sum_{k=1..i} d(k) = Sum_{k=1..j} nd(k) |
+-----+-----+-----+------+-----------------------------------------+
| 1 | 2 | 1 | 4 | 1 + 2 = 3 |
| 2 | 2 | 1 | 8 | 1 + 2 = 3 |
| 3 | 2 | 1 | 10 | 1 + 2 = 3 |
| 4 | 2 | 4 | 13 | 1 + 13 = 2 + 3 + 4 + 5 = 14 |
| 5 | 2 | 1 | 14 | 1 + 2 = 3 |
| 6 | 2 | 1 | 16 | 1 + 2 = 3 |
| 7 | 2 | 5 | 19 | 1 + 19 = 2 + 3 + 4 + 5 + 6 = 20 |
| 8 | 2 | 1 | 20 | 1 + 2 = 3 |
| 9 | 3 | 3 | 21 | 1 + 3 + 7 = 2 + 4 + 5 = 11 |
| 10 | 2 | 1 | 22 | 1 + 2 = 3 |
| 11 | 2 | 1 | 26 | 1 + 2 = 3 |
| 12 | 2 | 1 | 28 | 1 + 2 = 3 |
| | 4 | 3 | 28 | 1 + 2 + 4 + 7 = 3 + 5 + 6 = 14 |
| 13 | 4 | 2 | 30 | 1 + 2 + 3 + 5 = 4 + 7 = 11 |
| 14 | 2 | 1 | 32 | 1 + 2 = 3 |

Examples

			30 is in the sequence because d(1) + d(2) + d(3) + d(4) = 1 + 2 + 3 + 5 = 11 and nd(1) + nd(2) = 4 + 7 = 11.
		

Crossrefs

Programs

  • Maple
    with(numtheory):nn:=300:
    for n from 1 to nn do:
    d:=divisors(n):n0:=nops(d):lst:={}:ii:=0:
      for i from 1 to n do:
       lst:=lst union {i}:
      od:
        lst:=lst minus d:n1:=nops(lst):
         for m from 1 to n0 while(ii=0) do:
          s1:=sum(‘d[i]’, ‘i’=1..m):
           for j from 1 to n1 while(ii=0) do:
            s2:=sum(‘lst[i]’, ‘i’=1..j):
             if s1=s2
              then
              ii:=1:printf(`%d, `,n):
             else
             fi:
            od:
         od:
      od:
  • Mathematica
    fQ[n_] := Block[{d = Divisors@ n}, nd = nd = Complement[Range@ n, d]; Intersection[Accumulate@ d, Accumulate@ nd] != {}]; Select[ Range@135, fQ] (* Robert G. Wilson v, Mar 06 2018 *)
  • PARI
    isok(n) = {d = divisors(n); psd = vector(#d, k, sum(j=1, k, d[j])); nd = setminus([1..n], d); psnd = vector(#nd, k, sum(j=1, k, nd[j])); #setintersect(psd, psnd) != 0;} \\ Michel Marcus, May 05 2018
Showing 1-10 of 11 results. Next