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!)
A365762 Greatest common divisor of n and the product of its digits. 0
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 1, 2, 5, 2, 1, 2, 1, 20, 1, 2, 1, 8, 5, 2, 1, 4, 1, 30, 1, 2, 3, 2, 5, 18, 1, 2, 3, 40, 1, 2, 1, 4, 5, 2, 1, 16, 1, 50, 1, 2, 1, 2, 5, 2, 1, 2, 1, 60, 1, 2, 9, 8, 5, 6, 1, 4, 3, 70, 1, 2, 1, 2, 5, 2, 7, 2, 1, 80, 1, 2, 1, 4, 5, 2, 1, 8, 1, 90, 1, 2, 3, 2, 5, 6, 1, 2, 9, 100 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
This sequence will contain all numbers whose prime factors are exclusively <10 (7-smooth numbers, A002473).
LINKS
EXAMPLE
a(11)=1 as 1*1=1; 11 and 1 share 1 as a gcd.
a(15)=5 as 1*5=5; 15 and 5 share 5 as a gcd.
a(10)=10 as 1*0=0; 10 and 0 share 10 as a gcd.
MATHEMATICA
a[n_]:=GCD[n, Product[Part[IntegerDigits[n], i], {i, IntegerLength[n]}]]; Array[a, 100] (* Stefano Spezia, Sep 20 2023 *)
PROG
(Python)
from math import gcd, prod
def a(n): return gcd(n, prod(map(int, str(n))))
print([a(n) for n in range(1, 101)])
(PARI) a(n) = gcd(n, vecprod(digits(n))); \\ Michel Marcus, Sep 20 2023
CROSSREFS
Sequence in context: A322629 A190599 A214587 * A010889 A053831 A263131
KEYWORD
nonn,base,easy
AUTHOR
Simon R Blow, Sep 18 2023
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 May 17 12:26 EDT 2024. Contains 372600 sequences. (Running on oeis4.)