login
a(n) = A203418(n)/A000178(n).
4

%I #17 Feb 24 2024 11:03:59

%S 1,2,8,20,40,384,10240,126720,1013760,48660480,7612661760,

%T 473174507520,16701626253312,4036421002199040,407426244909465600,

%U 23814785343474892800,932976775107465707520,26694111965427724713984,9044593230639040844267520

%N a(n) = A203418(n)/A000178(n).

%H G. C. Greubel, <a href="/A203420/b203420.txt">Table of n, a(n) for n = 1..140</a>

%H R. Chapman, <a href="https://www.maa.org/sites/default/files/Robin_Chapman27238.pdf">A polynomial taking integer values</a>, Mathematics Magazine, 29 (1996), 121.

%t composite = Select[Range[100], CompositeQ]; (* A002808 *)

%t z = 20;

%t f[j_]:= composite[[j]];

%t v[n_]:= Product[Product[f[k] - f[j], {j, 1, k - 1}], {k, 2, n}];

%t d[n_]:= Product[(i-1)!, {i, 1, n}];

%t Table[v[n], {n,z}] (* A203418 *)

%t Table[v[n+1]/v[n], {n,z}] (* A203419 *)

%t Table[v[n]/d[n], {n,z}] (* this sequence *)

%o (Magma)

%o A002808:=[n: n in [2..250] | not IsPrime(n)];

%o BarnesG:= func< n | (&*[Factorial(k): k in [0..n-2]]) >;

%o a:= func< n | n eq 1 select 1 else (&*[(&*[A002808[k+2] - A002808[j+1]: j in [0..k]]): k in [0..n-2]])/BarnesG(n+1) >;

%o [a(n): n in [1..40]]; // _G. C. Greubel_, Feb 24 2024

%o (SageMath)

%o A002808=[n for n in (2..250) if not is_prime(n)]

%o def BarnesG(n): return product(factorial(j) for j in range(1,n-1))

%o def a(n): return product(product(A002808[k+1] - A002808[j] for j in range(k+1)) for k in range(n-1))/BarnesG(n+1)

%o [a(n) for n in range(1,41)] # _G. C. Greubel_, Feb 24 2024

%Y Cf. A000040, A000178, A002808, A018252, A202808, A203417, A203418, A203419.

%K nonn

%O 1,2

%A _Clark Kimberling_, Jan 02 2012