cp's OEIS Frontend

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.

A264662 Triangle read by rows: row n contains the first n primes in lexicographical order of their mirrored binary representation.

This page as a plain text file.
%I A264662 #7 Sep 25 2021 14:50:23
%S A264662 2,2,3,2,5,3,2,5,3,7,2,5,3,11,7,2,5,13,3,11,7,2,17,5,13,3,11,7,2,17,5,
%T A264662 13,3,19,11,7,2,17,5,13,3,19,11,7,23,2,17,5,13,29,3,19,11,7,23,2,17,5,
%U A264662 13,29,3,19,11,7,23,31,2,17,5,37,13,29,3,19,11
%N A264662 Triangle read by rows: row n contains the first n primes in lexicographical order of their mirrored binary representation.
%C A264662 T(n,A263856(n)) = A000040(n): A263856(n) = index of prime(n) in n-th row.
%H A264662 Reinhard Zumkeller, <a href="/A264662/b264662.txt">Rows n = 1..250 of triangle, flattened</a>
%e A264662 .   n |   T(n,k), k=1..n
%e A264662 . ----+-----------------------------------------------------------------
%e A264662 .   1 | 2                          01
%e A264662 .   2 | 2  3                       01 11
%e A264662 .   3 | 2  5  3                    01 101   11
%e A264662 .   4 | 2  5  3  7                 01 101   11   111
%e A264662 .   5 | 2  5  3 11  7              01 101   11   1101 111
%e A264662 .   6 | 2  5 13  3 11  7           01 101   1011 11   1101 111
%e A264662 .   7 | 2 17  5 13  3 11  7        01 10001 101  1011 11   1101  111
%e A264662 .   8 | 2 17  5 13  3 19 11  7     01 10001 101  1011 11   11001 1101 111
%e A264662 .   9 | 2 17  5 13  3 19 11  7 23
%e A264662 .  10 | 2 17  5 13 29  3 19 11  7 23
%e A264662 .  11 | 2 17  5 13 29  3 19 11  7 23 31
%e A264662 .  12 | 2 17  5 37 13 29  3 19 11  7 23 31
%e A264662 .  13 | 2 17 41  5 37 13 29  3 19 11  7 23 31
%e A264662 .  14 | 2 17 41  5 37 13 29  3 19 11 43 7  23 31
%e A264662 .  15 | 2 17 41  5 37 13 29  3 19 11 43  7 23 47 31
%e A264662 .  16 | 2 17 41  5 37 53 13 29  3 19 11 43  7 23 47 31
%e A264662 .  17 | 2 17 41  5 37 53 13 29  3 19 11 43 59  7 23 47 31
%e A264662 .  18 | 2 17 41  5 37 53 13 29 61  3 19 11 43 59  7 23 47 31
%e A264662 .  19 | 2 17 41  5 37 53 13 29 61  3 67 19 11 43 59  7 23 47 31
%e A264662 .  20 | 2 17 41  5 37 53 13 29 61  3 67 19 11 43 59  7 71 23 47 31
%t A264662 row[n_] := SortBy[Prime[Range[n]], StringJoin[ToString /@ Reverse[IntegerDigits[#, 2]]]&];
%t A264662 Table[row[n], {n, 1, 20}] // Flatten (* _Jean-François Alcover_, Sep 25 2021 *)
%o A264662 (Haskell)
%o A264662 import Data.List (inits, sortBy); import Data.Function (on)
%o A264662 a264662 n k = a264662_tabl !! (n-1) !! (n-1)
%o A264662 a264662_row n = a264662_tabl !! (n-1)
%o A264662 a264662_tabl = map (sortBy (compare `on` (reverse . show . a007088))) $
%o A264662                    tail $ inits a000040_list
%Y A264662 Cf. A263846, A000040, A007088, A007504 (row sums), A264666 (partial row products), A037126 (rows sorted naturally).
%K A264662 nonn,tabl
%O A264662 1,1
%A A264662 _Reinhard Zumkeller_, Nov 20 2015