login
Imaginary part of Product_{k = 1..n} (k + i), i = sqrt(-1).
12

%I #43 Feb 22 2024 12:15:23

%S 0,1,3,10,40,190,1050,6620,46800,365300,3103100,28269800,271627200,

%T 2691559000,26495469000,238131478000,1394099824000,-15194495654000,

%U -936096296850000,-29697351895900000,-819329864480400000,-21683886333440500000,-570263312237604700000,-15145164178973569000000,-409583160925827252000000

%N Imaginary part of Product_{k = 1..n} (k + i), i = sqrt(-1).

%C Extension of factorial(n) to factim(n,m) defined by the recurrence a(0)=1, a(n)=a(n-1)*(n+m*i). Hence n! = factim(n,0), while the current sequence shows the imaginary parts of factim(n,1). The real parts are in A231530 and squares of magnitudes are in A101686.

%C From _Peter Bala_, Jun 01 2023: (Start)

%C Compare with A105751(n) = the imaginary part of Product_{k = 0..n} (1 + k*sqrt(-1)). Moll (2012) studied the prime divisors of the terms of A105750 - the real part of Product_{k = 0..n} (1 + k*sqrt(-1)) - and divided the primes into three types. Calculation suggests that a similar division holds in this case.

%C Type 1: the prime p does not divide any element of the sequence. It appears that for this sequence, unlike in A105750, there are no type 1 primes; i.e., every prime p divides some term of the 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 p = 2 and all primes of the form p == 1 (mod 4). See A002144.

%C Moll's conjecture 5.5 about type 2 primes 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 a type 2 prime p, 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 is A002145, primes of the form 4*k + 3. (End)

%H Stanislav Sykora, <a href="/A231531/b231531.txt">Table of n, a(n) for n = 0..440</a>

%H Victor H. Moll, <a href="http://www.tulane.edu/~vhm/papers_html/xn-final.pdf">An arithmetic conjecture on a sequence of arctangent sums</a>, 2012, see f_n.

%F From _Vladimir Reshetnikov_, Oct 22 2015: (Start)

%F a(n) = Im((1+i)_n) = -Re(Gamma(i)*Gamma(n+1-i))*sinh(Pi)/Pi, where (a)_n is the Pochhammer symbol, i=sqrt(-1).

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

%F E.g.f.: sin(log(1-x))/(x-1). (End)

%F P-recursive: a(n) = (2*n - 1)*a(n-1) - (n^2 - 2*n + 2)*a(n-2) with a(0) = 0 and a(1) = 1. - _Peter Bala_, Jun 01 2023

%e factim(5,1) = -90+190*i. Hence a(5) = 190.

%e From _Peter Bala_, Jun 01 2023: (Start)

%e Asymptotic linearity for the type 2 prime p = 5: the sequence of 5-adic valuations [ v_5(a(n)) : n = 1..100] = [0, 0, 1, 1, 1, 2, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 5, 5, 5, 6, 5, 6, 6, 7, 6, 6, 7, 7, 7, 8, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 11, 11, 11, 13, 11, 12, 12, 13, 12, 12, 13, 13, 13, 14, 13, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 18, 19, 18, 18, 18, 19, 19, 19, 20, 19, 20, 21, 20, 20, 20, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 24, 25, 24, 24, 24, 25, 25, 25].

%e Note that v_5(a(100)) = 25 = 100/(5 - 1), in line with Moll's conjecture 5.5 above.

%e Oscillatory behavior for the type 3 prime p = 3: the sequence of 3-adic valuations [ v_3(a(n)) : n = 1..100] = [0, 1, 0, 0, 0, 1, 0, 2, 0, 0, 0, 2, 0, 2, 0, 0, 0, 2, 0, 1, 0, 0, 0, 1, 0, 3, 0, 0, 0, 3, 0, 2, 0, 0, 0, 2, 0, 1, 0, 0, 0, 1, 0, 2, 0, 0, 0, 2, 0, 3, 0, 0, 0, 3, 0, 1, 0, 0, 0, 1, 0, 2, 0, 0, 0, 2, 0, 2, 0, 0, 0, 2, 0, 1, 0, 0, 0, 1, 0, 4, 0, 0, 0, 4, 0, 2, 0, 0, 0, 2, 0, 1, 0, 0, 0, 1, 0, 2, 0, 0]. It appears that v_3(a(n)) = 0 unless n == 0 or 2 (mod 6). (End)

%p seq(simplify(-sinh(Pi)*Im(I!*(n-I)!)/Pi), n=0..19); # _Peter Luschny_, Oct 23 2015

%t Table[Im[Pochhammer[1+I, n]], {n, 0, 20}]

%t Table[Sum[(-1)^(n+k) StirlingS1[n+1, 2k], {k, 0, (n+1)/2}], {n, 0, 20}] (* _Vladimir Reshetnikov_, Oct 22 2015 *)

%o (PARI) Factim(nmax, m)={local(a, k); a=vector(nmax); a[1]=1+0*I;

%o for (k=2, nmax, a[k]=a[k-1]*(k-1+m*I); ); return(a); }

%o a = Factim(1000,1); imag(a)

%o (PARI) t(n) = if( n<0, 0, n! * polcoeff(cos(log(1+x+x*O(x^n))), n));

%o vector(50, n, n--; (-1)^n*t(n+1)) \\ _Altug Alkan_, Oct 22 2015

%o (Python)

%o from sympy.functions.combinatorial.numbers import stirling

%o def A231531(n): return sum(stirling(n+1,k<<1,kind=1)*(1 if k&1 else -1) for k in range((n+1>>1)+1)) # _Chai Wah Wu_, Feb 22 2024

%Y Cf. A231530 (real parts), A101686 (squares of magnitudes), A003703, A105750, A105751.

%Y See A242651, A242652 for a pair of similar sequences.

%K sign,easy

%O 0,3

%A _Stanislav Sykora_, Nov 10 2013