A352610 a(0) = 0; a(n+1) = Sum_{d a distinct decimal digit in a(n)} binomial(c(d)-1,2), where c(d) is the number of occurrences of d in a(j), 0 <= j <= n; see comments.
0, 0, 1, 0, 3, 0, 6, 0, 10, 16, 4, 0, 21, 6, 3, 1, 10, 43, 4, 3, 6, 6, 10, 57, 0, 45, 7, 1, 28, 1, 36, 25, 6, 21, 51, 61, 94, 10, 133, 112, 130, 230, 129, 175, 184, 206, 155, 231, 312, 353, 106, 426, 131, 416, 445, 81, 381, 517, 486, 143, 651, 642, 249, 172, 629
Offset: 0
Examples
a(1) = 0 because there are no terms prior to a(0)=0; a(2) = 1 because 0 has occurred just twice, and 0,0 can be counted just once. To calculate a(39) given that a(38) = 133: c(1) = 14 so (1,1) can be counted 13*14/2=91 times, c(3) = 7 so (3,3) can be counted 6*7/2 = 21 times. Therefore a(39) = 91 + 21 = 112.
Links
- Michael De Vlieger, Table of n, a(n) for n = 0..10000
- Michael De Vlieger, Log log scatterplot of a(n), n = 0..10^6, representing a(n) = 0 instead as a(n) = 1/2 for visibility.
Programs
-
Mathematica
Block[{a, c, d, nn}, nn = 65; d[] = -1; a[1] = d[0] = 0; Do[c = DigitCount[a[n - 1]]; MapIndexed[AddTo[d[First[#2]], #1] &, c]; a[n] = Total@ Map[# (# + 1)/2 &@ d[#] &, Position[c, ?(# > 0 &)][[All, 1]] ], {n, 2, nn}]; Array[a, nn] ] (* Michael De Vlieger, Mar 23 2022 *)
Comments