OFFSET
0,3
COMMENTS
From Peter Bala, Jun 01 2023: (Start)
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.
Type 1: primes p that do not divide any element of the sequence {a(n)}.
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.
Type 2: primes p such that the p-adic valuation v_p(a(n)) has asymptotically linear behavior. An example is given below.
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.
Moll's conjecture 5.5 extends to this sequence and takes the form:
(i) the 2-adic valuation v_2(a(n)) ~ n/4 as n -> oo.
(ii) for the other primes of type 2, the p-adic valuation v_p(a(n)) ~ n/(p - 1) as n -> oo.
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.
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)
LINKS
Seiichi Manyama, Table of n, a(n) for n = 0..450
FORMULA
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
From Peter Bala, May 27 2023:(Start)
a(n) = Sum_{k = 0..floor((n+1)/2)} (-1)^k*|Stirling1(n+1, n-2*k)|, where Stirling1(n, k) = A048994(n,k).
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).
a(2*n) = (-1)^(n+1)*A003703(2*n+1) for n >= 0.
a(2*n+1) = (-1)^(n+1)*A009454(2*n+2) for n >= 0. (End)
EXAMPLE
From Peter Bala, Jun 01 2023: (Start)
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].
Note that v_5(a(100)) = 25 = 100/(5 - 1), in agreement with the asymptotic behavior conjectured above.
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)
MAPLE
a:= proc(n) option remember; `if`(n<2, n,
((2*n-1)*a(n-1)-(n^2-2*n+2)*n*a(n-2))/(n-1))
end:
seq(a(n), n=0..25); # Alois P. Heinz, Apr 11 2018
MATHEMATICA
Table[Im[Product[1+k*I, {k, 0, n}]], {n, 0, 22}] (* James C. McMahon, Jan 27 2024 *)
PROG
(PARI) a(n) = imag(prod(k=0, n, 1+k*I)); \\ Michel Marcus, Apr 11 2018
(Python)
from sympy.functions.combinatorial.numbers import stirling
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
CROSSREFS
KEYWORD
easy,sign
AUTHOR
Paul Barry, Apr 18 2005
STATUS
approved