|
|
A342261
|
|
Irregular triangular array T(n,k) = m read by rows. Row n lists all solutions m < 3^n, where A340407(3^n*j - m) = n is true for all j > 0, sorted in ascending order.
|
|
3
|
|
|
0, 1, 8, 2, 4, 5, 16, 13, 14, 22, 34, 38, 52, 74, 77, 20, 25, 40, 50, 88, 130, 146, 173, 185, 203, 209, 223, 229, 230, 238, 241, 130, 146, 173, 185, 203, 209, 223, 229, 230, 238, 241, 41, 61, 76, 104, 106, 121, 128, 157, 254, 266, 292, 311, 403, 412, 430, 445, 454, 493
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
COMMENTS
|
Each row n has 2^(n-1) values.
In all rows other than the first row of T(n,k), there are exactly 2^(n-2) numbers of the form 3*p + 1 and the same number of numbers of the form 3*q - 1.
Each integer has a unique representation of the form 3^n*j - T(n,k).
|
|
LINKS
|
|
|
EXAMPLE
|
Triangle T(n,k) begins:
0;
1, 8;
2, 4, 5, 16;
13, 14, 22, 34, 38, 52, 74, 77;
|
|
PROG
|
(MATLAB)
maxtest = 10;
for row = 1:max_row
m = 0;
for k = 1:2^(row-1)
test = d((1:maxtest)*(3^row)-m);
while ~all(test == test(1))||(test(1) ~= row)
m = m+1;
test = d((1:maxtest)*(3^row)-m);
end
t(row, k) = m;
t = t+1;
end
end
end
for p = 1:max_p
s = 6*p -2;
c = 0;
while mod(s, 3) ~= 0
if mod(s, 3) == 2
c = c+1;
end
end
d(p) = c;
end
end
if mod(n, 3) == 2
b = (2*n - 1)/3;
else
b = 2*n;
end
end
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,tabf
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|