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

A106847 a(n) = Sum {k + j*m <= n} (k + j*m), with 0 < k,j,m <= n.

Original entry on oeis.org

0, 0, 2, 11, 31, 71, 131, 229, 357, 537, 767, 1064, 1412, 1867, 2385, 3000, 3720, 4570, 5506, 6608, 7808, 9194, 10734, 12436, 14260, 16360, 18622, 21079, 23739, 26668, 29758, 33199, 36815, 40742, 44924, 49369, 54085, 59265, 64661, 70355
Offset: 0

Views

Author

Ralf Stephan, May 06 2005

Keywords

Examples

			We have 1+1*1=2<=3, 1+2*1=3, 1+1*2=3, 2+1*1=3, thus a(3)=2+3+3+3=11.
		

Crossrefs

Cf. A106633, A106634, A106846, A078567 (number of terms).

Programs

  • Maple
    A106847 := proc(n)
        local a,k,l,m ;
        a := 0 ;
        for k from 1 to n do
            for l from 1 to n-k do
                m := floor((n-k)/l) ;
                if m >=1 then
                    m := min(m,n) ;
                    a := a+m*k+l*m*(m+1)/2 ;
                end if;
            end do:
        end do:
        a ;
    end proc: # R. J. Mathar, Oct 17 2012
  • Mathematica
    A106847[n_] := Module[{a, k, l, m}, a = 0; For[k = 1, k <= n, k++, For[l = 1, l <= n - k, l++, If[l == 0, m = n, m = Floor[(n - k)/l]]; If[m >= 1, m = Min[m, n]; a = a + m*k + l*m*(m + 1)/2]]]; a];
    Table[A106847[n], {n, 0, 40}] (* Jean-François Alcover, Apr 04 2024, after R. J. Mathar *)
  • PARI
    A106847(n)=sum(m=1,n-1,sum(k=1,(n-1)\m,(n-m*k)*(n+m*k+1)))/2  \\ M. F. Hasler, Oct 17 2012

Formula

From Ridouane Oudra, Jun 02 2024: (Start)
a(n) = (1/2)*Sum_{k=1..n} (n^2 + n - k^2 - k)*tau(k);
a(n) = (1/2)*(n^2 + n)*A006218(n) - Sum_{k=1..n} A143272(k);
a(n) = (1/2)*((n + 1)*A143274(n) - A143127(n) - A319085(n)). (End)
a(n) ~ n^3 * (log(n) + 2*gamma - 4/3)/3, where gamma is the Euler-Mascheroni constant A001620. - Vaclav Kotesovec, Jun 15 2024

A143273 Triangle read by rows: A127648 * A000012 * A130209.

Original entry on oeis.org

1, 2, 4, 3, 6, 6, 4, 8, 8, 12, 5, 10, 10, 15, 10, 6, 12, 12, 18, 12, 24, 7, 14, 14, 21, 14, 28, 14, 8, 16, 16, 24, 16, 32, 16, 32, 9, 18, 18, 27, 18, 36, 18, 36, 27, 10, 20, 20, 30, 20, 40, 20, 40, 30, 40, 11, 22, 22, 33, 22, 44, 22, 44, 33, 44, 22
Offset: 1

Views

Author

Gary W. Adamson, Aug 03 2008

Keywords

Comments

Row sums = A143274: (1, 6, 15, 32, 50, 84, ...).

Examples

			First few rows of the triangle =
  1;
  2,  4;
  3,  6,  6;
  4,  8,  8, 12;
  5, 10, 10, 15, 10;
  6, 12, 12, 18, 12, 24;
  7, 14, 14, 21, 14, 28, 14;
  8, 16, 16, 24, 16, 32, 16, 32;
  ...
T(6,3) = 12 = 6*d(3) = 6*2, where A000005 = d(k) = (1, 2, 3, 2, 2, 4, 2, 4, 3, ...).
		

Crossrefs

Programs

  • PARI
    tabl(nn) = for (n=1, nn, for (k=1, n, print1(n*numdiv(k), ", "))); \\ Michel Marcus, Mar 19 2016

Formula

T(n,k) = n*d(k).

Extensions

a(48) = 20 inserted by Georg Fischer, Jun 05 2023

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

Original entry on oeis.org

0, 1, 5, 12, 25, 39, 65, 87, 124, 161, 210, 249, 328, 377, 450, 531, 630, 698, 825, 903, 1047, 1169, 1295, 1393, 1609, 1740, 1893, 2056, 2269, 2400, 2679, 2822, 3070, 3277, 3486, 3709, 4082, 4260, 4498, 4748, 5136, 5336, 5744, 5956, 6312, 6686, 6984, 7218, 7772
Offset: 0

Views

Author

Tamas Sandor Nagy, Jul 21 2022

Keywords

Comments

In the sum, the divisors are k = 1..n and the multipliers are the reverse n+1-k = n .. 1.
From Thomas Scheuerle, Jul 21 2022: (Start)
Without the floor operation a(n) would be A027457(n+1)/A099946(n+1) = (H(n+1) - 1)*(n^2+n), where H(n) is the n-th harmonic number.
What is lim_{n->oo} ((A027457(n+1)/A099946(n+1) - a(n))/(n^2+n))? It appears to be close to 0.2452... . (End)
This limit is equal to Pi^2/12 - gamma = 0.24525136852258... - Vaclav Kotesovec, Jul 23 2022

Examples

			For n=5, the sum is formed:
  k = 1..n:                1   2   3   4   5
  floor(n/k):              5   2   1   1   1
  n+1-k = n..1:            5   4   3   2   1
  floor(n/k)*(n+1-k):     25   8   3   2   1
                          __________________
  a(5) =                  25 + 8 + 3 + 2 + 1 = 39
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Sum[(n+1-k) * Floor[n/k], {k, 1, n}]; Array[a, 50, 0] (* Amiram Eldar, Jul 22 2022 *)
  • PARI
    a(n) = sum(k=1, n, (n+1-k)*floor(n/k)) \\ Rémy Sigrist, Jul 21 2022
    
  • PARI
    my(N=50, x='x+O('x^N)); concat(0, Vec(sum(k=1, N, x^k*(k-(k-1)*x-x^k)/(1-x^k)^2)/(1-x)^2)) \\ Seiichi Manyama, Jul 24 2022
    
  • Python
    from math import isqrt
    def A355947(n): return (s:=isqrt(n))**2*(s-(n<<1)-1)+sum((q:=n//k)*((n<<2)-(k<<1)-q+3) for k in range(1,s+1))>>1 # Chai Wah Wu, Oct 24 2023

Formula

From Vaclav Kotesovec, Jul 23 2022: (Start)
For n > 0, a(n) = (n+1)*A006218(n) - A024916(n).
a(n) ~ n*(n+1)*(log(n) + 2*gamma - 1) - n^2*Pi^2/12, where gamma is the Euler-Mascheroni constant A001620. (End)
(1/(1-x)^2) * Sum_{k>0} x^k * (k - (k-1)*x - x^k)/(1-x^k)^2. - Seiichi Manyama, Jul 24 2022

Extensions

More terms from Rémy Sigrist, Jul 21 2022
Showing 1-3 of 3 results.