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

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

Original entry on oeis.org

0, 0, 2, 6, 13, 24, 37, 56, 78, 106, 132, 178, 212, 258, 312, 376, 425, 508, 565, 662, 749, 836, 909, 1058, 1156, 1264, 1384, 1536, 1636, 1836, 1946, 2126, 2282, 2434, 2606, 2880, 3019, 3194, 3385, 3676, 3833, 4138, 4305, 4572, 4863, 5086, 5271, 5692, 5924, 6240
Offset: 1

Views

Author

Wesley Ivan Hurt, Dec 21 2020

Keywords

Comments

Total area of all rectangles with dimensions (y-x) X (z) where x and y are integers such that x + y = n, 0 < x <= y, and z = floor(y/x).

Crossrefs

Programs

  • Mathematica
    Table[Sum[(n - 2 k)*Floor[(n - k)/k], {k, Floor[n/2]}], {n, 60}]
  • Python
    from math import isqrt
    def A338991(n): return ((s:=isqrt(n))+1)*(n*(1-s)+s**2)-sum((q:=n//k)*((k-n<<1)+q+1) for k in range(1,s+1)) # Chai Wah Wu, Oct 23 2023

Formula

From Vaclav Kotesovec, Jun 24 2021: (Start)
a(n) = n + n*A006218(n) - 2*A024916(n).
a(n) ~ (log(n) + 2*gamma - Pi^2/6 - 1)*n^2, where gamma is the Euler-Mascheroni constant A001620. (End)

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

Original entry on oeis.org

0, 1, 4, 8, 12, 17, 23, 27, 34, 40, 46, 52, 60, 65, 73, 81, 87, 93, 104, 108, 118, 126, 132, 140, 150, 157, 165, 173, 183, 189, 201, 205, 216, 226, 232, 242, 254, 258, 268, 278, 288, 295, 307, 313, 323, 335, 343, 349, 363, 369, 382, 390, 398, 408, 420, 428, 440, 448, 456, 464, 482
Offset: 0

Views

Author

Wesley Ivan Hurt, Dec 22 2020

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Sum[Floor[(2 n - i)/i], {i, n}], {n, 0, 60}]
  • PARI
    a(n) = sum(k=1, n, (2*n-k)\k); \\ Michel Marcus, Dec 22 2020

Formula

From Vaclav Kotesovec, Dec 23 2020: (Start)
For n>0, a(n) = 2*A006218(n) + A075989(n) - n.
a(n) ~ 2*n * (log(2*n) + 2*gamma - 2), where gamma is the Euler-Mascheroni constant A001620. (End)

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

Original entry on oeis.org

0, 1, 4, 13, 22, 50, 68, 116, 162, 236, 278, 437, 498, 634, 794, 1018, 1118, 1450, 1574, 1975, 2276, 2598, 2774, 3519, 3834, 4273, 4746, 5490, 5772, 6887, 7214, 8163, 8856, 9586, 10330, 12072, 12540, 13443, 14382, 16244, 16806, 18861, 19480, 21192, 22954, 24267
Offset: 1

Views

Author

Wesley Ivan Hurt, Dec 17 2020

Keywords

Comments

Total volume of all rectangular prisms with dimensions (x, y, z) where x and y are positive integers such that x + y = n, x <= y, and z = floor(y/x). - Wesley Ivan Hurt, Dec 20 2020

Crossrefs

Programs

  • Mathematica
    Table[Sum[k (n - k)*Floor[(n - k)/k], {k, Floor[n/2]}], {n, 50}]
  • PARI
    a(n) = sum(k=1, n\2, k*(n-k)*((n-k)\k)); \\ Michel Marcus, Dec 19 2020
    
  • Python
    from math import isqrt
    def A339804(n): return (n*(1-n**2)+((s:=isqrt(n))**4<<1)+s**3*(3*(1-n))+s**2*(1-3*n) + sum((q:=n//k)*(-6*k**2+n*(3*((k<<1)+q+1))-q*((q<<1)+3)-1) for k in range(1,s+1)))//6 # Chai Wah Wu, Oct 27 2023

Formula

a(n) ~ n^3*(Pi^2-2-4*zeta(3))/12. - Rok Cestnik, Dec 19 2020
a(n) = n*A153485(n) - A279847(n). - Vaclav Kotesovec, Dec 21 2020

A280385 a(n) = Sum_{k=1..n} prime(k)^2*floor(n/prime(k)) .

Original entry on oeis.org

0, 4, 13, 17, 42, 55, 104, 108, 117, 146, 267, 280, 449, 502, 536, 540, 829, 842, 1203, 1232, 1290, 1415, 1944, 1957, 1982, 2155, 2164, 2217, 3058, 3096, 4057, 4061, 4191, 4484, 4558, 4571, 5940, 6305, 6483, 6512, 8193, 8255, 10104, 10229, 10263, 10796, 13005, 13018, 13067, 13096, 13394, 13567, 16376, 16389, 16535
Offset: 1

Views

Author

Ilya Gutkovskiy, Jan 01 2017

Keywords

Comments

Sum of all squares of prime divisors of all positive integers <= n.
Partial sums of A005063.

Examples

			For n = 6 the prime divisors of the first six positive integers are {0}, {2}, {3}, {2}, {5}, {2, 3} so a(6) = 0^2 + 2^2 + 3^2 + 2^2 + 5^2 + 2^2 + 3^2 = 55.
		

Crossrefs

Programs

  • Mathematica
    Table[Sum[Prime[k]^2 Floor[n/Prime[k]], {k, 1, n}], {n, 55}]
    Table[Sum[DivisorSum[k, #1^2 &, PrimeQ[#1] &], {k, 1, n}], {n, 55}]
    nmax = 55; Rest[CoefficientList[Series[(1/(1 - x)) Sum[Prime[k]^2 x^Prime[k]/(1 - x^Prime[k]), {k, 1, nmax}], {x, 0, nmax}], x]]
  • PARI
    a(n) = sum(k=1, n, prime(k)^2 * (n\prime(k))); \\ Indranil Ghosh, Apr 03 2017
    
  • Python
    from sympy import prime
    print([sum([prime(k)**2 * (n//prime(k)) for k in range(1, n + 1)]) for n in range(1, 21)]) # Indranil Ghosh, Apr 03 2017

Formula

G.f.: (1/(1 - x))*Sum_{k>=1} prime(k)^2*x^prime(k)/(1 - x^prime(k)).
Showing 1-4 of 4 results.