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”).
%I #8 Dec 07 2019 12:18:28
%S 1,3,2,6,5,4,11,9,8,7,17,15,13,12,10,25,22,20,18,16,14,34,31,28,26,23,
%T 21,19,44,41,38,35,32,29,27,24,56,52,49,46,42,39,36,33,30,69,65,61,58,
%U 54,50,47,43,40,37,84,79,75,71,67,63,59,55,51,48,45,100
%N Interspersion of the signature sequence of sqrt(2).
%C Row n is the ordered sequence of numbers k such that A007336(k)=n. As a sequence, A283939 is a permutation of the positive integers. As an array, A283939 is the joint-rank array (defined at A182801) of the numbers {i+j*r}, for i>=1, j>=1, where r = sqrt(2). This is a transposable interspersion; i.e., every row intersperses all other rows, and every column intersperses all other columns.
%H Clark Kimberling, <a href="/A283939/b283939.txt">Antidiagonals n = 1..60, flattened</a>
%H Clark Kimberling and John E. Brown, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL7/Kimberling/kimber67.html">Partial Complements and Transposable Dispersions</a>, J. Integer Seqs., Vol. 7, 2004.
%e Northwest corner:
%e 1 3 6 11 17 25 34 44 56
%e 2 5 9 15 22 31 41 52 65
%e 4 8 13 20 28 38 49 61 75
%e 7 12 18 26 35 46 58 71 86
%e 10 16 23 32 42 54 67 81 97
%e 14 21 29 39 50 63 77 91 109
%t r = Sqrt[2]; z = 100;
%t s[0] = 1; s[n_] := s[n] = s[n - 1] + 1 + Floor[n*r];
%t u = Table[n + 1 + Sum[Floor[(n - k)/r], {k, 0, n}], {n, 0, z}] (* A022776, col 1 of A283939 *)
%t v = Table[s[n], {n, 0, z}] (* A022775, row 1 of A283939*)
%t w[i_, j_] := u[[i]] + v[[j]] + (i - 1)*(j - 1) - 1;
%t Grid[Table[w[i, j], {i, 1, 10}, {j, 1, 10}]] (* A283939, array *)
%t p = Flatten[Table[w[k, n - k + 1], {n, 1, 20}, {k, 1, n}]] (* A283939, sequence *)
%o (PARI)
%o r = sqrt(2);
%o z = 100;
%o s(n) = if(n<1, 1, s(n - 1) + 1 + floor(n*r));
%o p(n) = n + 1 + sum(k=0, n, floor((n - k)/r));
%o u = v = vector(z + 1);
%o for(n=1, 101, (v[n] = s(n - 1)));
%o for(n=1, 101, (u[n] = p(n - 1)));
%o w(i, j) = u[i] + v[j] + (i - 1) * (j - 1) - 1;
%o tabl(nn) = {for(n=1, nn, for(k=1, n, print1(w(k, n - k + 1), ", "); );print(); ); };
%o tabl(10) \\ _Indranil Ghosh_, Mar 21 2017
%o (Python)
%o from sympy import sqrt
%o import math
%o def s(n): return 1 if n<1 else s(n - 1) + 1 +
%o int(math.floor(n*sqrt(2)))
%o def p(n): return n + 1 + sum([int(math.floor((n - k)/sqrt(2))) for k in range(0, n+1)])
%o v=[s(n) for n in range(0, 101)]
%o u=[p(n) for n in range(0, 101)]
%o def w(i,j): return u[i - 1] + v[j - 1] + (i - 1) * (j - 1) - 1
%o for n in range(1, 11):
%o ....print [w(k, n - k + 1) for k in range(1, n + 1)] # _Indranil Ghosh_, Mar 21 2017
%Y Cf. A007336, A002193, A022776, A283962.
%K nonn,tabl,easy
%O 1,2
%A _Clark Kimberling_, Mar 19 2017