|
|
A333183
|
|
Number of digits in concatenation of first n positive even integers.
|
|
1
|
|
|
1, 2, 3, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 97, 100, 103, 106, 109, 112, 115, 118, 121, 124, 127, 130, 133, 136, 139, 142, 145, 148, 151, 154
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
Connected with A019520 and A038396, similar to how A058183 applies to both A007908 and A000422 to count the digits in them, as the order of the digits does not matter (2468 returns the same result as 8642).
|
|
LINKS
|
|
|
FORMULA
|
a(n) = Sum_{i=1..n} (1+floor(log_10(2*i))). - Robert Israel, Apr 05 2020
|
|
EXAMPLE
|
For example, a(5) = 6 because 246810 (the concatenation of the first five positive even integers) has six digits.
|
|
MAPLE
|
L:= [1$4, seq(i $(9/2*10^(i-1), i=2..3)]:
|
|
MATHEMATICA
|
|
|
PROG
|
(Scala) (1 to 80).map{n: Int => new java.math.BigInteger(((2 to (2 * n) by 2).map(_.toString)).mkString("")).toString.length} // Alonso del Arte, Mar 12 2020
(PARI) a(n) = sum(k=1, n, #Str(2*k)); \\ Michel Marcus, Apr 02 2020
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|