A340429 Array T(n, k) is the number x such that frac(x*phi) + frac(n*phi)*frac(k*phi) = 1 where phi is the golden ratio A001622 and frac(y) is the fractional part of y, read by antidiagonals.
1, 3, 3, 4, 8, 4, 6, 11, 11, 6, 8, 16, 15, 16, 8, 9, 21, 22, 22, 21, 9, 11, 24, 29, 32, 29, 24, 11, 12, 29, 33, 42, 42, 33, 29, 12, 14, 32, 40, 48, 55, 48, 40, 32, 14, 16, 37, 44, 58, 63, 63, 58, 44, 37, 16, 17, 42, 51, 64, 76, 72, 76, 64, 51, 42, 17
Offset: 1
Examples
Array begins: 1 3 4 6 8 ... 3 8 11 16 21 ... 4 11 15 22 29 ... 6 16 22 32 42 ... 8 21 29 42 55 ... ...
Links
- Paolo Xausa, Table of n, a(n) for n = 1..11325 (first 150 antidiagonals, flattened).
Crossrefs
Programs
-
Maple
h := n -> ceil(2*n / (sqrt(5) + 3)): T := (n, k) -> 3*n*k - n*h(k) - k*h(n): seq(lprint(seq(T(n, k), k = 1..9)), n = 1..7); # Peter Luschny, Mar 21 2024
-
Mathematica
A340429[n_, k_] := Floor[n * GoldenRatio] * k + Floor[k * GoldenRatio] * n - n * k; Table[A340429[n - k + 1, k], {n, 15}, {k, n}] (* Paolo Xausa, Mar 21 2024 *)
-
PARI
f(n) = 2*floor(n*(1+sqrt(5))/2) - 3*n; \\ A339765 T(n, k) = 2*n*k + f(n)*k/2 + f(k)*n/2;
Formula
T(n, k) = T(k, n), array is symmetric.
T(n, k) = 3*n*k - n*h(k) - k*h(n) where h(n) = ceiling(2*n / (sqrt(5) + 3)) = A189663(n + 1). - Peter Luschny, Mar 21 2024