login
A045841
Number of distinct odd numbers formed from the digits of n.
0
0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 2, 2, 4, 2, 4, 2, 4, 2, 4, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 4, 2, 2, 2, 4, 2, 4, 2, 4, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 4, 2, 4, 2, 2, 2, 4, 2, 4, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 4, 2, 4, 2, 4, 2, 2, 2, 4, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 4, 2, 4, 2, 4, 2, 4, 2, 2
OFFSET
0,12
EXAMPLE
a(37)=4 because we can form 3, 7, 37 and 73.
MATHEMATICA
f[n_]:=Length[Select[FromDigits/@Flatten[Rest[Permutations/@Subsets[IntegerDigits[n]]], 1], OddQ]]; Table[f[i], {i, 0, 100}] (* Harvey P. Dale, Jan 29 2011 *)
CROSSREFS
Sequence in context: A102641 A054763 A100374 * A040003 A106469 A082508
KEYWORD
nonn,base,easy
AUTHOR
EXTENSIONS
More terms from Erich Friedman
STATUS
approved