OFFSET
0,3
COMMENTS
Sequence yielding an ordering of N*N derived from a family of recurrences.
For any integer k define h(k,1)=k and for m>1 define h(k,m)=h(k,m-1)+2*((-h(k,m-1)) mod m) where "r mod s" denotes least nonnegative residue of r modulo s [informally, h(k,m) is got by "reflecting" h(k,m-1) in the least multiple of m that is >=h(k,m-1)]. Then for fixed k>=0 there are integers c(k), b(k), m(k) such that for all m>m(k) we have h(k,2*m+1)-h(k,2*m)=2*c(k) and h(k,2*m+2)-h(k,2*m+1)=2*b(k). [In the terms of the function d defined in the Name, c(k) = d(k, 2*m+1) and b(k) = d(k, 2*m+2) for all m>m(k).]
For all n we have c(2*n+1)=c(2*n) and b(2*n+1)=1+b(2*n). Moreover b(2*n) is even for all n. The function n->(c(2*n),b(2*n)/2) is a bijection from the nonnegative integers N to N*N. It is "monotone" in the sense that n<=n' whenever c(2*n)<=c(2*n') and b(2*n)<=b(2*n').
This sequence is a(n) = c(2*n).
The results on which the definition is based are not yet proved, but they are plausible and overwhelmingly supported by numerical evidence.
For each fixed m, k->h(k,m) is a bijection Z->Z (this is easy!). However for k<0 the sequence h(k,m) does not have the pseudo-periodic property we have used in defining c(k) and b(k).
m(k) appears to be O(sqrt k).
FORMULA
It appears that a(n) = A319573(A252448(2*n+1)). [discovered by Sequence Machine] Also, it appears that b(2*n) = A319572(A252448(2*n)), where b is described above. - Andrey Zabolotskiy, Apr 28 2023
EXAMPLE
h(18,m) for m>=1 goes 18,18,18,22,28,32,38,42,48...so we can take m(18) = 2, then 2*c(18)=28-22=38-32=48-42=...=6, so a(9) = c(18) = 3 and similarly b(18) = 2.
MATHEMATICA
d[h_, m_] := (Ceiling[#] - # &[h/m]) m;
a[n_] := Module[{h = 2 n, b, c, m = 1},
While[m <= Max[5, n], (*condition is conjectural*)
m++; b = d[h, m]; h += 2 b;
m++; c = d[h, m]; h += 2 c];
c];
Table[a[n], {n, 0, 93}]; (* Andrey Zabolotskiy, Apr 29 2023 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alex Abercrombie, Feb 15 2008
EXTENSIONS
Edited by Andrey Zabolotskiy, Apr 29 2023
STATUS
approved