A079790 a(n) = number of m <= n which can be obtained by deleting digits from n.
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
Examples
a(124)=7 and the numbers are 1,2,4,12,14,24,124.
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Programs
-
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
Extensions
More terms from Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Apr 19 2003
Corrected and extended by Reinhard Zumkeller, Jun 15 2006
Comments