The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Please make a donation to keep the OEIS running. We are now in our 56th year. In the past year we added 10000 new sequences and reached almost 9000 citations (which often say "discovered thanks to the OEIS"). Other ways to donate

 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). 1

%I

%S 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,

%T 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,

%U 6,1,4,3,70,1,2,1,2,5,2,7,2,1,80,1,2,1,4,5

%N Greatest common divisor of a number and its last decimal digit: a(n) = gcd(n, n mod 10).

%e a(69) = gcd(69,9) = 3.

%t Table[GCD[n, Mod[n, 10]], {n, 0, 100}] (* _T. D. Noe_, Jul 24 2012 *)

%o (Java)

%o import java.math.BigInteger;

%o public class A214587 {

%o public static void main (String[] args) {

%o for (long n=0; n<222; n++) {

%o BigInteger bn=BigInteger.valueOf(n), ld=BigInteger.valueOf(n%10);

%o System.out.printf("%s, ", bn.gcd(ld).toString());

%o }

%o }

%o }

%Y Cf. A068822.

%K nonn,base

%O 0,3

%A _Alex Ratushnyak_, Jul 22 2012

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 December 3 16:20 EST 2020. Contains 338906 sequences. (Running on oeis4.)