login
A079790
a(n) = number of m <= n which can be obtained by deleting digits from n.
3
1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 4, 5, 6, 6, 6, 6
OFFSET
1,10
COMMENTS
a(n) = A120004(n) for n <= 100. a(101) = #{0, 1, 10, 11, 101} = 5; a(102) = #{0, 1, 2, 10, 12, 102} = 6. - Reinhard Zumkeller, Jun 15 2006
From David A. Corneth, Jul 03 2026: (Start)
For some families of numbers we may have direct formulae.
For example for m in A009993 we have a(m) = 2^k - 1 where k is the number of digits of m.
For repunits m we have a(m) = k where k is the number of digits of m.
For numbers m of the form ABABAB... where A,B > 0 distinct, seem to have a(m) = Fibonacci(k+3) - 2 where k is the number of digits of m.
(End)
LINKS
EXAMPLE
a(124)=7 and the numbers are 1,2,4,12,14,24,124.
MAPLE
f:= proc(n) local L, V;
L:= convert(n, base, 10);
V:= convert(map(t -> L[t], combinat:-powerset([$1..nops(L)])), set) minus {[]};
V:= map(proc(t) local i; add(t[i]*10^(i-1), i=1..nops(t)) end proc, V);
nops(select(t -> t <= n, V))
end proc:
map(f, [$1..100]); # Robert Israel, Dec 03 2024
CROSSREFS
KEYWORD
nonn,easy,base,changed
AUTHOR
Amarnath Murthy, Feb 04 2003
EXTENSIONS
More terms from Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Apr 19 2003
Corrected and extended by Reinhard Zumkeller, Jun 15 2006
STATUS
approved