login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A109453 Cumulative sum of initial digits of n. 5
1, 3, 6, 10, 15, 21, 28, 36, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 78, 81, 84, 87, 90, 93, 96, 99, 102, 105, 109, 113, 117, 121, 125, 129, 133, 137, 141, 145, 150, 155, 160, 165, 170, 175, 180, 185, 190, 195, 201, 207, 213 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

Table of n, a(n) for n=1..62.

A. Cobham, Uniform Tag Sequences, Mathematical Systems Theory, 6 (1972), 164-192.

FORMULA

a(n) = Sum_{i=1..n} A000030(i). a(n) = Sum_{i=1..n} [i / 10^([log_10(i)])] where [] denotes floor and log_10(i) is the logarithm is base 10. a(n+1) = a(n) + first-digit-of(n+1).

MATHEMATICA

f[n_] := Sum[ Floor[i / 10^Floor[Log[10, i]]], {i, n}]; Table[ f[n], {n, 62}] (* or *)

a[0] = 0; a[n_] := a[n] = (a[n - 1] + First[ IntegerDigits[ n]]); Table[ a[n], {n, 62}] (* Robert G. Wilson v, Aug 30 2005 *)

Accumulate[First/@(IntegerDigits/@Range[70])] (* Harvey P. Dale, Jan 11 2016 *)

PROG

(PARI) a(n) = sum(k=1, n, digits(k)[1]); \\ Michel Marcus, Dec 13 2017

CROSSREFS

Partial sums of A000030.

Sequence in context: A130488 A061076 A054632 * A217627 A037123 A062918

Adjacent sequences:  A109450 A109451 A109452 * A109454 A109455 A109456

KEYWORD

base,easy,nonn

AUTHOR

Jonathan Vos Post, Aug 27 2005

EXTENSIONS

Corrected by Robert G. Wilson v, Aug 30 2005

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy .

Last modified February 23 15:33 EST 2018. Contains 299581 sequences. (Running on oeis4.)