A064531 Number of connected components remaining when decimal expansion of the number n is cut from a piece of paper.
2, 1, 1, 1, 1, 1, 2, 1, 3, 2, 2, 1, 1, 1, 1, 1, 2, 1, 3, 2, 2, 1, 1, 1, 1, 1, 2, 1, 3, 2, 2, 1, 1, 1, 1, 1, 2, 1, 3, 2, 2, 1, 1, 1, 1, 1, 2, 1, 3, 2, 2, 1, 1, 1, 1, 1, 2, 1, 3, 2, 3, 2, 2, 2, 2, 2, 3, 2, 4, 3, 2, 1, 1, 1, 1, 1, 2, 1, 3, 2, 4, 3, 3, 3, 3, 3, 4, 3, 5, 4, 3, 2, 2, 2, 2, 2, 3, 2, 4, 3, 3, 2, 2, 2, 2
Offset: 0
Programs
-
Mathematica
a[n_ /; 0 <= n <= 9] := a[n] = {2, 1, 1, 1, 1, 1, 2, 1, 3, 2}[[n + 1]]; a[n_] := Total[a /@ (id = IntegerDigits[n])] - Length[id] + 1 ; Table[a[n], {n, 0, 104}] (* Jean-François Alcover, Nov 22 2013 *)
Extensions
More terms from Matthew Conroy, Oct 09 2001
Comments