[go: up one dir, main page]

login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A129479
Triangle read by rows: A054523 * A097806 as infinite lower triangular matrices..
2
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, 6, 2, 2, 0, 0, 0, 0, 1, 1, 8, 4, 0, 1, 1, 0, 0, 0, 1, 1, 10, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 6, 4, 4, 2, 1, 1, 0, 0, 0, 0, 1, 1, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1
OFFSET
1,2
FORMULA
Sum_{k=1..n} T(n, k) = A053158(n) (row sums).
T(n, 1) = A126246(n).
From G. C. Greubel, Feb 11 2024: (Start)
T(n, k) = A054523(n, k) + A054523(n, k+1) for k < n, otherwise 1.
T(2*n-1, n) = A019590(n).
T(2*n, n) = A054977(n).
T(2*n+1, n) = A000038(n).
T(3*n, n) = A063524(n-1).
T(3*n-2, n) = A183918(n+2).
Sum_{k=1..n} (-1)^(k-1) * T(n, k) = A000010(n). (End)
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:= func< n, k | k le n-1 select A054523(n, k) + A054523(n, k+1) else 1 >;
[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
else: return A054523(n, k) + A054523(n, k+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
Cf. A000010 (alternating row sums), A053158 (row sums).
Sequence in context: A084610 A303336 A361462 * A261095 A249809 A075104
KEYWORD
nonn,tabl
AUTHOR
Gary W. Adamson, Apr 17 2007
STATUS
approved