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!)
A214587 Greatest common divisor of a number and its last decimal digit: a(n) = gcd(n, n mod 10). 2
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 1, 2, 5, 2, 1, 2, 1, 20, 1, 2, 1, 4, 5, 2, 1, 4, 1, 30, 1, 2, 3, 2, 5, 6, 1, 2, 3, 40, 1, 2, 1, 4, 5, 2, 1, 8, 1, 50, 1, 2, 1, 2, 5, 2, 1, 2, 1, 60, 1, 2, 3, 4, 5, 6, 1, 4, 3, 70, 1, 2, 1, 2, 5, 2, 7, 2, 1, 80, 1, 2, 1, 4, 5 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
EXAMPLE
a(69) = gcd(69,9) = 3.
MATHEMATICA
Table[GCD[n, Mod[n, 10]], {n, 0, 100}] (* T. D. Noe, Jul 24 2012 *)
PROG
(Java)
import java.math.BigInteger;
public class A214587 {
public static void main (String[] args) {
for (long n=0; n<222; n++) {
BigInteger bn=BigInteger.valueOf(n), ld=BigInteger.valueOf(n%10);
System.out.printf("%s, ", bn.gcd(ld).toString());
}
}
}
CROSSREFS
Cf. A068822.
Sequence in context: A278946 A322629 A190599 * A365762 A010889 A053831
KEYWORD
nonn,base
AUTHOR
Alex Ratushnyak, Jul 22 2012
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 08:10 EDT 2024. Contains 372579 sequences. (Running on oeis4.)