OFFSET
1,1
COMMENTS
Named after the British mathematician Allan Joseph Champneys Cunningham (1842-1928). - Amiram Eldar, Apr 02 2022
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
Eric Weisstein's World of Mathematics, Cunningham Number.
Wikipedia, Cunningham number.
FORMULA
a(2n) = A001597(n+2)-1, a(2n+1) = A001597(n+2)+1 for n >= 5, if (25,27) is the only pair of perfect powers that differ by 2. (Note that it is known as Mihăilescu's theorem (formerly called Catalan's conjecture) that (8,9) is the only pair of perfect powers who differ by 1.) - Jianing Song, Oct 15 2022
EXAMPLE
26 = 3^3 - 1, 126 = 5^3 + 1 are Cunningham numbers.
MATHEMATICA
powerQ[n_] := GCD @@ FactorInteger[n][[;; , 2]] > 1; Select[Range[2^9], powerQ[# - 1] || powerQ[# + 1] &] (* Amiram Eldar, Jul 27 2019 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
David W. Wilson, Feb 11 2003
STATUS
approved