login
A174379
a(n) is the largest prime factor of (n-1)^n - n^(n-1).
3
17, 19, 167, 162287, 159463, 354751, 2486784401, 12589253, 71549927, 83695120256591, 556123, 10902870290089, 25793, 362561, 26757560905578361, 6015993258685545623, 55044966589, 1182622403647894934149, 9973660056412561, 38783069052902219, 4576344458074395243073
OFFSET
4,1
COMMENTS
A007925(n) = (n-1)^n - n^(n-1).
A007925(n) = -1 for n = 1..3, which has no prime factors, so the offset is 4.
LINKS
EXAMPLE
19 is a term because 4^5 - 5^4 = 399 = 19 * 21. - Bernard Schott, Jan 14 2019
MATHEMATICA
Table[FactorInteger[(n - 1)^n - n^(n - 1)][[-1, 1]], {n, 4, 20}] (* Vincenzo Librandi, Jan 14 2019 *)
PROG
(PARI) a(n) = vecmax(factor((n-1)^n - n^(n-1))[, 1]);
for (n=4, 30, print1(a(n), ", ")) \\ Michel Marcus, Jan 14 2019
(Magma) [Maximum(PrimeDivisors((n-1)^n - n^(n-1))): n in [4..25]]; // Vincenzo Librandi, Jan 14 2019
CROSSREFS
Cf. A007925.
Sequence in context: A165320 A132242 A162873 * A178424 A068387 A372220
KEYWORD
nonn
AUTHOR
Torbjorn Alm (talm(AT)tele2.se), Mar 17 2010
EXTENSIONS
a(4) corrected, a(22)-a(24) added, and other edits by Jon E. Schoenfield, Jan 13 2019
STATUS
approved