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.

A230290 a(n) = Sum_{i=1..n} d(24*i+1) - Sum_{i=1..n} d(6*i+1), where d(n) = A000005(n).

Original entry on oeis.org

1, 2, 2, 1, 2, 4, 5, 4, 4, 4, 6, 7, 7, 5, 4, 10, 10, 10, 8, 9, 11, 10, 12, 10, 10, 13, 15, 14, 12, 14, 14, 14, 16, 16, 17, 17, 19, 21, 19, 20, 20, 18, 16, 16, 18, 24, 24, 23, 23, 21, 28, 28, 28, 24, 24, 26, 25, 27, 27, 28, 30, 30, 32, 28, 28, 30, 28, 30, 28, 29, 33, 39, 39, 37, 35, 39, 40, 38, 36, 36, 38
Offset: 1

Views

Author

N. J. A. Sloane, Oct 17 2013

Keywords

Comments

Every inequality in number theory of the form f(n) >= g(n) is a potential source of a sequence floor(f(n))-ceiling(g(n)).
That sequence can be negative (e.g., floor(2/3)-ceiling(1/3)=-1), but the other 3 differences floor(f(n))-floor(g(n)), ceiling(f(n))-ceiling(g(n)), and ceiling(f(n))-floor(g(n)) are nonnegative. - Jonathan Sondow, Oct 20 2013

Crossrefs

Programs

  • Magma
    [&+[#Divisors(24*i+1):i in [1..n]] - &+[#Divisors(6*i+1):i in [1..n]]:n in [1..85]]; // Marius A. Burtea, Jan 03 2020
  • Maple
    with(numtheory);
    f:=proc(n,a,b,c,d) local i; add(tau(a*i+b),i=1..n) - add(tau(c*i+d),i=1..n); end;
    [seq(f(n,24,1,6,1),n=1..120)];
    # More efficient:
    ListTools:-PartialSums([seq(numtheory:-tau(24*i+1)-numtheory:-tau(6*i+1),i=1..120)]); # Robert Israel, Jan 03 2020
  • Mathematica
    R = Range[100];
    Accumulate[DivisorSigma[0, 24R+1] - DivisorSigma[0, 6R+1]] (* Jean-François Alcover, Jan 31 2023 *)
  • PARI
    vector(100, n, sum(i=1, n, numdiv(24*i+1)) - sum(i=1, n, numdiv(6*i+1))) \\ Michel Marcus, Oct 09 2014
    

Formula

a(n) = (2*log(2)/3) * n + O(n^(1/3)*log(n)). - Amiram Eldar, Apr 12 2024