login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A095048 Number of distinct digits needed to write all positive divisors of n in decimal representation. 15
1, 2, 2, 3, 2, 4, 2, 4, 3, 4, 1, 5, 2, 4, 3, 5, 2, 6, 2, 5, 4, 2, 3, 6, 3, 4, 5, 5, 3, 6, 2, 6, 2, 5, 4, 7, 3, 5, 3, 6, 2, 6, 3, 3, 5, 5, 3, 6, 4, 4, 4, 6, 3, 9, 2, 7, 5, 5, 3, 7, 2, 4, 6, 6, 4, 4, 3, 7, 5, 7, 2, 8, 3, 5, 5, 8, 2, 7, 3, 7, 6, 4, 3, 7, 4, 6, 6, 4, 3, 9, 4, 6, 3, 5, 3, 7, 3, 6, 3, 5, 2, 8 (list; graph; refs; listen; history; text; internal format)
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
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
Sequence in context: A179940 A138707 A358099 * A332268 A355593 A355302
KEYWORD
nonn,base
AUTHOR
Reinhard Zumkeller, May 28 2004
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 19:39 EDT 2024. Contains 371963 sequences. (Running on oeis4.)