login
a(n) = BS2(n) * W(n) where BS2 = sum_{k=0..n} ((-1)^k*k!/(k+1)) S_{2}(n, k) and S_{2}(n, k) are the Stirling-Frobenius subset numbers A039755(n, k). W(n) = product{p primes <= n+1 such that p divides n+1 or p-1 divides n} = A225481(n).
3

%I #20 Jun 27 2019 08:40:20

%S 1,1,-2,-2,14,33,-62,-132,254,14585,-5110,-313266,2828954,38669001,

%T -573370,-404801672,237036478,117650567067,-11499383114,

%U -24255028327410,1281647882998,8203584532193105,-3584085584926,-418397193140056356,3965530936622474,405233976502715850633

%N a(n) = BS2(n) * W(n) where BS2 = sum_{k=0..n} ((-1)^k*k!/(k+1)) S_{2}(n, k) and S_{2}(n, k) are the Stirling-Frobenius subset numbers A039755(n, k). W(n) = product{p primes <= n+1 such that p divides n+1 or p-1 divides n} = A225481(n).

%C a(n)/A225481(n) is case m = 2 of the scaled generalized Bernoulli numbers defined as Sum_{k=0..n} ((-1)^k*k!/(k+1)) S_{m}(n, k) where S_{m}(n, k) are Stirling-Frobenius subset numbers. A225481(n) can be seen as an analog of the Clausen numbers A141056(n).

%H Peter Luschny, <a href="http://www.luschny.de/math/euler/StirlingFrobeniusNumbers.html">Stirling-Frobenius numbers</a>

%H Peter Luschny, <a href="http://www.luschny.de/math/euler/GeneralizedBernoulliNumbers.html">Generalized Bernoulli numbers</a>.

%e The numerators of 1/1, 1/2, -2/6, -2/2, 14/30, 33/6, -62/42, -132/2, 254/30, 14585/10, -5110/66, ...(the denominators are A225481(n)).

%t EulerianNumber[n_, k_, m_] := EulerianNumber[n, k, m] = If[n == 0, If[k == 0, 1 , 0], (m*(n-k) + m - 1)*EulerianNumber[n-1, k-1, m] + (m*k + 1)* EulerianNumber[n-1, k, m]];

%t BS[n_, m_] := Sum[Sum[EulerianNumber[n, j, m]*Binomial[j, n-k], {j, 0, n}]/ ((-m)^k*(k+1)), {k, 0, n}]

%t a[n_] := Product[If[Divisible[n+1, p] || Divisible[n, p-1], p, 1], {p, Prime /@ Range @ PrimePi[n+1]}] * BS[n, 2];

%t Table[a[n], {n, 0, 25}] (* _Jean-François Alcover_, Jun 27 2019, from Sage *)

%o (Sage)

%o @CachedFunction

%o def EulerianNumber(n, k, m) : # The Eulerian numbers

%o if n == 0: return 1 if k == 0 else 0

%o return ((m*(n-k)+m-1)*EulerianNumber(n-1, k-1, m) +

%o (m*k+1)*EulerianNumber(n-1, k, m))

%o @CachedFunction

%o def BS(n, m): # The generalized scaled Bernoulli numbers

%o return (add(add(EulerianNumber(n, j, m)*binomial(j, n - k)

%o for j in (0..n))/((-m)^k*(k+1)) for k in (0..n)))

%o def A226157(n): # The numerators of BS(n, 2) relative to A225481

%o C = mul(filter(lambda p: ((n+1)%p == 0) or (n%(p-1) == 0), primes(n+2)))

%o return C*BS(n, 2)

%o [A226157(n) for n in (0..25)]

%Y Cf. A225481, A226156.

%K sign,frac

%O 0,3

%A _Peter Luschny_, May 30 2013