login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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) = A058183(n) - Sum_{1..A058183(n)} A000035(A058183(n)).
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)]:
ListTools:-PartialSums(L); # Robert Israel, Apr 05 2020
MATHEMATICA
Accumulate[IntegerLength[2Range[80]]] (* Alonso del Arte, Mar 12 2020, after Harvey P. Dale *)
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
Sequence in context: A158023 A004271 A004278 * A068670 A371925 A084925
KEYWORD
nonn,base,easy
AUTHOR
Alexander Goebel, Mar 10 2020
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 29 07:27 EDT 2024. Contains 373826 sequences. (Running on oeis4.)