login
A117754
Triangle T(n, k) = (f(n, 1 + (n mod 3)) + f(k, 1 + (k mod 3))) mod n!, read by rows (see formula for f(n, k)).
1
0, 0, 0, 1, 1, 0, 2, 2, 3, 2, 7, 7, 8, 7, 12, 1, 1, 2, 1, 6, 0, 25, 25, 26, 25, 30, 144, 48, 211, 211, 212, 211, 216, 330, 234, 420, 1, 1, 2, 1, 6, 120, 24, 210, 0, 1729, 1729, 1730, 1729, 1734, 1848, 1752, 1938, 42048, 3456, 211, 211, 212, 211, 216, 330, 234, 420, 40530, 1938, 420
OFFSET
0,7
FORMULA
T(n, k) = (f(n, 1 + (n mod 3)) + f(k, 1 + (k mod 3))) mod n!, where f(n, 1) = A049614(n), f(n, 2) = A034386(n), and f(n, 3) = n!.
EXAMPLE
Triangle begins as:
0;
0, 0;
1, 1, 0;
2, 2, 3, 2;
7, 7, 8, 7, 12;
1, 1, 2, 1, 6, 0;
25, 25, 26, 25, 30, 144, 48;
211, 211, 212, 211, 216, 330, 234, 420;
1, 1, 2, 1, 6, 120, 24, 210, 0;
1729, 1729, 1730, 1729, 1734, 1848, 1752, 1938, 42048, 3456;
211, 211, 212, 211, 216, 330, 234, 420, 40530, 1938, 420;
MATHEMATICA
f[n_]:= If[PrimeQ[n], 1, n];
cf[n_]:= cf[n]= If[n==0, 1, f[n]*cf[n-1]]; (* A049614 *)
g[n_]:= If[PrimeQ[n], n, 1];
p[n_]:= p[n]= If[n==0, 1, g[n]*p[n-1]]; (* A034386 *)
f[n_, 1]=cf[n]; f[n_, 2]=p[n]; f[n_, 3]=n!;
T[n_, k_]:= Mod[f[n, 1 + Mod[n, 3]] + f[k, 1 + Mod[k, 3]], n!];
Table[T[n, k], {n, 0, 10}, {k, 0, n}]//Flatten
PROG
(Magma)
A049614:= func< n | n le 1 select 1 else Factorial(n)/(&*[NthPrime(j): j in [1..#PrimesUpTo(n)]]) >;
A034386:= func< n | n eq 0 select 1 else LCM(PrimesInInterval(1, n)) >;
function f(n, k)
if k eq 1 then return A049614(n);
elif k eq 2 then return A034386(n);
else return Factorial(n);
end if;
end function;
A117754:= func< n, k | Floor(f(n, 1+(n mod 3))+f( k, 1+(k mod 3))) mod
Factorial(n) >;
[A117754(n, k): k in [0..n], n in [0..12]]; // G. C. Greubel, Jul 21 2023
(SageMath)
from sympy import primorial
def A049614(n): return factorial(n)/product(nth_prime(j) for j in range(1, 1+prime_pi(n)))
def A034386(n): return 1 if n == 0 else primorial(n, nth=False)
def f(n, m):
if m==1: return A049614(n)
elif m==2: return A034386(n)
else: return factorial(n)
def A117754(n, k): return (f(n, 1+(n%3))+f(k, 1+(k%3)))%factorial(n)
flatten([[A117754(n, k) for k in range(n+1)] for n in range(13)]) # G. C. Greubel, Jul 21 2023
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Roger L. Bagula, Apr 14 2006
EXTENSIONS
Edited by G. C. Greubel, Jul 21 2023
STATUS
approved