The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A221697 Numbers whose largest digit of all divisors is 2. 3
2, 22, 121, 202, 211, 1021, 1201, 2011, 2111, 2221, 2222, 10201, 10211, 12011, 12101, 12211, 12221, 20011, 20021, 20101, 20201, 20222, 21001, 21011, 21101, 21121, 21211, 21221, 22111, 22121, 101021, 101221, 102001, 102101, 102121, 110221, 111121, 111211, 111221, 112111, 112121 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Also numbers k such that the largest digit of the concatenation of all the divisors (A037278) of k is 2.
Numbers k such that A209928(k) = 2.
Union of A221698 and A106100.
LINKS
EXAMPLE
10201 is a term because the largest digit of all the divisors of 10201 (1, 101, 10201) is 2.
MAPLE
isA221697 := proc(n)
local dgs, d;
dgs := {} ;
for d in numtheory[divisors](n) do
dgs := dgs union convert(convert(d, base, 10), set) ;
end do:
if max(op(dgs)) = 2 then
true;
else
false;
end if;
end proc:
for n from 2 to 112121 do
if isA221697(n) then
printf("%d, ", n) ;
end if;
end do: # R. J. Mathar, Jan 30 2013
MATHEMATICA
Select[Range[115000], Max[Flatten[IntegerDigits/@Divisors[#]]]==2&] (* Harvey P. Dale, Dec 15 2014 *)
PROG
(Python)
from sympy import divisors
def ok(n): return '2' == max("".join(map(str, divisors(n))))
print([m for m in range(1, 112122) if ok(m)]) # Michael S. Branicky, Feb 22 2021
(Python)
from sympy import isprime, divisors
from itertools import count, islice, product
def agen(): # generator of terms
yield 2
for d in count(2):
for f in "12":
for mid in product("012", repeat=d-2):
for e in "12": # ending in zero has 5 as divisor
s = f+"".join(mid)+e
t = int(s)
if "2" in s and isprime(t): yield t; continue
if "2" == max("".join(map(str, divisors(t)))): yield t
print(list(islice(agen(), 50))) # Michael S. Branicky, Aug 03 2022
CROSSREFS
Cf. A037278, A106100, A209928 (largest digit of all divisors of n), A221698.
Sequence in context: A325948 A216801 A083833 * A292452 A292732 A206418
KEYWORD
nonn,base
AUTHOR
Jaroslav Krizek, Jan 22 2013, corrected Jan 29 2013
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 June 10 13:53 EDT 2024. Contains 373264 sequences. (Running on oeis4.)