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

A024916 a(n) = Sum_{k=1..n} k*floor(n/k); also Sum_{k=1..n} sigma(k) where sigma(n) = sum of divisors of n (A000203).

Original entry on oeis.org

1, 4, 8, 15, 21, 33, 41, 56, 69, 87, 99, 127, 141, 165, 189, 220, 238, 277, 297, 339, 371, 407, 431, 491, 522, 564, 604, 660, 690, 762, 794, 857, 905, 959, 1007, 1098, 1136, 1196, 1252, 1342, 1384, 1480, 1524, 1608, 1686, 1758, 1806, 1930, 1987, 2080, 2152
Offset: 1

Views

Author

Keywords

Comments

Row sums of triangle A128489. E.g., a(5) = 15 = (10 + 3 + 1 + 1), sum of row 4 terms of triangle A128489. - Gary W. Adamson, Jun 03 2007
Row sums of triangle A134867. - Gary W. Adamson, Nov 14 2007
a(10^4) = 82256014, a(10^5) = 8224740835, a(10^6) = 822468118437, a(10^7) = 82246711794796; see A072692. - M. F. Hasler, Nov 22 2007
Equals row sums of triangle A158905. - Gary W. Adamson, Mar 29 2009
n is prime if and only if a(n) - a(n-1) - 1 = n. - Omar E. Pol, Dec 31 2012
Also the alternating row sums of A236104. - Omar E. Pol, Jul 21 2014
a(n) is also the total number of parts in all partitions of the positive integers <= n into equal parts. - Omar E. Pol, Apr 30 2017
a(n) is also the total area of the terraces of the stepped pyramid with n levels described in A245092. - Omar E. Pol, Nov 04 2017
a(n) is also the area under the Dyck path described in the n-th row of A237593 (see example). - Omar E. Pol, Sep 17 2018
From Omar E. Pol, Feb 17 2020: (Start)
Convolution of A340793 and A000027.
Convolved with A340793 gives A000385. (End)
a(n) is also the number of cubic cells (or cubes) in the n-th level starting from the top of the stepped pyramid described in A245092. - Omar E. Pol, Jan 12 2022

Examples

			From _Omar E. Pol_, Aug 20 2021: (Start)
For n = 6 the sum of all divisors of the first six positive integers is [1] + [1 + 2] + [1 + 3] + [1 + 2 + 4] + [1 + 5] + [1 + 2 + 3 + 6] = 1 + 3 + 4 + 7 + 6 + 12 = 33, so a(6) = 33.
On the other hand the area under the Dyck path of the 6th diagram as shown below is equal to 33, so a(6) = 33.
Illustration of initial terms:                        _ _ _ _
                                        _ _ _        |       |_
                            _ _ _      |     |       |         |_
                  _ _      |     |_    |     |_ _    |           |
          _ _    |   |_    |       |   |         |   |           |
    _    |   |   |     |   |       |   |         |   |           |
   |_|   |_ _|   |_ _ _|   |_ _ _ _|   |_ _ _ _ _|   |_ _ _ _ _ _|
.
    1      4        8          15           21             33         (End)
		

References

  • Hardy and Wright, "An introduction to the theory of numbers", Oxford University Press, fifth edition, p. 266.

Crossrefs

