OFFSET
1,3
COMMENTS
First occurrence of k or 0 if not possible (including all odd primes k): 2, 1, 0, 9, 0, 14, 0, 15, 0, 0, 0, 42, 0, 0, 0, 45, 0, 76, 0, 589, 0, 0, 0, 35, 0, 0, 0, 4381, 0, 0, ..., . - Robert G. Wilson v, Sep 08 2007
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..12441
Antti Karttunen, Data supplement: n, a(n) computed for n = 1..100000
FORMULA
From Antti Karttunen, Dec 17 2018: (Start)
(End)
EXAMPLE
400 = 2^4 * 5^2. So a(400) = gcd((2+1)^4 * (5+1)^2, (2-1)^4 * (5-1)^2) = gcd(2916, 16) = 4.
MATHEMATICA
f[n_] := Block[{fi = FactorInteger@n}, GCD[Times @@ ((First /@ fi - 1)^Last /@ fi), Times @@ ((First /@ fi + 1)^Last /@ fi)]]; Array[f, 99] (* Robert G. Wilson v, Sep 08 2007 *)
PROG
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Mar 15 2007
EXTENSIONS
More terms from Robert G. Wilson v, Sep 08 2007
STATUS
approved