login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Number of 2's when n is written in base b for 2<=b<=n+1.
10

%I #8 Nov 14 2012 18:07:38

%S 0,1,0,0,1,2,2,4,2,4,4,4,3,7,4,6,7,7,5,9,5,9,8,9,8,14,7,7,8,9,6,13,8,

%T 12,12,10,11,16,9,11,12,16,11,16,10,14,15,12,11,20,14,17,16,15,12,19,

%U 15,19,16,16,15,25,15,17,19,19,17,21,16,19,18

%N Number of 2's when n is written in base b for 2<=b<=n+1.

%t f[n_] := Count[Flatten@ Table[ IntegerDigits[n, b], {b, 2, n + 1}], 2]; Array[f, 70] (* _Robert G. Wilson v_, Nov 14 2012 *)

%Y Cf. A033093, A033095, A033098, A033099, A033101, A033103, A033105, A033107, A033109, A033111.

%K nonn,base

%O 1,6

%A _Clark Kimberling_