login
A118686
Triangle read by rows. Let g(n) = n if n is a prime, otherwise g(n) = 1. Let p(0) = 1, p(n) = g(n)*p(n-1). Row n gives coefficients of Product_{j=0..n} (x - p(j)), with row 0 = {1}.
3
1, 1, -1, 1, -2, 1, 1, -4, 5, -2, 1, -10, 29, -32, 12, 1, -16, 89, -206, 204, -72, 1, -46, 569, -2876, 6384, -6192, 2160, 1, -76, 1949, -19946, 92664, -197712, 187920, -64800, 1, -286, 17909, -429236, 4281324, -19657152, 41707440, -39528000, 13608000, 1, -496, 77969, -4190126, 94420884, -918735192, 4169709360, -8798090400, 8314488000, -2857680000
OFFSET
0,5
FORMULA
Sum_{k=0..n} abs(T(n, k)) = A119489(n).
EXAMPLE
Triangle begins:
1;
1, -1;
1, -2, 1;
1, -4, 5, -2;
1, -10, 29, -32, 12;
1, -16, 89, -206, 204, -72;
1, -46, 569, -2876, 6384, -6192, 2160;
MATHEMATICA
g[n_]:= If[PrimeQ[n]==True, n, 1]; p[0]=1; p[n_]:= p[n]= g[n]*p[n-1];
Join[{{1}}, Table[Reverse[CoefficientList[Product[x-p[n], {n, 0, m}], x]], {m, 0, 10}]]//Flatten
PROG
(Magma)
R<x>:=PowerSeriesRing(Rationals(), 50);
g:= func< n | IsPrime(n) select n else 1 >;
p:=[1] cat [n le 1 select 1 else g(n)*Self(n-1): n in [1..50]];
A118686:= func< n, k | k eq 0 select 1 else Coefficient(R!( (&*[x-p[j+1]: j in [0..n-1]]) ), n-k) >;
[A118686(n, k): k in [0..n], n in [0..12]]; // G. C. Greubel, Mar 31 2024
(SageMath)
def g(n): return n if is_prime(n) else 1
def p(n): return 1 if n==0 else g(n)*p(n-1)
def A118686(n, k): return 1 if k==0 else ( product(x-p(j) for j in range(n)) ).series(x, n+2).list()[n-k]
flatten([[A118686(n, k) for k in range(n+1)] for n in range(12)]) # G. C. Greubel, Mar 31 2024
CROSSREFS
Cf. primorial numbers A034386, Stirling numbers of the first kind A008275.
Cf. A034386, A008275, A119724, A119489 (row sums of absolute values).
Sequence in context: A158472 A198895 A355635 * A355540 A102610 A203300
KEYWORD
sign,tabl
AUTHOR
Roger L. Bagula, May 20 2006
EXTENSIONS
Edited by N. J. A. Sloane, Oct 08 2006
STATUS
approved