This site is supported by donations to The OEIS Foundation.

 Annual Appeal: Please make a donation to keep the OEIS running. In 2018 we replaced the server with a faster one, added 20000 new sequences, and reached 7000 citations (often saying "discovered thanks to the OEIS"). Other ways to donate

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A214606 a(n) = GCD(n, 2^n - 2). 1
 1, 2, 3, 2, 5, 2, 7, 2, 3, 2, 11, 2, 13, 2, 3, 2, 17, 2, 19, 2, 3, 2, 23, 2, 5, 2, 3, 14, 29, 2, 31, 2, 3, 2, 1, 2, 37, 2, 3, 2, 41, 2, 43, 2, 15, 2, 47, 2, 7, 2, 3, 2, 53, 2, 1, 2, 3, 2, 59, 2, 61, 2, 3, 2, 5, 2, 67, 2, 3, 14, 71, 2, 73, 2, 3, 2, 1, 2, 79 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS Greatest common divisor of n and 2^n - 2. a(n)=n iff n=1 or n is prime or n is Fermat pseudoprime to base 2 or even pseudoprime to base 2. - Corrected by Thomas Ordowski, Jan 25 2016 Indices of 1's: A121707 preceded by 1. - False, see A267999. Numbers n such that a(n) does not equal A020639(n) (the least prime factor of n): A146077. LINKS Charles R Greathouse IV, Table of n, a(n) for n = 1..10000 EXAMPLE a(3) = 3 because 2^3 - 2 = 6 and GCD(3, 6) = 3. a(4) = 2 because 2^4 - 2 = 14 and GCD(4, 14) = 2. MAPLE seq(igcd(n, (2&^n - 2) mod n), n=1 .. 1000); # Robert Israel, Jan 26 2016 MATHEMATICA Table[GCD[n, 2^n - 2], {n, 1, 59}] (* Alonso del Arte, Jul 22 2012 *) PROG (Java) import java.math.BigInteger; public class A214606 {   public static void main (String[] args) {     BigInteger c1 = BigInteger.valueOf(1);     BigInteger c2 = BigInteger.valueOf(2);     for (int n=0; n<222; n++) {       BigInteger bn=BigInteger.valueOf(n), pm2=c1.shiftLeft(n).subtract(c2);       System.out.printf("%s, ", bn.gcd(pm2).toString());     }   } } (PARI) a(n)=gcd(n, lift(Mod(2, n)^n-2)) \\ Charles R Greathouse IV, May 29 2014 (MAGMA) [GCD(n, 2^n-2): n in [1..80]]; // Vincenzo Librandi, Jan 26 2016 CROSSREFS Cf. A000918, A064535, A121707, A020639, A146077. Sequence in context: A092028 A020639 A092067 * A079879 A071889 A091963 Adjacent sequences:  A214603 A214604 A214605 * A214607 A214608 A214609 KEYWORD nonn,easy 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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified December 17 14:50 EST 2018. Contains 318201 sequences. (Running on oeis4.)