login
a(n) = n^(n-1) + 1.
5

%I #14 Sep 08 2022 08:45:28

%S 2,3,10,65,626,7777,117650,2097153,43046722,1000000001,25937424602,

%T 743008370689,23298085122482,793714773254145,29192926025390626,

%U 1152921504606846977,48661191875666868482,2185911559738696531969

%N a(n) = n^(n-1) + 1.

%C Prime p divides a(p-1). n divides a(n-1) for all prime n and all odd composite n.

%C p divides a((p+1)/2) for prime p = {3, 5, 11, 13, 19, 29, 37, 43, 53, 59, 61, 67, 83, ...} = A003629 (Primes congruent to {3,5} mod 8).

%C p divides a((p+3)/4) for prime p = {13, 73, 97, 109, 181, 229, 241, 277, 337, 409, 421, 457, 541, 709, 733, 757, 829, ...} = A107141 (Primes of the form 4x^2+9y^2).

%C p divides a((p+5)/6) for prime p = {43, 61, 79, 109, 151, 163, 181, 193, 313, 337, 433, 523, 577, 631, 643, 673, 787, 829, 907, 991, ...}.

%C p divides a((p+7)/8) for prime p = {113, 137, 569, 641, 673, 1129, 1289, 1297, 1481, 1801, ...}.

%C p divides a((3p-1)/2) for prime p = {5, 7, 13, 23, 29, 31, 37, 47, 53, 61, 71, 79, 101, 103, 109, 127, 149, 151, 157, 167, 173, 181, 191, 197, 199, ...} = A003628 (Primes congruent to {5, 7} mod 8).

%C p^2 divides a((3p-1)/2) for prime p = {5, 13, 173, 5501, ...} = A124924.

%H Vincenzo Librandi, <a href="/A124923/b124923.txt">Table of n, a(n) for n = 1..200</a>

%F a(n) = n^(n-1) + 1.

%F a(n) = A000169(n) + 1.

%F E.g.f.: -1 + exp(x) - W(-x), where W(x) is the Lambert w-function. - _G. C. Greubel_, Nov 19 2019

%p seq(n^(n-1) + 1, n=1..20); # _G. C. Greubel_, Nov 19 2019

%t Table[n^(n-1)+1, {n,20}]

%o (Magma) [n^(n-1) + 1: n in [1..20]]; // _Vincenzo Librandi_, Aug 14 2012

%o (PARI) vector(20, n, n^(n-1) + 1) \\ _G. C. Greubel_, Nov 19 2019

%o (Sage) [n^(n-1) + 1 for n in (1..20)] # _G. C. Greubel_, Nov 19 2019

%o (GAP) List([1..20], n-> n^(n-1) + 1); # _G. C. Greubel_, Nov 19 2019

%Y Cf. A000169, A003628, A003629, A107141, A124924.

%K nonn,easy

%O 1,1

%A _Alexander Adamchuk_, Nov 12 2006