The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A248034 a(n+1) gives the number of occurrences of the last digit of a(n) so far, up to and including a(n), with a(0)=0. 10
 0, 1, 1, 2, 1, 3, 1, 4, 1, 5, 1, 6, 1, 7, 1, 8, 1, 9, 1, 10, 2, 2, 3, 2, 4, 2, 5, 2, 6, 2, 7, 2, 8, 2, 9, 2, 10, 3, 3, 4, 3, 5, 3, 6, 3, 7, 3, 8, 3, 9, 3, 10, 4, 4, 5, 4, 6, 4, 7, 4, 8, 4, 9, 4, 10, 5, 5, 6, 5, 7, 5, 8, 5, 9, 5, 10, 6, 6, 7, 6, 8, 6, 9, 6, 10, 7, 7, 8, 7, 9, 7, 10, 8, 8, 9, 8, 10, 9, 9, 10 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,4 COMMENTS In other words, the number to the right of a comma gives the number of occurrences of the digit immediately to the left of the comma, counting from the beginning up to that digit or comma. LINKS Alois P. Heinz, Table of n, a(n) for n = 0..10000 E. Angelini, Digit-counters updating themselves, SeqFan list, Oct 11 2014 Zak Seidov, Graph of 10^6 terms MAPLE a:= proc(n) option remember; `if`(n=0, 0,       coeff(b(n-1), x, irem(a(n-1), 10)))     end: b:= proc(n) option remember; `if`(n=0, 1, b(n-1)+       add(x^i, i=convert(a(n), base, 10)))     end: seq(a(n), n=0..120);  # Alois P. Heinz, Oct 18 2014 PROG (PARI) c=vector(10); print1(a=0); for(n=1, 99, apply(d->c[d+1]++, if(a, digits(a))); print1(", "a=c[1+a%10])) (MIT/GNU Scheme) ;; An implementation of memoization-macro definec can be found for example from: http://oeis.org/wiki/Memoization (definec (A248034 n) (if (zero? n) n (vector-ref (A248034aux_digit_counts (- n 1)) (modulo (A248034 (- n 1)) 10)))) (definec (A248034aux_digit_counts n) (cond ((zero? n) (vector 1 0 0 0 0 0 0 0 0 0)) (else (let loop ((digcounts-for-n (vector-copy (A248034aux_digit_counts (- n 1)))) (n (A248034 n))) (cond ((zero? n) digcounts-for-n) (else (vector-set! digcounts-for-n (modulo n 10) (+ 1 (vector-ref digcounts-for-n (modulo n 10)))) (loop digcounts-for-n (floor->exact (/ n 10))))))))) ;; Antti Karttunen, Oct 22 2014 CROSSREFS Cf. A249068 (analogous sequence in base 8). Cf. A249009 (analogous sequence which uses the first, not the last digit). Cf. also A249069, A249070, A249144, A249148. Sequence in context: A318225 A335497 A309872 * A322182 A336514 A249009 Adjacent sequences:  A248031 A248032 A248033 * A248035 A248036 A248037 KEYWORD nonn,base,look,hear AUTHOR Eric Angelini and M. F. Hasler, Oct 11 2014 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
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified May 14 13:50 EDT 2021. Contains 343884 sequences. (Running on oeis4.)