login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

a(n) = (n + 1)^[is_prime(n + 1)] * n!.
1

%I #10 Jan 15 2024 14:44:38

%S 1,2,6,6,120,120,5040,5040,40320,362880,39916800,39916800,6227020800,

%T 6227020800,87178291200,1307674368000,355687428096000,355687428096000,

%U 121645100408832000,121645100408832000,2432902008176640000,51090942171709440000

%N a(n) = (n + 1)^[is_prime(n + 1)] * n!.

%F a(2*n)*Bernoulli(2*n) = A347425(n).

%t A369119[n_] := n! If[PrimeQ[n+1], n+1, 1];

%t Array[A369119, 25, 0] (* _Paolo Xausa_, Jan 15 2024 *)

%o (SageMath)

%o def A369119(n): return (n+1)^is_prime(n+1)*factorial(n)

%Y Cf. A089026, A000142, A347425, A000367/A002445 (Bernoulli(2n)).

%K nonn

%O 0,2

%A _Peter Luschny_, Jan 14 2024