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.

A255165 a(n) = Sum_{k=2..n} floor(log(n)/log(k)), n >= 1.

Original entry on oeis.org

0, 1, 2, 4, 5, 6, 7, 9, 11, 12, 13, 14, 15, 16, 17, 20, 21, 22, 23, 24, 25, 26, 27, 28, 30, 31, 33, 34, 35, 36, 37, 39, 40, 41, 42, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72
Offset: 1

Views

Author

Richard R. Forberg, Feb 15 2015

Keywords

Comments

The sum jumps up by 2 or more where n is a power of one or more k < n, otherwise it gains 1 with each increase in n.
First differences = A089723.
This calculation is analogous to that used for the sum of the number of divisors for all integers <= n in A006218.
a(n)+n gives the number of digits in the representations of n from base 2 to base n+1. - Christina Steffan, Dec 06 2015
Without floor, Sum_{k=2..n} log(n)/log(k) ~ n * (1 + 1/log(n) + 2/log(n)^2 + 6/log(n)^3 + 24/log(n)^4 + 120/log(n)^5 + ...). - Vaclav Kotesovec, Apr 06 2021

Examples

			The first jump is at n = 4 where, in the summation, log(4)/log(2), as it reaches a new floor.
Note: Possible complications exist calculating the floor function on ratios of logs that produce exact integers (e.g., in Mathematica). Adding an infinitesimal amount to n solves it.
		

Crossrefs

Programs

  • Magma
    [0] cat [&+[Floor(Log(n)/Log(k)):k in [2..n]]:n in [2..70]]; // Marius A. Burtea, Nov 13 2019
  • Mathematica
    Table[Sum[Floor[Log[n]/Log[k]], {k, 2, n}], {n, 1, 100}]
  • PARI
    a(n)=sum(k=2,n,log(n)\log(k)) \\ Anders Hellström, Dec 06 2015
    

Formula

a(n) = Sum_{k=2..n} floor(log(n)/log(k)), n >= 1.
It appears that a(n) = A089361(n) + n - 1. - Michel Marcus, Feb 17 2015
From Ridouane Oudra, Nov 13 2019: (Start)
a(n) = Sum_{i=2..n} floor(n^(1/i)).
a(n) = Sum_{i=1..floor(log_2(n))} floor(n^(1/i) - 1).
a(n) = A043000(n) - n + 1. (End)
a(n) ~ n. - Vaclav Kotesovec, Apr 06 2021