login
A033107
Number of 7's when n is written in base b for 2<=b<=n+1.
11
0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 2, 2, 2, 1, 3, 1, 3, 2, 2, 1, 4, 1, 2, 2, 4, 1, 3, 1, 3, 3, 2, 1, 5, 2, 4, 3, 4, 2, 5, 3, 6, 3, 3, 2, 7, 2, 3, 5, 6, 3, 5, 2, 4, 3, 6, 3, 9, 2, 3, 4, 4, 4, 6, 3, 8, 4, 3, 2
OFFSET
1,23
LINKS
MAPLE
f:= proc(n) local b; `+`(seq(numboccur(7, convert(n, base, b)), b=8..n+1)) end proc:
map(f, [$1..100]); # Robert Israel, Aug 20 2024
MATHEMATICA
f[n_] := Count[Flatten@ Table[ IntegerDigits[n, b], {b, 2, n + 1}], 7]; Array[f, 90] (* Robert G. Wilson v, Nov 14 2012 *)
KEYWORD
nonn,base,look
STATUS
approved