OFFSET
0,3
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..325
A. Fekete and G. Martin, Problem 10791: Squared Series Yielding Integers, Amer. Math. Monthly, 108 (No. 2, 2001), 177-178.
FORMULA
From Gary W. Adamson, Jul 22 2011: (Start)
sqrt(a(n)) = upper left term in M^n as to the modulus of a polar term; M = an infinite square production matrix in which a column of (i, i, i, ...) is appended to the right of Pascal's triangle, as follows (with i = sqrt(-1)):
1, i, 0, 0, 0, ...
1, 1, i, 0, 0, ...
1, 2, 1, i, 0, ...
1, 3, 3, 1, i, ...
... (End)
a(n) = |B_n(i)|^2, where B_n(x) is the n-th Bell polynomial, i = sqrt(-1) is the imaginary unit. - Vladimir Reshetnikov, Oct 15 2017
a(n) ~ (n*exp(-1 + Re(LambertW(i*n)) / Abs(LambertW(i*n))^2) / Abs(LambertW(i*n)))^(2*n) / Abs(1 + LambertW(i*n)), where i is the imaginary unit. - Vaclav Kotesovec, Jul 28 2021
MAPLE
A121870a:= proc(a) local i, t:
i:=1: t:=0: for i to 100 do t:=t+evalf((i^(a-1))*(I)^i/(i)!): od:
RETURN(round(abs(t^2))):
end: a:= A121870a(n);
# Russell Walsmith, Apr 18 2008
# Alternate:
seq(abs(BellB(n, I))^2, n=0..30); # Robert Israel, Oct 15 2017
MATHEMATICA
Table[Abs[BellB[n, I]]^2, {n, 0, 20}] (* Vladimir Reshetnikov, Oct 15 2017 *)
PROG
(PARI) a(n) = abs( (sum(k=0, n, I^k*stirling(n, k, 2)))^2 );
vector(25, n, a(n-1)) \\ G. C. Greubel, Oct 08 2019
(Magma) C<I>:= ComplexField(); a:= func< n | Round(Abs( (&+[I^k*StirlingSecond(n, k): k in [0..n]])^2 )) >;
[a(n): n in [0..25]]; // G. C. Greubel, Oct 08 2019
(Sage) [abs( sum(I^k*stirling_number2(n, k) for k in (0..n))^2 ) for n in (0..25)] # G. C. Greubel, Oct 08 2019
(GAP) List([0..25], n-> (Sum([0..Int(n/2)], k-> Stirling2(n, 2*k)*(-1)^(k)) )^2 + (Sum([0..Int(n/2)], k-> (-1)^k*Stirling2(n, 2*k+1)))^2 ); # G. C. Greubel, Oct 08 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Sep 05 2006
STATUS
approved