The OEIS is supported by the many generous donors to the OEIS Foundation.

A283962
Interspersion of the signature sequence of sqrt(1/2).
5
1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 10, 12, 13, 15, 17, 14, 16, 18, 20, 22, 25, 19, 21, 23, 26, 28, 31, 34, 24, 27, 29, 32, 35, 38, 41, 44, 30, 33, 36, 39, 42, 46, 49, 52, 56, 37, 40, 43, 47, 50, 54, 58, 61, 65, 69, 45, 48, 51, 55, 59, 63, 67, 71, 75, 79, 84, 53
OFFSET
1,2
Every row intersperses all other rows, and every column intersperses all other columns. The array is the dispersion of the complement of (column 1 = A022776).
R(n,m) = position of n*r + m when all the numbers k*r + h, where r = sqrt(2), k >= 1, h >= 0, are jointly ranked. - Clark Kimberling, Oct 06 2017
Clark Kimberling and John E. Brown, Partial Complements and Transposable Dispersions, J. Integer Seqs., Vol. 7, 2004.
FORMULA
R(i,j) = R(i,0) + R(0,j) + i*j - 1, for i>=1, j>=1.
EXAMPLE
Northwest corner of R:
1 2 4 7 10 14 19 24 30
3 5 8 12 16 21 27 33 40
6 9 13 18 23 29 36 43 51
11 15 20 26 32 39 47 44 64
17 22 28 35 42 50 59 68 78
25 31 38 46 54 63 73 83 94
MATHEMATICA
r = Sqrt[1/2]; z = 100;
s[0] = 1; s[n_] := s[n] = s[n - 1] + 1 + Floor[n*r];
u = Table[n + 1 + Sum[Floor[(n - k)/r], {k, 0, n}], {n, 0, z}] (* A022775, col 1 of A283962 *)
v = Table[s[n], {n, 0, z}] (* A022776, row 1 of A283962*)
w[i_, j_] := u[[i]] + v[[j]] + (i - 1)*(j - 1) - 1;
Grid[Table[w[i, j], {i, 1, 10}, {j, 1, 10}]] (* A283962, array *)
Flatten[Table[w[k, n - k + 1], {n, 1, 20}, {k, 1, n}]] (* A283962, sequence *)
PROG
(PARI)
r = sqrt(1/2);
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(10) \\ 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(1/2)))
def p(n): return n + 1 + sum([int(math.floor((n - k)/sqrt(1/2))) 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
nonn,tabl,easy
AUTHOR
Clark Kimberling, Mar 19 2017
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified September 20 10:44 EDT 2024. Contains 376068 sequences. (Running on oeis4.)