This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A052423 Highest common factor of nonzero digits of n. 4
 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 4, 1, 2, 1, 4, 1, 2, 1, 4, 1, 5, 1, 1, 1, 1, 5, 1, 1, 1, 1, 6, 1, 2, 3, 2, 1, 6, 1, 2, 3, 7, 1, 1, 1, 1, 1, 1, 7, 1, 1, 8, 1, 2, 1, 4, 1, 2, 1, 8, 1, 9, 1, 1, 3, 1, 1, 3, 1, 1, 9, 1, 1, 1 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS a(A069715(n)) = 1. - Reinhard Zumkeller, Apr 14 2014 LINKS Reinhard Zumkeller, Table of n, a(n) for n = 1..10000 EXAMPLE a(46)=2 because highest common factor of 4 and 6 is 2. PROG (PARI) a(n) = {digs = digits(n, 10); hcf = digs[1]; for (i = 2, #digs, if (digs[i], hcf = gcd(hcf, digs[i])); ); return (hcf); } \\ Michel Marcus, Jul 27 2013 (Haskell) a052423 n = f n n where    f x 1 = 1    f x y | x < 10    = gcd x y          | otherwise = if d == 1 then 1 else f x' (gcd d y)          where (x', d) = divMod x 10 -- Reinhard Zumkeller, Apr 14 2014 CROSSREFS Cf. A007954. Sequence in context: A075877 A133500 A256229 * A126616 A121042 A000030 Adjacent sequences:  A052420 A052421 A052422 * A052424 A052425 A052426 KEYWORD base,easy,nonn AUTHOR Henry Bottomley, Mar 17 2000 STATUS approved

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

Last modified October 21 22:47 EDT 2019. Contains 328315 sequences. (Running on oeis4.)