Programs

  • Haskell
    a024916 n = sum $ map (\k -> k * div n k) [1..n]
    -- Reinhard Zumkeller, Apr 20 2015
    
  • Magma
    [(&+[DivisorSigma(1, k): k in [1..n]]): n in [1..60]]; // G. C. Greubel, Mar 15 2019
    
  • Maple
    A024916 := proc(n)
        add(numtheory[sigma](k),k=0..n) ;
    end proc: # Zerinvary Lajos, Jan 11 2009
    # second Maple program:
    a:= proc(n) option remember; `if`(n=0, 0,
          numtheory[sigma](n)+a(n-1))
        end:
    seq(a(n), n=1..100);  # Alois P. Heinz, Sep 12 2019
  • Mathematica
    Table[Plus @@ Flatten[Divisors[Range[n]]], {n, 50}] (* Alonso del Arte, Mar 06 2006 *)
    Table[Sum[n - Mod[n, m], {m, n}], {n, 50}] (* Roger L. Bagula and Gary W. Adamson, Oct 06 2006 *)
    a[n_] := Sum[DivisorSigma[1, k], {k, n}]; Table[a[n], {n, 51}] (* Jean-François Alcover, Dec 16 2011 *)
    Accumulate[DivisorSigma[1,Range[60]]] (* Harvey P. Dale, Mar 13 2014 *)
  • PARI
    A024916(n)=sum(k=1,n,n\k*k) \\ M. F. Hasler, Nov 22 2007
    
  • PARI
    A024916(z) = { my(s,u,d,n,a,p); s = z*z; u = sqrtint(z); p = 2; for(d=1, u, n = z\d - z\(d+1); if(n<=1, p=d; break(), a = z%d; s -= (2*a+(n-1)*d)*n/2); ); u = z\p; for(d=2, u, s -= z%d); return(s); } \\ See the link for a nicely formatted version. - P. L. Patodia (pannalal(AT)usa.net), Jan 11 2008
    
  • PARI
    A024916(n)={my(s=0,d=1,q=n);while(dPeter Polm, Aug 18 2014
    
  • PARI
    A024916(n)={ my(s=n^2, r=sqrtint(n), nd=n, D); for(d=1, r, (1>=D=nd-nd=n\(d+1)) && (r=d-1) && break; s -= n%d*D+(D-1)*D\2*d); s - sum(d=2, n\(r+1), n%d)} \\ Slightly optimized version of Patodia's code. - M. F. Hasler, Apr 18 2015
    (C#) See Polm link.
    
  • Python
    def A024916(n): return sum(k*(n//k) for k in range(1,n+1)) # Chai Wah Wu, Dec 17 2021
    
  • Python
    from math import isqrt
    def A024916(n): return (-(s:=isqrt(n))**2*(s+1) + sum((q:=n//k)*((k<<1)+q+1) for k in range(1,s+1)))>>1 # Chai Wah Wu, Oct 21 2023
  • Sage
    [sum(sigma(k) for k in (1..n)) for n in (1..60)] # G. C. Greubel, Mar 15 2019
    

Formula

From Benoit Cloitre, Apr 28 2002: (Start)
a(n) = n^2 - A004125(n).
Asymptotically a(n) = n^2*Pi^2/12 + O(n*log(n)). (End)
G.f.: (1/(1-x))*Sum_{k>=1} x^k/(1-x^k)^2. - Benoit Cloitre, Apr 23 2003
a(n) = Sum_{m=1..n} (n - (n mod m)). - Roger L. Bagula and Gary W. Adamson, Oct 06 2006
a(n) = n^2*Pi^2/12 + O(n*log(n)^(2/3)) [Walfisz]. - Charles R Greathouse IV, Jun 19 2012
a(n) = A000217(n) + A153485(n). - Omar E. Pol, Jan 28 2014
a(n) = A000292(n) - A076664(n), n > 0. - Omar E. Pol, Feb 11 2014
a(n) = A078471(n) + A271342(n). - Omar E. Pol, Apr 08 2016
a(n) = (1/2)*(A222548(n) + A006218(n)). - Ridouane Oudra, Aug 03 2019
From Greg Dresden, Feb 23 2020: (Start)
a(n) = A092406(n) + 8, n>3.
a(n) = A160664(n) - 1, n>0. (End)
a(2*n) = A326123(n) + A326124(n). - Vaclav Kotesovec, Aug 18 2021
a(n) = Sum_{k=1..n} k * A010766(n,k). - Georg Fischer, Mar 04 2022

A064611 Partial sum of usigma is divisible by n, where usigma(n) = A034448(n) and summatory-usigma(n) = A064609(n).

Original entry on oeis.org

1, 2, 8, 11, 12, 174, 212, 524, 1567, 14096, 19795, 38466, 42114, 55575, 338809, 498001, 1175281, 2424880, 3994532, 7908519, 48453784, 696840720, 5497869355, 7479239685
Offset: 1

Views

Author

Labos Elemer, Sep 24 2001

Keywords

Comments

Analogous sequences for various arithmetical functions are A050226, A056550, A064605-A064607, A064610, A064612, A048290, A062982, A045345.

Examples

			udivisor sums[=usigma(j) values] from 1 to 8 are added: 1+3+4+5+6+12+8+9=48; it is divisible by 8, thus 8 is here.
		

Crossrefs

Programs

  • Mathematica
    s = Table[DivisorSum[n, # &, CoprimeQ[#, n/#] &], {n, 10^6}]; Module[{a = First@ s, b = {First@ s}}, Do[a += s[[i]]; If[Divisible[a, i], AppendTo[b, i]], {i, 2, Length@ s}]; b] (* Michael De Vlieger, Mar 18 2017 *)

Formula

A064609(n) mod n = 0.

Extensions

a(17)-a(22) from Donovan Johnson, Jul 20 2012
a(23)-a(24) from Amiram Eldar, Mar 17 2019

A168133 Numbers m = Sum_{k=1..n} sigma(k) such that Sum_{k=1..n} sigma(k) is divisible by k.

Original entry on oeis.org

1, 4, 56, 99, 238, 3276, 26820, 55167, 550514, 3842258, 16222973, 56731455, 118396264, 396379039896, 9772829297132, 15876697439182, 2710103706735457, 4438313663247000, 12136546505785858, 3518811208764622050
Offset: 1

Views

Author

Jaroslav Krizek, Nov 18 2009, Dec 04 2009

Keywords

Comments

Numbers m = A024916(k) such that A024916(k) / k is an integer. If a(14) exists it must be bigger than 8*10^9.
Corresponding values of k, and sum_(k=1...n) sigma(k)/k are given in A056550 and A168132. - Jaroslav Krizek, Nov 21 2009

Examples

			Number a(3) = 56 = A024916(8) is in sequence because A024916(8) / 8 = 56 / 8 = 7 is an integer for k = 8.
		

Crossrefs

A307043 Numbers n such that A307042(n) = Sum_{k=1..n} esigma(k) is divisible by n, where esigma(k) is sum of exponential divisors of k (A051377).

Original entry on oeis.org

1, 3, 4, 8, 13, 78, 94, 481, 511, 4819, 13557, 23083, 84245, 204744, 562243, 591105, 614339, 617675, 656263, 1545716, 6370802, 34882737, 534034248, 601990019, 1153304776, 2064184733, 3570196547, 10572032882
Offset: 1

Views

Author

Amiram Eldar, Mar 21 2019

Keywords

Comments

The exponential version of A056550.
The corresponding quotients are 1, 2, 3, 5, 8, 45, ... (see the link for more values).

Examples

			3 is in the sequence since esigma(1) + esigma(2) + esigma(3) = 1 + 2 + 3 = 6 is divisible by 3.
		

Crossrefs

Programs

  • Mathematica
    esigma[n_] := Times @@ (Sum[ First[#]^d, {d, Divisors[Last[#]]}] & ) /@ FactorInteger[n]; seq={};s = 0; Do[s = s + esigma [n]; If[Divisible[s,n], AppendTo[seq,n]], {n, 1, 10^6}]; seq (* after Jean-François Alcover at A051377 *)

A307161 Numbers n such that A307159(n) = Sum_{k=1..n} bsigma(k) is divisible by n, where bsigma(k) is the sum of bi-unitary divisors of k (A188999).

Original entry on oeis.org

1, 2, 17, 37, 50, 56, 391, 919, 1399, 2829, 6249, 13664, 28829, 62272, 67195, 585391, 5504271, 6798541, 10763933, 866660818, 3830393407, 11044287758, 23058607363, 83159875881, 206501883259, 297734985607, 1087473543732, 1184060078117, 2789730557061, 2821551579466, 3529184155643
Offset: 1

Views

Author

Amiram Eldar, Mar 27 2019

Keywords

Comments

The bi-unitary version of A056550.
The corresponding quotients are 1, 2, 13, 28, 38, 43, ... (see the link for more values).
a(32) > 10^13. - Giovanni Resta, May 28 2019

Crossrefs

Programs

  • Mathematica
    fun[p_,e_] := If[OddQ[e],(p^(e+1)-1)/(p-1),(p^(e+1)-1)/(p-1)-p^(e/2)]; bsigma[1] = 1; bsigma[n_] := Times @@ (fun @@@ FactorInteger[n]); seq={};s = 0; Do[s = s + bsigma[n]; If[Divisible[s,n], AppendTo[seq,n]], {n, 1, 10^6}]; seq

Extensions

a(23)-a(31) from Giovanni Resta, Apr 20 2019

A379922 Numbers m that divide the alternating sum Sum_{k=1..m} (-1)^(k+1) * sigma_2(k).

Original entry on oeis.org

1, 2, 3, 42, 329, 633, 1039, 5689, 26621, 39245, 1101875, 1216075, 40088584, 67244920, 104332211, 549673265, 777631064, 19879301756
Offset: 1

Views

Author

Amiram Eldar, Jan 06 2025

Keywords

Comments

Numbers m such that m | A379921(m).
The corresponding quotients, A379921(m)/m, are -1, 2, -2, 120, 5228, ... (see the link for more values).
a(19) > 5*10^10, if it exists.

Crossrefs

Cf. A001157 (sigma_2), A379921.

Programs

  • Mathematica
    With[{m = 40000}, Position[Accumulate[Table[(-1)^n * DivisorSigma[2, n], {n, 1, m}]]/Range[m], _?IntegerQ] // Flatten]
  • PARI
    list(lim) = my(s = 0); for(k = 1, lim, s += (-1)^k * sigma(k, 2); if(!(s % k), print1(k, ", ")));

A379923 Numbers m that divide the alternating sum Sum_{k=1..m} (-1)^k * A000005(k).

Original entry on oeis.org

1, 5, 18, 22, 25, 29, 197, 1350, 1360, 1362, 1368, 1381, 1391, 1395, 10200, 75486, 75490, 557768, 557843, 557853, 557898, 4121846, 4122064, 4122112, 4122222, 30457732, 30457773, 30457835, 30458040, 30458133, 30458138, 30458140, 30458335, 225056911, 225056919, 225056925, 225056989
Offset: 1

Views

Author

Amiram Eldar, Jan 06 2025

Keywords

Comments

Numbers m such that m | A307704(m).
The corresponding quotients, A307704(m)/m, are -1, 0, 1, 1, 1, 1, 2, 3, 3, 3, ... (see the link for more values).
a(38) > 2*10^10, if it exists.

Crossrefs

Programs

  • Mathematica
    With[{m = 10000}, Position[Accumulate[Table[(-1)^n * DivisorSigma[0, n], {n, 1, m}]]/Range[m], _?IntegerQ] // Flatten]
  • PARI
    list(lim) = my(s = 0); for(k = 1, lim, s += (-1)^k * numdiv(k); if(!(s % k), print1(k, ", ")));

A379924 Numbers m that divide the alternating sum Sum_{k=1..m} (-1)^(k+1) * usigma(k).

Original entry on oeis.org

1, 2, 9, 54, 101, 178, 189, 2071, 3070, 9171, 11450, 12794, 21405, 27553, 35285, 251974, 2069863, 2395894, 155931488, 387586437, 758519827, 1202435693, 9859113494, 42703260442
Offset: 1

Views

Author

Amiram Eldar, Jan 06 2025

Keywords

Comments

Numbers m such that m | A370898(m).
The corresponding quotients, A370898(m)/m, are -1, 1, 0, 6, 9, ... (see the link for more values).
a(25) > 5*10^10, if it exists.

Crossrefs

Cf. A034448 (usigma), A370898.

Programs

  • Mathematica
    usigma[n_] := Times @@ (1 + Power @@@ FactorInteger[n]); usigma[1] = 1; With[{m = 260000}, Position[Accumulate[Table[(-1)^n * usigma[n], {n, 1, m}]]/Range[m], _?IntegerQ] // Flatten]
  • PARI
    usigma(n) = {my(f = factor(n)); prod(i = 1, #f~, 1 + f[i, 1]^f[i, 2]); }
    list(lim) = my(s = 0); for(k = 1, lim, s += (-1)^k * usigma(k); if(!(s % k), print1(k, ", ")));

A168132 Numbers m = Sum_{k=1..n} sigma(k)/k such that Sum_{k=1..n} sigma(k)/k is an integer for any k.

Original entry on oeis.org

1, 2, 7, 9, 14, 52, 149, 213, 673, 1778, 3653, 6831, 9868, 570972, 2835107, 3613594, 47211979, 60418265, 99909506, 1701207282, 4587170542, 10955668024, 29031152874, 114018751785, 813149731047
Offset: 1

Views

Author

Jaroslav Krizek, Nov 18 2009, Dec 04 2009

Keywords

Comments

Numbers m = A024916(k)/k such that A024916(k)/k is an integer for any k. If a(14) exist must be bigger than 82000.
Corresponding values of k, and Sum_{k=1..n} sigma(k) are given in A056550 and A168133. [Jaroslav Krizek, Nov 21 2009]

Examples

			Number a(3) = 7 is in sequence because A024916(8)/8 = 56/8 = 7 is an integer for k = 8.
		

Extensions

a(14)-a(25) from Donovan Johnson, Jun 16 2011

A294885 a(n) = A004125(n) mod n = [Sum_{i=1..n} (n mod i)] mod n.

Original entry on oeis.org

0, 0, 1, 1, 4, 3, 1, 0, 3, 3, 0, 5, 2, 3, 6, 4, 0, 11, 7, 1, 7, 11, 6, 13, 3, 8, 17, 12, 6, 18, 12, 7, 19, 27, 8, 18, 11, 20, 35, 18, 10, 32, 24, 20, 24, 36, 27, 38, 22, 20, 41, 38, 28, 6, 34, 16, 40, 56, 45, 46, 35, 52, 0, 53, 23, 65, 53, 51, 12, 65, 52, 60, 47, 68, 6, 4, 48, 22, 7, 46, 73, 15, 82, 11, 58, 83, 35, 15, 87, 17, 71, 71
Offset: 1

Views

Author

Antti Karttunen, Nov 13 2017

Keywords

Crossrefs

Cf. A004125.
Cf. A056550 (positions of zeros).

Programs

  • Mathematica
    Table[Mod[Sum[Mod[n,i],{i,n}],n],{n,100}] (* Harvey P. Dale, Jul 10 2024 *)
  • PARI
    A294885(n) = (sum(k=2, n, n%k)%n);

Formula

a(n) = [Sum_{i=1..n} (n mod i)] mod n.
Showing 1-10 of 18 results. Next