login
n! + 2n - 1.
4

%I #17 Sep 08 2022 08:45:33

%S 2,5,11,31,129,731,5053,40335,362897,3628819,39916821,479001623,

%T 6227020825,87178291227,1307674368029,20922789888031,355687428096033,

%U 6402373705728035,121645100408832037,2432902008176640039

%N n! + 2n - 1.

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

%H Florian Luca and Igor E. Shparlinski, <a href="http://www.emis.de/journals/JTNB/2005-3/article10.pdf">On the largest prime factor of n! + 2^n - 1</a>, Journal de Theorie des Nombres de Bordeaux 17 (2005), 859-870.

%F a(n) = A000142(n) + A005408(n-1).

%p A139464:=n->n!+2*n-1: seq(A139464(n), n=1..20); # _Wesley Ivan Hurt_, Nov 15 2014

%t Table[n! + 2 n - 1, {n, 40}]

%o (PARI) a(n)=n!+2*n-1 \\ _Charles R Greathouse IV_, Feb 01 2013

%o (Magma) [Factorial(n)+2*n-1 : n in [1..20]]; // _Wesley Ivan Hurt_, Nov 15 2014

%Y Cf. A127986, A127987, A139023, A139024, A139465, A139466, A139467.

%Y Cf. A000142 (n!), A005408 (2n+1).

%K nonn,easy

%O 1,1

%A _Artur Jasinski_, Apr 22 2008