The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A352579 Irregular triangle T(n,k) (n >= 1, 0 <= k <= 2^n-2) read by rows: row n = 1 is [0]; thereafter, T(n,k) = 2*T(n-1,k)+(k mod 2) and T(n,k+2^(n-1)-1) = 2*T(n-1,k)+(k+1 mod 2) for k = 0..2^(n-1)-2; T(n,2^n-2) = 2^n-2. 1
0, 0, 1, 2, 0, 3, 4, 1, 2, 5, 6, 0, 7, 8, 3, 4, 11, 12, 1, 6, 9, 2, 5, 10, 13, 14, 0, 15, 16, 7, 8, 23, 24, 3, 12, 19, 4, 11, 20, 27, 28, 1, 14, 17, 6, 9, 22, 25, 2, 13, 18, 5, 10, 21, 26, 29, 30, 0, 31, 32, 15, 16, 47, 48, 7, 24, 39, 8, 23, 40, 55, 56, 3, 28, 35, 12, 19, 44, 51, 4, 27, 36, 11, 20, 43, 52, 59, 60, 1, 30, 33, 14, 17, 46, 49, 6, 25, 38, 9, 22, 41, 54, 57, 2, 29, 34, 13, 18, 45, 50, 5, 26, 37, 10, 21, 42, 53, 58, 61, 62 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
COMMENTS
The n-th row lists the numbers from 0 to 2^n-2 in such a way that the binary expansions of adjacent terms are disjoint.
Inspired by A109812.
LINKS
N. J. A. Sloane, Row 14 in full: 16383 terms. The numbers from 0 to 2^14-2 arranged so that adjacent terms have disjoint binary expansions. [Note this is not a b-file]
EXAMPLE
The initial rows are:
[0]
[0, 1, 2]
[0, 3, 4, 1, 2, 5, 6]
[0, 7, 8, 3, 4, 11, 12, 1, 6, 9, 2, 5, 10, 13, 14]
[0, 15, 16, 7, 8, 23, 24, 3, 12, 19, 4, 11, 20, 27, 28, 1, 14, 17, 6, 9, 22, 25, 2, 13, 18, 5, 10, 21, 26, 29, 30]
...
MAPLE
T:=proc(n) option remember; local t1, t2, k;
if n=1 then [0];
else
t1:=[seq(2*T(n-1)[k+1] + (k mod 2), k=0..2^(n-1)-2 )];
t2:=[seq(2*T(n-1)[k+1] + (k+1 mod 2), k=0..2^(n-1)-2 )];
[op(t1), op(t2), 2^n-2];
fi;
end;
[seq(T(n), n=1..8)];
MATHEMATICA
T[n_] := T[n] = Module[{t1, t2, k},
If[n == 1, {0},
t1 = Table[2*T[n-1][[k+1]] + Mod[k, 2], {k, 0, 2^(n-1)-2}];
t2 = Table[2*T[n-1][[k+1]] + Mod[k+1, 2], {k, 0, 2^(n-1)-2}];
{t1, t2, 2^n-2} // Flatten]];
Table[T[n], {n, 1, 8}] // Flatten (* Jean-François Alcover, Jul 07 2022, after Maple code *)
CROSSREFS
Cf. A109812.
Sequence in context: A137372 A212844 A066439 * A241319 A287016 A368312
KEYWORD
nonn,tabf
AUTHOR
N. J. A. Sloane, Apr 08 2022
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 21 14:18 EDT 2024. Contains 372738 sequences. (Running on oeis4.)