login
A283940
Interspersion of the signature sequence of sqrt(3).
1
1, 3, 2, 7, 5, 4, 13, 10, 8, 6, 20, 17, 14, 11, 9, 29, 25, 22, 18, 15, 12, 40, 35, 31, 27, 23, 19, 16, 53, 47, 42, 37, 33, 28, 24, 21, 67, 61, 55, 49, 44, 39, 34, 30, 26, 83, 76, 70, 63, 57, 51, 46, 41, 36, 32, 101, 93, 86, 79, 72, 65, 59, 54, 48, 43, 38
OFFSET
1,2
COMMENTS
Row n is the ordered sequence of numbers k such that A007337(k)=n. As a sequence, A283940 is a permutation of the positive integers. This is a transposable interspersion; i.e., every row intersperses all other rows, and every column intersperses all other columns.
LINKS
Clark Kimberling and John E. Brown, Partial Complements and Transposable Dispersions, J. Integer Seqs., Vol. 7, 2004.
EXAMPLE
Northwest corner:
1 3 7 13 20 29 40 53
2 5 10 17 25 35 47 61
4 8 14 22 31 42 55 70
6 11 18 27 37 49 63 79
9 15 23 33 44 57 72 89
12 19 28 39 51 65 81 99
16 24 34 46 59 74 91 110
21 30 41 54 68 84 102 122
MATHEMATICA
r = Sqrt[3]; 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}] (* A022778, col 1 of A283940 *)
v = Table[s[n], {n, 0, z}] (* A022777, row 1 of A283940*)
w[i_, j_] := u[[i]] + v[[j]] + (i - 1)*(j - 1) - 1;
Grid[Table[w[i, j], {i, 1, 10}, {j, 1, 10}]] (* A283940, array *)
Flatten[Table[w[k, n - k + 1], {n, 1, 20}, {k, 1, n}]] (* A283940, sequence *)
PROG
(PARI)
r = sqrt(3);
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(3)))
def p(n): return n + 1 + sum([int(math.floor((n - k)/sqrt(3))) 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