OFFSET
1,2
COMMENTS
LINKS
Clark Kimberling, Antidiagonals n = 1..60, flattened
Clark Kimberling and John E. Brown, Partial Complements and Transposable Dispersions, J. Integer Seqs., Vol. 7, 2004.
EXAMPLE
Northwest corner:
1 4 9 16 25 37 51 67
2 6 12 20 30 43 58 76
3 8 15 24 35 49 65 83
5 11 19 29 41 56 73 92
7 14 23 34 47 63 81 101
10 18 28 40 54 71 90 111
MATHEMATICA
PROG
(PARI)
r = sqrt(5);
z = 100;
s(n) = if(n<1, 1, s(n - 1) + 1 + floor(n*r));
p(n) = n + 1 + sum(k=0, n, floor((n - k)/r));
u = v = vector(z + 1);
for(n=1, 101, (v[n] = s(n - 1)));
for(n=1, 101, (u[n] = p(n - 1)));
w(i, j) = u[i] + v[j] + (i - 1) * (j - 1) - 1;
tabl(nn) = {for(n=1, nn, for(k=1, n, print1(w(k, n - k + 1), ", "); );
print(); ); };
tabl(20) \\ Indranil Ghosh, Mar 21 2017
(Python)
from sympy import sqrt
import math
def s(n): return 1 if n<1 else s(n - 1) + 1 + int(math.floor(n*sqrt(5)))
def p(n): return n + 1 + sum([int(math.floor((n - k)/sqrt(5))) for k in range(0, n+1)])
v=[s(n) for n in range(0, 101)]
u=[p(n) for n in range(0, 101)]
def w(i, j): return u[i - 1] + v[j - 1] + (i - 1) * (j - 1) - 1
for n in range(1, 11):
....print [w(k, n - k + 1) for k in range(1, n + 1)] # Indranil Ghosh, Mar 21 2017
CROSSREFS
KEYWORD
AUTHOR
Clark Kimberling, Mar 19 2017
EXTENSIONS
Edited by Clark Kimberling, Feb 27 2018
STATUS
approved