OFFSET
1,2
COMMENTS
a(n) <= 10, a(A095050(n)) = 10.
a(A206159(n)) <= 2. - Reinhard Zumkeller, Feb 05 2012
Almost all (in the sense of natural density) terms of this sequence are equal to 10. - Charles R Greathouse IV, Nov 16 2022
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
EXAMPLE
Set of divisors of n=10: {1,2,5,10}, therefore a(10) = #{0,1,2,5} = 4.
Set of divisors of n=16: {1,2,4,8,16}, therefore a(16)=#{1,2,4,6,8} = 5.
MAPLE
A095048 := proc(n)
local digset ;
digset := {} ;
for d in numtheory[divisors](n) do
digset := digset union convert(convert(d, base, 10), set) ;
end do:
nops(digset) ;
end proc:
seq(A095048(n), n=1..80) ; # R. J. Mathar, May 13 2022
PROG
(Haskell)
import Data.List (group, sort)
a095048 = length . group . sort . concatMap show . a027750_row
-- Reinhard Zumkeller, Feb 05 2012
(Python)
from sympy import divisors
def a(n):
s = set("1"+str(n))
if len(s) == 10: return 10
for d in divisors(n, generator=True):
s |= set(str(d))
if len(s) == 10: return 10
return len(s)
print([a(n) for n in range(1, 99)]) # Michael S. Branicky, Nov 16 2022
(PARI) a(n) = my(d = divisors(n), s = 0); for(i = 1, #d, v = digits(d[i]); for(j = 1, #v, s = bitor(s, 1<<v[j]); if(s == 1023, return(10)))); hammingweight(s) \\ David A. Corneth, Nov 16 2022
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Reinhard Zumkeller, May 28 2004
STATUS
approved