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.

Previous Showing 21-30 of 31 results. Next

A347153 Sum of all divisors, except the largest of every number, of the first n odd numbers.

Original entry on oeis.org

0, 1, 2, 3, 7, 8, 9, 18, 19, 20, 31, 32, 38, 51, 52, 53, 68, 81, 82, 99, 100, 101, 134, 135, 143, 164, 165, 182, 205, 206, 207, 248, 267, 268, 295, 296, 297, 346, 365, 366, 406, 407, 430, 463, 464, 485, 520, 545, 546, 603, 604, 605, 692, 693, 694, 735, 736, 765, 830, 855
Offset: 1

Views

Author

Omar E. Pol, Aug 20 2021

Keywords

Comments

Sum of all aliquot divisors (or aliquot parts) of the first n odd numbers.
Partial sums of the odd-indexed terms of A001065.
a(n) has a symmetric representation.

Crossrefs

Programs

  • Mathematica
    s[n_] := DivisorSigma[1, 2*n - 1] - 2*n + 1; Accumulate @ Array[s, 100] (* Amiram Eldar, Aug 20 2021 *)
  • PARI
    a(n) = sum(k=1, n, k = 2*k-1; sigma(k)-k); \\ Michel Marcus, Aug 20 2021
  • Python
    from sympy import divisors
    from itertools import accumulate
    def A346877(n): return sum(divisors(2*n-1)[:-1])
    def aupton(nn): return list(accumulate(A346877(n) for n in range(1, nn+1)))
    print(aupton(60)) # Michael S. Branicky, Aug 20 2021
    

Formula

a(n) = A001477(n-1) + A346869(n).
G.f.: (1/(1 - x)) * Sum_{k>=0} (2*k + 1) * x^(3*k + 2) / (1 - x^(2*k + 1)). - Ilya Gutkovskiy, Aug 20 2021
a(n) = (Pi^2/8 - 1)*n^2 + O(n*log(n)). - Amiram Eldar, Mar 21 2024

A348390 Irregular triangle read by rows: for n >= 2 the row members a(n, m) give the proper divisors of k, followed by the multiples of k larger than k and not exceeding n, for k = 1, 2, ..., n.

Original entry on oeis.org

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

Views

Author

Wolfdieter Lang, Nov 07 2021

Keywords

Comments

The length of row n is 2*A002541(n), for n >= 2.
The sum of row n is A348391(n). The sum of the proper divisors of row n is A153485(n). The sum of the multiples in row n is A348392(n). Hence, A348391(n) = A153485(n) + A348392(n).
For k = 1 the proper divisor set is empty, and for k > floor(n/2) the set of multiples is empty.

Examples

			The irregular triangle a(n, m), m = 1, 2, ..., 2*A002541(n) begins:
(members for k = 1, 2, ..., n are separated by a vertical bar, and the proper divisors and multiples are separated by a comma)
n\m 1 2 3 4 5 6 7 8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 ...
-----------------------------------------------------------------------------------
2:  2|1
3:  2 3|1|1
4:  2 3 4|1,4|1|1 2
5:  2 3 4 5|1,4|1|1  2| 1
6:  2 3 4 5 6|1,4 6| 1, 6| 1  2| 1| 1 2 3
7:  2 3 4 5 6 7|1,4  6| 1, 6| 1  2| 1| 1  2  3| 1
8:  3 4 5 6 7 8|1,4  6  8| 1 ,6| 1  2 ,8| 1| 1  2  3| 1| 1  2  4
9:  2 3 4 5 6 7 8 9| 1, 4  6  8| 1, 6  9| 1  2, 8| 1| 1  2  3| 1| 1  2  4| 1  3
...
n = 10: 2 3 4 5 6 7 8 9 10 | 1, 4 6 8 10 | 1, 6 9 | 1 2, 8 | 1, 10 | 1 2 3 | 1 | 1 2 4 | 1 3 | 1 2 5
-----------------------------------------------------------------------------------
n = 4:  d(4, 1) = {}, m(4, 1) = {2, 3, 4}; d(4, 2) = {1}, m(4, 2) = {4}; d(4, 3) = {1}, m(4, 3) = {}; d(4, 4) = {1, 2}, m(4, 4) = {}, This explains row n = 4.
		

Crossrefs

Programs

  • Mathematica
    nrows=10;Table[Flatten[Table[Join[Most[Divisors[k]],Range[2k,n,k]],{k,n}]],{n,2,nrows+1}] (* Paolo Xausa, Nov 23 2021 *)

Formula

