Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #34 Feb 22 2024 17:45:51
%S 0,1,3,0,-40,-90,1050,6160,-46800,-549900,3103100,67610400,-271627200,
%T -11186357000,26495469000,2416003824000,-1394099824000,
%U -662595375078000,-936096296850000,225382826562400000,819329864480400000,-93217812901913700000,-570263312237604700000
%N Imaginary part of Product_{k=0..n} (1 + k*i), i = sqrt(-1).
%C From _Peter Bala_, Jun 01 2023: (Start)
%C Compare with A105750(n) = the real part of Product_{k = 0..n} (1 + k*sqrt(-1)). Moll (2012) studied the prime divisors of the terms of A105750 and divided the primes into three classes. Numerical calculation suggests that a similar division holds in this case.
%C Type 1: primes p that do not divide any element of the sequence {a(n)}.
%C In this case, unlike in A105750, the set of type 1 primes is empty; that is, every prime p divides some term of this sequence.
%C Type 2: primes p such that the p-adic valuation v_p(a(n)) has asymptotically linear behavior. An example is given below.
%C We conjecture that the set of type 2 primes consists of primes p == 1 (mod 4), equivalently, rational primes that split in the field extension Q(sqrt(-1)) of Q, together with the prime p = 2, which ramifies in Q(sqrt(-1)). See A002144.
%C Moll's conjecture 5.5 extends to this sequence and takes the form:
%C (i) the 2-adic valuation v_2(a(n)) ~ n/4 as n -> oo.
%C (ii) for the other primes of type 2, the p-adic valuation v_p(a(n)) ~ n/(p - 1) as n -> oo.
%C Type 3: primes p such that the sequence of p-adic valuations {v_p(a(n)) : n >= 0} exhibits an oscillatory behavior (this phrase is not precisely defined). An example is given below.
%C We conjecture that the set of type 3 primes consists of primes p == 3 (mod 4), equivalently, rational primes that remain inert in the field extension Q(sqrt(-1)) of Q. See A002145. (End)
%H Seiichi Manyama, <a href="/A105751/b105751.txt">Table of n, a(n) for n = 0..450</a>
%F a(n) = ((2*n-1)*a(n-1)-(n^2-2*n+2)*n*a(n-2))/(n-1) for n > 1, a(n) = n for n < 2. - _Alois P. Heinz_, Apr 11 2018
%F From _Peter Bala_, May 27 2023:(Start)
%F a(n) = Sum_{k = 0..floor((n+1)/2)} (-1)^k*|Stirling1(n+1, n-2*k)|, where Stirling1(n, k) = A048994(n,k).
%F The triangular number n*(n+1)/2 divides a(n). See A164652. In particular, if p is an odd prime then p divides a(p).
%F a(2*n) = (-1)^(n+1)*A003703(2*n+1) for n >= 0.
%F a(2*n+1) = (-1)^(n+1)*A009454(2*n+2) for n >= 0. (End)
%e From _Peter Bala_, Jun 01 2023: (Start)
%e The sequence of 5-adic valuations [v_5(a(n)) : n = 4..100] = [1, 1, 2, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 12, 11, 11, 13, 11, 12, 13, 13, 12, 12, 14, 13, 13, 14, 13, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 18, 18, 18, 18, 18, 20, 19, 19, 20, 19, 20, 20, 20, 20, 20, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 24, 25, 25, 24, 24, 25, 25, 25].
%e Note that v_5(a(100)) = 25 = 100/(5 - 1), in agreement with the asymptotic behavior conjectured above.
%e The sequence of 3-adic valuations [v_3(a(n)) : n >= 4] begins [0, 2, 1, 0, 2, 2, 0, 1, 2, 0, 2, 1, 0, 2, 2, 0, 1, 2, 0, 3, 1, 0, 3, 3, 0, 1, 3, 0, 2, 1, 0, 2, 2, 0, 1, 2, 0, 2, 1, 0, 2, 2, 0, 1, 2, 0, 3, ...], exhibiting the oscillatory behavior for type 3 primes conjectured above. (End)
%p a:= proc(n) option remember; `if`(n<2, n,
%p ((2*n-1)*a(n-1)-(n^2-2*n+2)*n*a(n-2))/(n-1))
%p end:
%p seq(a(n), n=0..25); # _Alois P. Heinz_, Apr 11 2018
%t Table[Im[Product[1+k*I,{k,0,n}]],{n,0,22}] (* _James C. McMahon_, Jan 27 2024 *)
%o (PARI) a(n) = imag(prod(k=0, n, 1+k*I)); \\ _Michel Marcus_, Apr 11 2018
%o (Python)
%o from sympy.functions.combinatorial.numbers import stirling
%o def A105751(n): return sum(stirling(n+1,n-(k<<1),kind=1)*(-1 if k&1 else 1) for k in range((n>>1)+1)) # _Chai Wah Wu_, Feb 22 2024
%Y Cf. A003703, A009454, A048994, A105750, A164652, A231531, A363409 - A363416.
%K easy,sign
%O 0,3
%A _Paul Barry_, Apr 18 2005