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-8 of 8 results.

A222548 a(n) = Sum_{k=1..n} floor(n/k)^2.

Original entry on oeis.org

1, 5, 11, 22, 32, 52, 66, 92, 115, 147, 169, 219, 245, 289, 333, 390, 424, 496, 534, 612, 672, 740, 786, 898, 957, 1037, 1113, 1219, 1277, 1413, 1475, 1595, 1687, 1791, 1883, 2056, 2130, 2246, 2354, 2526, 2608, 2792, 2878, 3040, 3190, 3330, 3424, 3662, 3773
Offset: 1

Views

Author

Benoit Cloitre, Feb 24 2013

Keywords

Comments

a(n) is the number of common divisors of integers 1<=i,j<=n over all ordered pairs (i,j). - Geoffrey Critzer, Jan 15 2015

References

  • J. V. Uspensky and M. A. Heaslet, Elementary Number Theory, McGraw-Hill, NY, 1939, p. 98.

Crossrefs

Similar sequences for Sum_{k=1..n} floor(n/k)^m: A006218 (m=1), this sequence (m=2), A318742 (m=3), A318743 (m=4), A318744 (m=5).

Programs

  • Magma
    [&+[Floor(n/k)^2:k in [1..n] ]: n in [1..40]]; // Marius A. Burtea, Jul 16 2019
    
  • Mathematica
    Table[Sum[Floor[n/k]^2, {k, n}], {n, 50}] (* T. D. Noe, Feb 26 2013 *)
    Table[nn = n;Total[Level[Table[Table[DivisorSigma[0, GCD[i, j]], {i, 1, nn}], {j, 1, nn}], {2}]], {n, 1, 49}] (* Geoffrey Critzer, Jan 15 2015 *)
    Table[Sum[2*DivisorSigma[1, k] - DivisorSigma[0, k], {k, 1, n}], {n, 1, 50}] (* Vaclav Kotesovec, Sep 02 2018 *)
  • PARI
    a(n)=sum(k=1,n,(n\k)^2)
    
  • Python
    from math import isqrt
    def A222548(n): return -(s:=isqrt(n))**3 + sum((q:=n//k)*((k<<1)+q-1) for k in range(1,s+1)) # Chai Wah Wu, Oct 21 2023

Formula

a(n) = zeta(2)*n^2 + O(n log n).
a(n) = 2*A024916(n) - A006218(n). - Vaclav Kotesovec, Sep 02 2018
G.f.: (1/(1 - x)) * Sum_{k>=1} (2*k - 1) * x^k/(1 - x^k). - Ilya Gutkovskiy, Jul 16 2019
a(n) = Sum_{d=1..n} (2*d-1)*floor(n/d). [Uspensky and Heaslet] - Michael Somos, Feb 16 2020
a(n) = Sum_{k=1..n} Sum_{d|k} floor(n/d). - Ridouane Oudra, Jul 16 2020
a(n) = Sum_{i=1..n} Sum_{j=1..n} tau(gcd(i,j)). - Ridouane Oudra, Nov 23 2021

A344675 a(n) = Sum_{k=1..n} floor(n^3/k^3).

Original entry on oeis.org

1, 9, 31, 75, 146, 256, 406, 610, 870, 1194, 1590, 2069, 2631, 3286, 4043, 4910, 5889, 6997, 8228, 9600, 11114, 12781, 14605, 16599, 18760, 21106, 23636, 26363, 29292, 32429, 35781, 39359, 43169, 47212, 51505, 56054, 60855, 65924, 71268, 76898, 82807, 89021
Offset: 1

Views

Author

Vaclav Kotesovec, May 26 2021

Keywords

Comments

In general, for m > 1, Sum_{k=1..n} floor(n^m/k^m) ~ zeta(m)*n^m + zeta(1/m)*n.

Crossrefs

Programs

  • Mathematica
    Table[Sum[Floor[n^3/k^3], {k, 1, n}], {n, 1, 50}]

Formula

a(n) ~ zeta(3)*n^3 + zeta(1/3)*n.

A153817 a(n)=Sum_{k=1..n} floor((n*k)/(n+k)).

Original entry on oeis.org

0, 1, 2, 4, 6, 10, 13, 18, 22, 28, 33, 42, 48, 57, 65, 74, 83, 95, 105, 118, 130, 142, 155, 171, 185, 200, 216, 232, 248, 270, 286, 307, 325, 345, 365, 390, 409, 433, 454, 480, 502, 532, 555, 583, 610, 636, 665, 695, 723, 753, 784, 814, 847, 880, 913, 947, 981
Offset: 1

Views

Author

Ctibor O. Zizka, Jan 02 2009

Keywords

Crossrefs

Programs

  • Maple
    A153817 := proc(n) add(floor(n*k/(n+k)), k=1..n) ; end: seq(A153817(n),n=1..100) ; # R. J. Mathar, Feb 21 2009
  • Mathematica
    Table[Sum[Floor[n*k/(n + k)], {k, 1, n}], {n, 1, 100}] (* Vaclav Kotesovec, May 28 2021 *)

Formula

a(n) ~ (1 - log(2)) * n^2. - Vaclav Kotesovec, May 28 2021

Extensions

More terms from R. J. Mathar, Feb 21 2009

A156745 a(n) = Sum_{k=1..n} floor((n+k)/k) = n + Sum_{k=1..n} sigma_0(k), where sigma_0(k) is A000005(k). Also a(n) = n + A006218(n).

Original entry on oeis.org

2, 5, 8, 12, 15, 20, 23, 28, 32, 37, 40, 47, 50, 55, 60, 66, 69, 76, 79, 86, 91, 96, 99, 108, 112, 117, 122, 129, 132, 141, 144, 151, 156, 161, 166, 176, 179, 184, 189, 198, 201, 210, 213, 220, 227, 232, 235, 246, 250, 257, 262, 269, 272, 281, 286, 295, 300
Offset: 1

Views

Author

Ctibor O. Zizka, Feb 14 2009

Keywords

Comments

Generalized sequence b(n) = Sum_{k=1..n} floor((n+k*t)/k) = t*n + Sum_{k=1..n} sigma_0(k), where sigma_0(k) is A000005(k). Also b(n) = t*n + A006218(n).
Partial sums of A334954. - Omar E. Pol, Sep 26 2020

Crossrefs

Programs

  • PARI
    a(n) = n + sum(k=1, n, numdiv(k)); \\ Michel Marcus, Oct 02 2020
    
  • Python
    from math import isqrt
    def A156745(n): return n-(s:=isqrt(n))**2+(sum(n//k for k in range(1,s+1))<<1) # Chai Wah Wu, Oct 23 2023

Formula

a(n) = 2*n + Sum_{k=1..floor(n/2)} floor((n-k)/k). - Wesley Ivan Hurt, Dec 25 2020
a(n) = A005843(n) + A002541(n), after Wesley Ivan Hurt. - Omar E. Pol, Dec 25 2020

Extensions

More terms from Eric M. Schmidt, Feb 28 2014

A347415 a(n) = Sum_{k=1..n} floor((n/k)^k).

Original entry on oeis.org

1, 3, 6, 11, 18, 31, 48, 76, 118, 184, 279, 426, 641, 966, 1448, 2163, 3228, 4805, 7137, 10586, 15681, 23198, 34278, 50606, 74632, 109987, 161954, 238312, 350432, 514999, 756407, 1110391, 1629219, 2389346, 3502578, 5132354, 7517523, 11007078, 16110784, 23573102, 34480937, 50420909
Offset: 1

Views

Author

Seiichi Manyama, Aug 31 2021

Keywords

Examples

			a(3) = [3/1] + [(3/2)^2] + [(3/3)^3] = 3 + 2 + 1 = 6.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Sum[Floor[(n/k)^k], {k, 1, n}]; Array[a, 40] (* Amiram Eldar, Aug 31 2021 *)
  • PARI
    a(n) = sum(k=1, n, n^k\k^k);

Formula

a(n) ~ sqrt(2*Pi*n) * exp(exp(-1)*n - 1/2). - Vaclav Kotesovec, Sep 14 2021

A347416 a(n) = Sum_{k=1..n} floor((n/k)^n).

Original entry on oeis.org

1, 5, 31, 276, 3238, 47463, 830415, 16845619, 388198577, 10009945747, 285452668383, 8918294580680, 302912273410475, 11112687415252836, 437907284782655738, 18447025981637731050, 827246579683710818081, 39346558272075085340201, 1978423430905859200399397
Offset: 1

Views

Author

Seiichi Manyama, Aug 31 2021

Keywords

Examples

			a(3) = [(3/1)^3] + [(3/2)^3] + [(3/3)^3] = 27 + 3 + 1 = 31.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Sum[Floor[(n/k)^n], {k, 1, n}]; Array[a, 20] (* Amiram Eldar, Aug 31 2021 *)
  • PARI
    a(n) = sum(k=1, n, n^n\k^n);

Formula

a(n) ~ n^n. - Vaclav Kotesovec, Sep 14 2021

A350221 a(n) = Sum_{k=1..n} (-1)^(k+1) * floor((n/k)^2).

Original entry on oeis.org

1, 3, 8, 12, 21, 29, 40, 52, 67, 83, 100, 116, 140, 160, 185, 210, 237, 264, 298, 327, 363, 397, 435, 472, 514, 557, 602, 644, 690, 741, 791, 837, 897, 950, 1009, 1063, 1126, 1185, 1253, 1313, 1381, 1450, 1521, 1593, 1667, 1739, 1820, 1894, 1973, 2054, 2140
Offset: 1

Views

Author

Seiichi Manyama, Dec 20 2021

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := Sum[(-1)^(k + 1)*Floor[(n/k)^2], {k, 1, n}]; Array[a, 50] (* Amiram Eldar, Dec 20 2021 *)
  • PARI
    a(n) = sum(k=1, n, (-1)^(k+1)*(n^2\k^2));
    
  • Python
    def A350221(n): return (m:=n**2)+sum(m//k**2 if k&1 else -(m//k**2) for k in range(2,n+1)) # Chai Wah Wu, Oct 27 2023

Formula

a(n) = A309081(n^2).

A172433 Let u(n) = Sum [n/[sqrt k]] and v(n) = Sum [n/(sqrt k)] where the summation index k ranges from 1 to infinity, although both sums are actually finite. Here [a] denotes the integer part of a. Then a(n) = u(n) - v(n).

Original entry on oeis.org

2, 6, 9, 16, 17, 27, 26, 36, 38, 48, 43, 67, 59, 67, 72, 88, 75, 102, 86, 111, 115, 123, 99, 150, 137, 142, 139, 169, 141, 192, 166, 192, 186, 189, 176, 253, 214, 217, 207, 263, 223, 284, 239, 269, 285, 285, 230, 332, 294, 325, 305, 339, 282, 350, 324, 391, 370, 369, 300, 448, 382, 377, 385, 438, 400
Offset: 1

Views

Author

Ali A. Tanara (aatanara(AT)gmail.com), Feb 02 2010

Keywords

Comments

One can pick out the values of the sequence at primes, obtaining the new sequence 6,9,17,26,43,59,75,86,99,141 which seems to be monotone, unlike the original sequence.
Actually, the infinite sum can be replaced by a finite sum with terms up to (n+1)^2 (see second PARI script). Apparently v(n) is A153818(n). - Michel Marcus, Jul 17 2013

Programs

  • PARI
    a(n) = round(suminf(k=1, floor(n/sqrtint(k))) - suminf(k=1, floor(n/sqrt(k)))) \\ Michel Marcus, Jul 17 2013
    
  • PARI
    a(n) = sum(k=1, (n+1)^2, floor(n/sqrtint(k))) - sum(k=1, (n+1)^2, floor(n/sqrt(k))) \\ Michel Marcus, Jul 17 2013

Extensions

Definition clarified by Gihan Marasingha (G_Marasingha(AT)hotmail.com), Feb 10 2010
Showing 1-8 of 8 results.