For n >= 2 row n gives the sequence of the sequence d(n, k) of proper divisors of k (A027751(k)) followed by the sequences m(n, k) of the multiples of k, larger than k and not exceeding n (A348389), for k = 1, 2, 3, ..., n.

A348392 Row sums of the irregular triangle A348389.

Original entry on oeis.org

2, 5, 13, 18, 36, 43, 67, 85, 115, 126, 186, 199, 241, 286, 350, 367, 457, 476, 576, 639, 705, 728, 896, 946, 1024, 1105, 1245, 1274, 1484, 1515, 1675, 1774, 1876, 1981, 2269, 2306, 2420, 2537, 2817
Offset: 2

Views

Author

Wolfdieter Lang, Oct 31 2021

Keywords

Examples

			n = 4: Compare the row of an array with all multiples of k <= n, for k = 1,2, ..., n with the row of A348389:
All multiples of k <= 4 for k = 1..4:  [1 2 3 4|2 4|3|4] with row sum A143127(4) = 23.
A348389 row 4: [2 3 4|4] with 1, 2, 3 and 4 missing: row sum is 23 - 4*5/2  = 13. Hence a(4) = A143127(4) - A000217(4).
Also: a(4) =  A348391(4) - A153485(4) = 18 - 5 = 13.
		

Crossrefs

Formula

a(n) = Sum_{m=1.. A002541(n)} A348389(n, m), for n >= 2.
a(n) = A143127(n) - A000217(n).
a(n) = A348391(n) - A153485(n).

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)

A348391 Row sums of irregular triangle A348390.

Original entry on oeis.org

3, 7, 18, 24, 48, 56, 87, 109, 147, 159, 235, 249, 301, 355, 434, 452, 563, 583, 705, 779, 859, 883, 1087, 1143, 1237, 1331, 1499, 1529, 1781, 1813, 2004, 2118, 2240, 2358, 2701, 2739, 2875, 3009, 3339, 3381, 3729, 3773
Offset: 2

Views

Author

Wolfdieter Lang, Nov 07 2021

Keywords

Examples

			a(5) = 2 + 3 + 4 + 5 + 1 + 4 + 1 + 1 + 2 + 1 = (1 + 1 + 1 + 2 + 1) + (2 + 3 + 4 + 5 + 4) = 6 + 18 = 24.
		

Crossrefs

Programs

  • Mathematica
    nterms=50;Table[Total[Flatten[Table[Join[Most[Divisors[k]],Range[2k,n,k]],{k,n}]]],{n,2,nterms+1}] (* Paolo Xausa, Nov 23 2021 *)

Formula

a(n) = Sum_{m=1..2*A002541(n)} A348390(n, m), for n >= 2.
a(n) = A153485(n) + A348392(n).

A354801 n^2 minus the sum of all aliquot divisors of all positive integers <= n.

Original entry on oeis.org

1, 3, 7, 11, 19, 24, 36, 44, 57, 68, 88, 95, 119, 136, 156, 172, 204, 218, 254, 271, 301, 330, 374, 385, 428, 463, 503, 530, 586, 603, 663, 695, 745, 792, 848, 864, 936, 989, 1049, 1078, 1158, 1187, 1271, 1318, 1374, 1439, 1531, 1550, 1639, 1695, 1775, 1832, 1936, 1977, 2069, 2116
Offset: 1

Views

Author

Omar E. Pol, Jun 06 2022

Keywords

Comments

After the Dyck paths described in A237593 we can see that a(n) has a symmetric representation as follows: a(n) is the sum of the areas of two polygons. In the fourth quadrant of the infinite square grid the first polygon has a vertex at (0,0) and its area is equal to A000217(n). The second polygon appears if n >= 3 and it has a vertex at (n,-n) and its area is equal to A004125(n). So the area of the arrowhead-shaped polygon is equal to A153485(n). See the illustration of initial terms in the Links section.

Crossrefs

