Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #14 Jul 21 2023 17:28:19
%S 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,
%T 211,212,211,216,330,234,420,1,1,2,1,6,120,24,210,0,1729,1729,1730,
%U 1729,1734,1848,1752,1938,42048,3456,211,211,212,211,216,330,234,420,40530,1938,420
%N 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)).
%H G. C. Greubel, <a href="/A117754/b117754.txt">Rows n = 0..50 of the triangle, flattened</a>
%F 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!.
%e Triangle begins as:
%e 0;
%e 0, 0;
%e 1, 1, 0;
%e 2, 2, 3, 2;
%e 7, 7, 8, 7, 12;
%e 1, 1, 2, 1, 6, 0;
%e 25, 25, 26, 25, 30, 144, 48;
%e 211, 211, 212, 211, 216, 330, 234, 420;
%e 1, 1, 2, 1, 6, 120, 24, 210, 0;
%e 1729, 1729, 1730, 1729, 1734, 1848, 1752, 1938, 42048, 3456;
%e 211, 211, 212, 211, 216, 330, 234, 420, 40530, 1938, 420;
%t f[n_]:= If[PrimeQ[n],1,n];
%t cf[n_]:= cf[n]= If[n==0, 1, f[n]*cf[n-1]]; (* A049614 *)
%t g[n_]:= If[PrimeQ[n], n, 1];
%t p[n_]:= p[n]= If[n==0, 1, g[n]*p[n-1]]; (* A034386 *)
%t f[n_, 1]=cf[n]; f[n_, 2]=p[n]; f[n_, 3]=n!;
%t T[n_, k_]:= Mod[f[n, 1 + Mod[n, 3]] + f[k, 1 + Mod[k, 3]], n!];
%t Table[T[n, k], {n,0,10}, {k,0,n}]//Flatten
%o (Magma)
%o A049614:= func< n | n le 1 select 1 else Factorial(n)/(&*[NthPrime(j): j in [1..#PrimesUpTo(n)]]) >;
%o A034386:= func< n | n eq 0 select 1 else LCM(PrimesInInterval(1,n)) >;
%o function f(n,k)
%o if k eq 1 then return A049614(n);
%o elif k eq 2 then return A034386(n);
%o else return Factorial(n);
%o end if;
%o end function;
%o A117754:= func< n,k | Floor(f(n, 1+(n mod 3))+f( k, 1+(k mod 3))) mod
%o Factorial(n) >;
%o [A117754(n,k): k in [0..n], n in [0..12]]; // _G. C. Greubel_, Jul 21 2023
%o (SageMath)
%o from sympy import primorial
%o def A049614(n): return factorial(n)/product(nth_prime(j) for j in range(1,1+prime_pi(n)))
%o def A034386(n): return 1 if n == 0 else primorial(n, nth=False)
%o def f(n,m):
%o if m==1: return A049614(n)
%o elif m==2: return A034386(n)
%o else: return factorial(n)
%o def A117754(n, k): return (f(n, 1+(n%3))+f(k, 1+(k%3)))%factorial(n)
%o flatten([[A117754(n,k) for k in range(n+1)] for n in range(13)]) # _G. C. Greubel_, Jul 21 2023
%Y Cf. A034386, A049614, A117682, A117753.
%K nonn,tabl
%O 0,7
%A _Roger L. Bagula_, Apr 14 2006
%E Edited by _G. C. Greubel_, Jul 21 2023