A260626 a(n) = gcd(m, 2^m-1) where m is the n-th nonprime positive integer.
1, 1, 3, 1, 1, 1, 3, 1, 1, 1, 9, 5, 7, 1, 3, 1, 1, 1, 1, 3, 1, 1, 1, 1, 9, 1, 1, 5, 21, 1, 1, 1, 3, 1, 1, 1, 1, 27, 1, 1, 1, 1, 15, 1, 7, 1, 1, 3, 1, 1, 1, 9, 1, 1, 1, 1, 3, 5, 1, 1, 21, 1, 1, 1, 1, 9, 1, 1, 1, 1, 1, 3, 1, 1, 25, 3, 1, 7, 1, 27, 11, 1, 1, 3, 1
Offset: 1
Links
- Michel Lagneau, Table of n, a(n) for n = 1..10000
Programs
-
Maple
seq(`if`(isprime(m), NULL, igcd(m, 2^m-1)), m=1..150);
-
Mathematica
GCDnonPrime[n_Integer]:=GCD[2^FixedPoint[n+PrimePi@#&,n+PrimePi@n]-1,FixedPoint[n+PrimePi@#&,n+PrimePi@n]];Array[GCDnonPrime,120] GCD[#,2^#-1]&/@Select[Range[200],!PrimeQ[#]&] (* Harvey P. Dale, Aug 25 2019 *)
-
PARI
for(n=1, 1e3, if(!isprime(n), print1(gcd(n,2^n-1)", "))) \\ Altug Alkan, Nov 01 2015
Comments