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.

A168010 a(n) = Sum of all numbers of divisors of all numbers k such that n^2 <= k < (n+1)^2.

Original entry on oeis.org

5, 15, 25, 39, 47, 67, 75, 95, 105, 129, 129, 163, 167, 191, 205, 229, 231, 269, 267, 299, 313, 337, 341, 379, 387, 409, 427, 459, 445, 505, 497, 529, 553, 573, 571, 627, 625, 657, 661, 711, 687, 757, 743, 783, 805, 821, 831, 885, 875, 913, 929, 961, 961, 1011
Offset: 1

Views

Author

Omar E. Pol, Nov 16 2009

Keywords

Comments

A straightforward approach to calculate a(n) would require computing tau (A000005) for the 2n+1 integers between n^2 and (n+1)^2. Since Sum_{i=1..n} tau(i) can be computed by summing sqrt(n) terms, we can compute a(n) via the summation of n terms of the form 2*(floor(n*(n+2)/i)-floor((n-1)*(n+1)/i)) without the need to compute tau. Similarly for the sequence A168012. - Chai Wah Wu, Oct 24 2023

Examples

			a(2) = 15 because the numbers k are 4, 5, 6, 7 and 8 (since 2^2 <= k < 3^2) and d(4) + d(5) + d(6) + d(7) + d(8) = 3 + 2 + 4 + 2 + 4 = 15, where d(n) is the number of divisors of n (see A000005).
		

Crossrefs

Programs

  • Mathematica
    Table[Total[DivisorSigma[0,Range[n^2,(n+1)^2-1]]],{n,60}] (* Harvey P. Dale, Aug 17 2015 *)
  • PARI
    a(n)=sum(k=n^2,(n+1)^2-1,numdiv(k)) \\ Franklin T. Adams-Watters, May 14 2010
    
  • Python
    def A168010(n):
        a, b = n*(n+2),(n-1)*(n+1)
        return (sum(a//k-b//k for k in range(1,n))<<1)+5 # Chai Wah Wu, Oct 23 2023

Extensions

More terms from Franklin T. Adams-Watters, May 14 2010

A168012 a(n) = sum of all divisors of all numbers k such that n^2 <= k < (n+1)^2.

Original entry on oeis.org

8, 48, 133, 302, 516, 923, 1346, 2038, 2768, 3891, 4810, 6572, 7959, 10066, 12186, 14944, 17261, 21210, 23992, 28497, 32550, 37742, 42111, 48906, 54252, 61280, 68153, 76958, 82942, 94661, 101882, 113082, 123794, 135583, 145630, 161526
Offset: 1

Views

Author

Omar E. Pol, Nov 16 2009

Keywords

Examples

			a(2) = 48 because the numbers k are 4,5,6,7 and 8 (since 2^2 <= k < 3^2) and sigma(4) + sigma(5) + sigma(6) + sigma(7) + sigma(8) = 7 + 6 + 12 + 8 + 15 = 48, where sigma(n) is the sum of divisors of n (see A000203).
		

Crossrefs

Programs

  • Mathematica
    A168012[n_]:=Sum[DivisorSigma[1,k],{k,n^2,(n+1)^2-1}];
    Array[A168012,50] (* Paolo Xausa, Oct 23 2023 *)
  • PARI
    a(n)=sum(k=n^2,(n+1)^2-1,sigma(k)) \\ Franklin T. Adams-Watters, May 14 2010
    
  • Python
    def A168012(n):
        a, b = n*(n+2),(n-1)*(n+1)
        return (sum((q:=a//k)*((s:=k<<1)+q+1)-(r:=b//k)*(s+r+1) for k in range(1,n))>>1)+5*n+3 # Chai Wah Wu, Oct 23 2023

Extensions

More terms from Franklin T. Adams-Watters, May 14 2010

A168013 a(n) = Sum of all divisors of all numbers < (n+1)^2.

Original entry on oeis.org

8, 56, 189, 491, 1007, 1930, 3276, 5314, 8082, 11973, 16783, 23355, 31314, 41380, 53566, 68510, 85771, 106981, 130973, 159470, 192020, 229762, 271873, 320779, 375031, 436311, 504464, 581422, 664364, 759025, 860907, 973989, 1097783, 1233366, 1378996, 1540522
Offset: 1

Views

Author

Omar E. Pol, Nov 16 2009

Keywords

Comments

Partial sums of A168012.

Examples

			For n=2 the a(2)=56 because the numbers < (2+1)^2 are 1,2,3,4,5,6,7 and 8. Then a(2) = sigma(1)+sigma(2)+sigma(3)+sigma(4)+sigma(5)+sigma(6)+sigma(7)+sigma(8) = 1+3+4+7+6+12+8+15 = 56, where sigma(n) is the sum of divisor of n (see A000203).
		

Crossrefs

Programs

  • Mathematica
    A168012[n_]:=Sum[DivisorSigma[1,k],{k,n^2,(n+1)^2-1}];
    Accumulate[Array[A168012,50]] (* Paolo Xausa, Oct 23 2023 *)
  • Python
    def A168013(n):
        m = n*(n+2)
        return sum((q:=m//k)*((k<<1)+q+1) for k in range(1,n+1))-n**2*(n+1)>>1 # Chai Wah Wu, Oct 23 2023

Formula

a(n) = A024916(n^2+2*n). - Jason Yuen, Oct 08 2024

Extensions

More terms from Sean A. Irvine, Dec 07 2009

A171762 a(n) = Sum_{k=n^2+1..(n+1)^2-1} tau(k).

Original entry on oeis.org

4, 12, 22, 34, 44, 58, 72, 88, 100, 120, 126, 148, 164, 182, 196, 220, 228, 254, 264, 284, 304, 328, 338, 358, 382, 400, 420, 444, 442, 478, 494, 518, 544, 564, 562, 602, 622, 648, 652, 690, 684, 730, 740, 768, 790, 812, 828, 858, 870, 898, 920, 946, 958, 990
Offset: 1

Views

Author

Giovanni Teofilatto, Dec 18 2009

Keywords

Crossrefs

Programs

  • Maple
    A168011 := proc(n) add( numtheory[tau](k),k=1..n^2+2*n) ; end proc: A048691 := proc(n) numtheory[tau](n^2) ; end proc: A171762 := proc(n) A168011(n)-A168011(n-1)-A048691(n) ; end proc: seq(A171762(n),n=1..80) ; # R. J. Mathar, Jan 25 2010
  • Mathematica
    Array[n \[Function] Sum[DivisorSigma[0, k], {k, n^2 + 1, (n + 1)^2 - 1}], 200] (* J. Mulder (jasper.mulder(AT)planet.nl), Jan 28 2010 *)

Formula

a(n) = A168011(n) - A168011(n-1) - A048691(n). - R. J. Mathar, Jan 25 2010

Extensions

Definition corrected by Giovanni Teofilatto, Dec 19 2009
More terms from R. J. Mathar and J. Mulder (jasper.mulder(AT)planet.nl), Jan 25 2010
Showing 1-4 of 4 results.