OFFSET
1,2
LINKS
G. C. Greubel, Rows n = 1..50 of the triangle, flattened
FORMULA
EXAMPLE
First few rows of the triangle:
1;
2, 1;
2, 1, 1;
3, 1, 1, 1;
4, 0, 0, 1, 1;
4, 3, 1, 0, 1, 1;
6, 0, 0, 0, 0, 1, 1;
6, 2, 1, 1, 0, 0, 1, 1;
...
MATHEMATICA
A054523[n_, k_]:= If[n==1, 1, If[Divisible[n, k], EulerPhi[n/k], 0]];
T[n_, k_]:= If[k<n, Sum[A054523[n, j+k], {j, 0, 1}], 1];
Table[T[n, k], {n, 16}, {k, n}]//Flatten (* G. C. Greubel, Feb 11 2024 *)
PROG
(Magma)
A054523:= func< n, k | n eq 1 select 1 else (n mod k) eq 0 select EulerPhi(Floor(n/k)) else 0 >;
[A129479(n, k): k in [1..n], n in [1..16]]; // G. C. Greubel, Feb 11 2024
(SageMath)
def A054523(n, k):
if (k==n): return 1
elif (n%k): return 0
else: return euler_phi(n//k)
def A129479(n, k):
if k<0 or k>n: return 0
elif k==n: return 1
flatten([[A129479(n, k) for k in range(1, n+1)] for n in range(1, 17)]) # G. C. Greubel, Feb 11 2024
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Gary W. Adamson, Apr 17 2007
STATUS
approved