|
|
A255165
|
|
a(n) = Sum_{k=2..n} floor(log(n)/log(k)), n >= 1.
|
|
4
|
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
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.
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
|
|
LINKS
|
|
|
FORMULA
|
a(n) = Sum_{k=2..n} floor(log(n)/log(k)), n >= 1.
a(n) = Sum_{i=2..n} floor(n^(1/i)).
a(n) = Sum_{i=1..floor(log_2(n))} floor(n^(1/i) - 1).
|
|
EXAMPLE
|
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.
|
|
MATHEMATICA
|
Table[Sum[Floor[Log[n]/Log[k]], {k, 2, n}], {n, 1, 100}]
|
|
PROG
|
(Magma) [0] cat [&+[Floor(Log(n)/Log(k)):k in [2..n]]:n in [2..70]]; // Marius A. Burtea, Nov 13 2019
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|