login
A359684
Greatest prime dividing 2^n - n for n>=2; a(1) = 1.
1
1, 2, 5, 3, 3, 29, 11, 31, 503, 13, 97, 1021, 8179, 1637, 4679, 13, 8737, 131063, 524269, 262139, 2097131, 2003, 1423, 2713, 123817, 170327, 577, 14983, 564533, 87481, 318949, 262657, 209510599, 157109, 344117, 2473, 2255501, 26861, 49977801259, 24481
OFFSET
1,2
LINKS
FORMULA
a(n) = A006530(A000325(n)).
MAPLE
a:= n-> max(1, numtheory[factorset](2^n-n)):
seq(a(n), n=1..40); # Alois P. Heinz, Jan 11 2023
MATHEMATICA
a[n_] := FactorInteger[2^n - n][[-1, 1]]; Array[a, 40] (* Amiram Eldar, Mar 30 2023 *)
PROG
(PARI) a(n) = if (n==1, 1, vecmax(factor(2^n-n)[, 1])); \\ Michel Marcus, Jan 11 2023
(Python)
from sympy import primefactors
def A359684(n): return 1 if n==1 else max(primefactors((1<<n)-n)) # Chai Wah Wu, Jan 11 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Philippe Deléham, Jan 11 2023
STATUS
approved