A378360 a(1) = 0, a(n) = Sum_{digits d in a(n-1)} (d+[d==0])*c(d,n-1) where c(d,k) = number of digits d in a(1..a(k)), with Iverson bracket.
0, 1, 1, 2, 2, 4, 4, 8, 8, 16, 9, 9, 18, 28, 38, 43, 18, 53, 14, 22, 10, 9, 27, 19, 44, 24, 42, 48, 92, 63, 24, 60, 21, 31, 25, 34, 62, 50, 19, 65, 50, 30, 27, 42, 78, 85, 102, 51, 48, 132, 72, 64, 92, 101, 24, 100, 27, 77, 49, 136, 87, 144, 91, 101, 33, 33, 39
Offset: 1
Examples
Let c(d) be the number of digits d in the sequence a(1..n-1), abbreviating the dyadic function for concision: a(2) = 1 since 0+[0==0]*c(0) = 1*1 = 1. a(3) = 1 since 1+[1==0]*c(1) = 1*1 = 1. a(4) = 2 since 1*c(1) = 1*2 = 2. a(5) = 2 since 2*c(2) = 2*1 = 2. a(6) = 4 since 2*c(2) = 2*2 = 4. ... a(10) = 16 since a(9) = 8, and 8*c(8) = 8*2 = 16. a(11) = 9 since 1*c(1)+6*c(6) = 1*3+6*1 = 9. ... a(19) = 14 since a(18) = 53, and 5*c(5)+3*c(3) = 5*1+3*3 = 14. a(20) = 22 since 1*c(1)+4*c(4) = 1*6+4*4 = 22. a(21) = 10 since 2*c(2) = 2*5 = 10, (not 2*c(2)+2*c(2) = 20), etc.
Links
- Michael De Vlieger, Table of n, a(n) for n = 1..10000
- Michael De Vlieger, Scatterplot of a(n), n = 1..10^6.
- Michael De Vlieger, Log log scatterplot of c(d, n), n = 1..10^5, d = 0..9, with a color function showing d = 0 in black, d = 1 in red, d = 2 in orange, ..., d = 9 in purple.
- Michael De Vlieger, First emergence of digit signatures in A378360 and for versions of this sequence in bases b = 2..9. Includes remarks for each base, proof that a(n) = 5 is impossible for n > 18 in decimal, and related code.
Programs
-
Mathematica
nn = 120; a[1] = j = 0; c[_] := 0; Do[k = Total@ Map[(#1 + Boole[#1 == 0])*(c[#1] += #2) & @@ # &, Tally@ IntegerDigits[j] ]; Set[{a[n], j}, {k, k}], {n, 2, nn}]; Array[a, nn]
Comments