Programs

  • Mathematica
    Accumulate[Table[3*n - 1 - DivisorSigma[1, n], {n, 1, 60}]] (* Amiram Eldar, Jun 12 2022 *)
  • PARI
    a(n) = n^2 - sum(k=1, n, sigma(k)-k); \\ Michel Marcus, Jun 13 2022
    
  • Python
    from math import isqrt
    def A354801(n): return n*(3*n+1)+(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 22 2023

Formula

a(n) = A000217(n) + A004125(n).
a(n) = A000290(n) - A153485(n).
a(n) = A024916(n) + A004125(n) - A153485(n).

A123329 Let M be the matrix defined in A111490. Sequence gives M(2,1)-M(1,2), M(2,1)+M(3,1)+M(3,2)-M(1,2)-M(1,3)-M(2,3), etc.

Original entry on oeis.org

0, 1, 3, 8, 14, 26, 39, 59, 83, 115, 148, 197, 247, 307, 376, 460, 545, 651, 758, 887, 1027, 1181, 1336, 1527, 1724, 1937, 2163, 2417, 2672, 2969, 3267, 3596, 3940, 4304, 4681, 5113, 5546, 6001, 6473, 6995, 7518, 8095, 8673, 9291, 9942, 10619, 11297, 12051
Offset: 0

Views

Author

Keywords

Comments

From Omar E. Pol, Jan 20 2021: (Start)
Conjectures:
1. Convolution of A001065 and A000027.
2. Partial sums of A153485.
3. a(n) is also the difference of volume (the difference of number of cells) between two polycubes: the stepped pyramid described in A245092 which has volume A175254(n) and the stepped pyramid that represents the n-th tetrahedral number which has volume A000292(n).
In the three conjectures assuming that here the offset is 1.
For more information about the first pyramid see A237593. (End)

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; `if`(n=0, [0$2], (p-> p
          +[numtheory[sigma](n)-n$2]+[0, p[1]])(b(n-1)))
        end:
    a:= n-> b(n+1)[2]:
    seq(a(n), n=0..50);  # Alois P. Heinz, Jan 21 2021
  • Mathematica
    b[n_] := b[n] = If[n == 0, {0, 0}, With[{p = b[n-1]}, p +
         DivisorSigma[1, n] - n + {0, p[[1]]}]];
    a[n_] := b[n+1][[2]];
    Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Jul 10 2021, after Alois P. Heinz *)
  • Python
    def M(n,k): return 1 + (k-1)%n
    def a(n):
      return sum(M(i,j)-M(j,i) for i in range(2, n+3) for j in range(1, i))
    print([a(n) for n in range(48)]) # Michael S. Branicky, Jan 20 2021

Formula

a(n) = binomial(n+2,3) - A072481(n+1). - Robert Israel, Aug 13 2015
a(n) = A175254(n+1) - A000292(n+1), conjectured by Omar E. Pol, Jan 20 2021
a(n) = Sum_{i=2..(n+2)} Sum_{j=1..i-1} (M(i,j)-M(j,i)). - Michael S. Branicky, Jan 20 2021

Extensions

a(14) and beyond from Michael S. Branicky, Jan 20 2021

A280050 a(n) = Sum_{k=2..n} k/lpf(k), where lpf(k) is the least prime dividing k (A020639).

Original entry on oeis.org

0, 1, 2, 4, 5, 8, 9, 13, 16, 21, 22, 28, 29, 36, 41, 49, 50, 59, 60, 70, 77, 88, 89, 101, 106, 119, 128, 142, 143, 158, 159, 175, 186, 203, 210, 228, 229, 248, 261, 281, 282, 303, 304, 326, 341, 364, 365, 389, 396, 421, 438, 464, 465, 492, 503, 531, 550, 579, 580, 610, 611, 642, 663, 695, 708, 741, 742, 776, 799, 834, 835
Offset: 1

Views

Author

Ilya Gutkovskiy, Jan 02 2017

Keywords

Comments

Sum of the largest proper divisors of all positive integers <= n.

Examples

			For n = 8 the divisors of the first eight positive integers are {1}, {1, 2}, {1, 3}, {1, 2, 4}, {1, 5}, {1, 2, 3, 6}, {1, 7}, {1, 2, 4, 8}, so a(8) = 1 + 1 + 2 + 1 + 3 + 1 + 4 = 13.
		

Crossrefs

Programs

  • Mathematica
    Table[Sum[k/FactorInteger[k][[1, 1]], {k, 2, n}], {n, 71}]
    Join[{0}, Accumulate[Table[k/FactorInteger[k][[1, 1]], {k, 2, 71}]]] (* Amiram Eldar, Jul 03 2025 *)
  • PARI
    list(kmax) = {my(s = 0); print1(s, ", "); for(k = 2, kmax, s += k/factor(k)[1,1]; print1(s, ", "));} \\ Amiram Eldar, Jul 03 2025

Formula

a(n) = Sum_{k=2..n} k/A020639(k).
a(n) + 1 = Sum_{k=1..n} A032742(k).
a(p^k) = a(p^k-1) + p^(k-1), when p is prime.
a(n) ~ c * n^2, where c = (1/2) * Sum_{k>=1} A005867(k-1)/(prime(k)*A002110(k)) = 0.165049... . - Amiram Eldar, Jul 03 2025

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
Previous Showing 21-30 of 31 results. Next