login
A118378
a(n+1) = a(n)^2 - (-1)^n * binomial(n+2,2) with a(1) = 1.
1
1, 4, 10, 110, 12085, 146047246, 21329798064184488, 454960285458888331666496499822180, 206988861344833157526906045960863418528301538238377184771619952355
OFFSET
1,2
FORMULA
a(n) = A000290(a(n)) - A033999(n)*A000217(n+1).
EXAMPLE
a(2) = a(1)^2 + (-1)^2 * 2*(2+1)/2 = 1*1 + 1*3 = 4;
a(3) = a(2)^2 + (-1)^3 * 3*(3+1)/2 = 4*4 - 3*2 = 10;
MATHEMATICA
a[n_]:= a[n]= If[n==1, 1, a[n-1]^2 + (-1)^n*Binomial[n+1, 2]];
Table[a[n], {n, 10}] (* G. C. Greubel, Feb 18 2021 *)
PROG
(Sage)
@CachedFunction
def A118378(n):
if (n==1): return 1
else: return A118378(n-1)^2 +(-1)^n*binomial(n+1, 2)
[A118378(n) for n in (1..10)] # G. C. Greubel, Feb 18 2021
(Magma)
A118378:= func< n | n eq 1 select 1 else Self(n-1)^2 + (-1)^n*Binomial(n+1, 2) >;
[A118378(n): n in [1..10]];
(PARI) a(n) = if (n==1, 1, n--; a(n)^2 - (-1)^n * binomial(n+2, 2)); \\ Michel Marcus, Feb 19 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, May 16 2006
EXTENSIONS
Corrected by Don Reble, Nov 22 2006
STATUS
approved