This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A322469 #42 Oct 16 2020 18:50:32 %S A322469 3,1,2,7,11,15,5,10,19,23,27,9,18,6,12,4,8,31,35,39,13,26,43,47,51,17, %T A322469 34,55,59,63,21,42,14,28,67,71,75,25,50,79,83,87,29,58,91,95,99,33,66, %U A322469 22,44,103,107,111,37,74 %N A322469 Irregular table: row i = 1, 2, 3, ... starts with 4*i - 1; then, as long as the number is divisible by 3, the next two terms are the result of dividing it by 3, then multiplying it by 2. %C A322469 The sequence is the flattened form of an irregular table T(i, j) (see the example below) which has rows i >= 1 consisting of subsequences of varying length as defined by the following algorithm: %C A322469 j := 1; T(i, j) := 4 * i - 1; %C A322469 while T(i, j) is divisible by 3 do %C A322469 T(i, j + 1) := T(i, j) / 3; %C A322469 T(i, j + 2) := T(i, j + 1) * 2; %C A322469 j := j + 2; %C A322469 end while %C A322469 The algorithm always stops. %C A322469 The first rows which are longer than any previous row are 1, 7, 61, 547, 4921 ... (A066443). %C A322469 Property: The sequence is a permutation of the natural numbers > 0. %C A322469 Proof: (Start) %C A322469 The values in the columns j of T for row indexes i of the form i = e * k + f, %C A322469 k >= 0, if such columns are present, have the following residues modulo some power of 2: %C A322469 j | Op. | Form of i | T(i, j) | Residues | Residues not yet covered %C A322469 --+------+ -------------+--------------+------------+------------------------- %C A322469 1 | | 1 * k + 1 | 4 * k + 3 | 3 mod 4 | 0, 1, 2 mod 4 %C A322469 2 | / 3 | 3 * k + 1 | 4 * k + 1 | 1 mod 4 | 0, 2, 4, 6 mod 8 %C A322469 3 | * 2 | 3 * k + 1 | 8 * k + 2 | 2 mod 8 | 0, 4, 6 mod 8 %C A322469 4 | / 3 | 9 * k + 7 | 8 * k + 6 | 6 mod 8 | 0, 4, 8, 12 mod 16 %C A322469 5 | * 2 | 9 * k + 7 | 16 * k + 12 | 12 mod 16 | 0, 4, 8 mod 16 %C A322469 6 | / 3 | 27 * k + 7 | 16 * k + 4 | 4 mod 16 | 0, 8, 16, 24 mod 32 %C A322469 7 | * 2 | 27 * k + 7 | 32 * k + 8 | 8 mod 32 | 0, 16, 24 mod 32 %C A322469 8 | / 3 | 81 * k + 61 | 32 * k + 24 | 24 mod 32 | 0, 16, 32, 48 mod 64 %C A322469 9 | * 2 | 81 * k + 61 | 64 * k + 48 | 48 mod 64 | 0, 16, 32 mod 64 %C A322469 ..| ... | e * k + f | g * k + m | m mod g | 0, ... %C A322469 The variables in the last, general line can be computed from the operations in the algorithm. They are the following: %C A322469 e = 3^floor(j / 2) %C A322469 f = A066443(floor(j / 4)) with A066443(n) = (3^(2*n+1)+1)/4 %C A322469 g = 2^floor((j + 3) / 2) %C A322469 m = 2^floor((j - 1) / 4) * A084101(j + 1 mod 4) with A084101(0..3) = (1, 3, 3, 1) %C A322469 The residues m in each column and therefore the T(i, j) are all disjoint. For numbers which contain a sufficiently high power of 3, the length of the rows in T grows beyond any limit, and the numbers containing any power of 2 will finally be covered. %C A322469 (End) %C A322469 All numbers > 0 up to and including 2^(2*j + 1) appear in the rows in T up to and including A066443(j). For example, 4096 and 8192 are the trailing elements in row 398581 = A066443(6). %C A322469 Length of row n = 1, 2, ... is 1+2*A007949(A004767(n-1)). - _M. F. Hasler_, Dec 10 2018 %C A322469 From _Georg Fischer_, Oct 16 2020: (Start) %C A322469 Whenever a row of T is longer than any previous rows, it defines the start values of the arithmetic progressions in the additional columns. These start values form the sequence A308709. %C A322469 There is a hierarchy of such permutations of the positive integers derived by selecting and mapping the terms of the form 6*k - 2 to k: %C A322469 Level 0: A307407, nodes in the graph of the "3x+1" or Collatz problem %C A322469 Level 1: A322469 (this sequence), inverse is A338208 %C A322469 Level 2: A307048, inverse is A338207 %C A322469 Level 3: A160016, inverse is A338206 %C A322469 Level >= 4: A000027, the positive integers %C A322469 Conjectures (verified for k = 0..11): %C A322469 a(A338186(k)) = 4^k. %C A322469 If A338186(k) <= j < A338186(k+1) then a(A338186(k)) <= a(j). %C A322469 (End) %H A322469 Alois P. Heinz, <a href="/A322469/b322469.txt">Rows n = 1..10000, flattened</a> %H A322469 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the positive integers</a> %e A322469 Table T(i, j) begins: %e A322469 i\j 1 2 3 4 5 6 7 %e A322469 ------------------------- %e A322469 1: 3 1 2 %e A322469 2: 7 %e A322469 3: 11 %e A322469 4: 15 5 10 %e A322469 5: 19 %e A322469 6: 23 %e A322469 7: 27 9 18 6 12 4 8 %p A322469 T:= proc(n) local m, l; m:= 4*n-1; l:= m; %p A322469 while irem(m, 3, 'm')=0 do %p A322469 l:= l, m; m:= m*2; l:=l, m; %p A322469 od; l %p A322469 end: %p A322469 seq(T(n), n=1..40); # _Alois P. Heinz_, Dec 10 2018 %t A322469 s={}; Do[a=4n-1; AppendTo[s,a]; While[Divisible[a, 3], a/=3; AppendTo[s, a]; a*=2; AppendTo[s, a]], {n, 1, 30}]; s (* _Amiram Eldar_, Dec 10 2018 *) %o A322469 (PARI) apply( A322469_row(n,L=[n=4*n+3])={while(n%3==0,L=concat(L,[n\=3, n*=2]));L}, [0..99]) \\ Use concat(%) to flatten the table if desired. - _M. F. Hasler_, Dec 10 2018 %o A322469 (Perl) use integer; my $n = 1; my $i = 1; %o A322469 while ($i <= 1000) { # next row %o A322469 my $an = 4 * $i - 1; print "$n $an\n"; $n ++; %o A322469 while ($an % 3 == 0) { %o A322469 $an /= 3; print "$n $an\n"; $n ++; %o A322469 $an *= 2; print "$n $an\n"; $n ++; %o A322469 } # while divisible by 3 %o A322469 $i ++; %o A322469 } # while next row - _Georg Fischer_, Dec 12 2018 %o A322469 (Sage) %o A322469 def A322469_list(len): %o A322469 L = [] %o A322469 for n in (1..len): %o A322469 a = 4*n - 1 %o A322469 L.append(a) %o A322469 while 3.divides(a): %o A322469 a //= 3 %o A322469 L.append(a) %o A322469 a <<= 1 %o A322469 L.append(a) %o A322469 return L %o A322469 A322469_list(28) # _Peter Luschny_, Dec 10 2018 %Y A322469 Cf. A066443, A084101, A160016 (level 3), A307048 (level 2), A307407 (level 0), A308709, A338186, A338206, A338207, A338208. %K A322469 nonn,tabf,easy %O A322469 1,1 %A A322469 _Georg Fischer_, Dec 09 2018