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.

Showing 1-3 of 3 results.

A264647 Smallest number m such that A263856(m) = n.

Original entry on oeis.org

1, 2, 6, 4, 10, 8, 79, 199, 9, 108, 11, 29, 17, 15, 40, 80, 20, 59, 306, 22, 169, 38, 27, 82, 287, 41, 49, 209, 47, 135, 31, 36, 127, 112, 123, 162, 46, 89, 63, 54, 581, 43, 56, 770, 67, 48, 134, 52, 142, 69, 58, 101, 382, 466, 75, 64, 273, 95, 117, 126, 72
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 19 2015

Keywords

Comments

a(6949) > 22700000 if it exists. - Chai Wah Wu, Feb 01 2016

Crossrefs

Cf. A263856.

Programs

  • Haskell
    import Data.List (elemIndex); import Data.Maybe (fromJust)
    a264647 = (+ 1) . fromJust . (`elemIndex` a263856_list)
  • Mathematica
    f[p_] := f[p] = StringJoin @@ ToString /@ Reverse[IntegerDigits[p, 2]];
    S[n_] := S[n] = SortBy[Prime[Range[n]], f];
    A263856[n_] := A263856[n] = FirstPosition[S[n], Prime[n]][[1]];
    a[n_] := a[n] = For[m = 1, True, m++, If[A263856[m] == n, Return[m]]];
    Table[Print[n, " ", a[n]]; a[n], {n, 1, 391}] (* Jean-François Alcover, Sep 22 2021 *)

Formula

A263856(a(n)) = n and A263856(m) != n for m < a(n).

A264596 Let S_n be the list of the first n nonnegative numbers written in binary, with least significant bits on the left, and sorted into lexicographic order; a(n) = position of n in S_n, starting indexing at 0.

Original entry on oeis.org

0, 1, 1, 3, 1, 4, 3, 7, 1, 6, 4, 10, 3, 10, 7, 15, 1, 10, 6, 16, 4, 15, 10, 22, 3, 16, 10, 24, 7, 22, 15, 31, 1, 18, 10, 28, 6, 25, 16, 36, 4, 25, 15, 37, 10, 33, 22, 46, 3, 28, 16, 42, 10, 37, 24, 52, 7, 36, 22, 52, 15, 46, 31, 63, 1, 34, 18, 52, 10, 45, 28
Offset: 0

Views

Author

N. J. A. Sloane, Nov 19 2015

Keywords

Examples

			S_0 = [0], a(0) = 0;
S_1 = [0, 1], a(1) = 1;
S_2 = [0, 01, 1], a(2) = 1;
S_3 = [0, 01, 1, 11], a(3) = 3;
S_4 = [0, 001, 01, 1, 11], a(4) = 1;
S_5 = [0, 001, 01, 1, 101, 11], a(5) = 4;
S_6 = [0, 001, 01, 011, 1, 101, 11], a(6) = 3;
S_7 = [0, 001, 01, 011, 1, 101, 11, 111], a(7) = 7;
S_8 = [0, 0001, 001, 01, 011, 1, 101, 11, 111], a(8) = 1;
...
		

Crossrefs

Suggested by John Bodeen's A263856.
Cf. A188215.

Programs

Formula

a(2^n) = 1.
a(2^n-1) = 2^n-1.
a(2n) = a(n), a(2n+1) = a(n) + n+1, a(0) = 0. - Alois P. Heinz, Nov 19 2015
Conjecture: a(n) = n*(n + 3)/2 - A007814(A293290(n)) for n > 0. - Velin Yanev, Sep 12 2017

Extensions

More terms from Alois P. Heinz, Nov 19 2015

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

Original entry on oeis.org

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, 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, 13, 29, 3, 19, 11, 7, 23, 31, 2, 17, 5, 37, 13, 29, 3, 19, 11
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 20 2015

Keywords

Comments

T(n,A263856(n)) = A000040(n): A263856(n) = index of prime(n) in n-th row.

Examples

			.   n |   T(n,k), k=1..n
. ----+-----------------------------------------------------------------
.   1 | 2                          01
.   2 | 2  3                       01 11
.   3 | 2  5  3                    01 101   11
.   4 | 2  5  3  7                 01 101   11   111
.   5 | 2  5  3 11  7              01 101   11   1101 111
.   6 | 2  5 13  3 11  7           01 101   1011 11   1101 111
.   7 | 2 17  5 13  3 11  7        01 10001 101  1011 11   1101  111
.   8 | 2 17  5 13  3 19 11  7     01 10001 101  1011 11   11001 1101 111
.   9 | 2 17  5 13  3 19 11  7 23
.  10 | 2 17  5 13 29  3 19 11  7 23
.  11 | 2 17  5 13 29  3 19 11  7 23 31
.  12 | 2 17  5 37 13 29  3 19 11  7 23 31
.  13 | 2 17 41  5 37 13 29  3 19 11  7 23 31
.  14 | 2 17 41  5 37 13 29  3 19 11 43 7  23 31
.  15 | 2 17 41  5 37 13 29  3 19 11 43  7 23 47 31
.  16 | 2 17 41  5 37 53 13 29  3 19 11 43  7 23 47 31
.  17 | 2 17 41  5 37 53 13 29  3 19 11 43 59  7 23 47 31
.  18 | 2 17 41  5 37 53 13 29 61  3 19 11 43 59  7 23 47 31
.  19 | 2 17 41  5 37 53 13 29 61  3 67 19 11 43 59  7 23 47 31
.  20 | 2 17 41  5 37 53 13 29 61  3 67 19 11 43 59  7 71 23 47 31
		

Crossrefs

Cf. A263846, A000040, A007088, A007504 (row sums), A264666 (partial row products), A037126 (rows sorted naturally).

Programs

  • Haskell
    import Data.List (inits, sortBy); import Data.Function (on)
    a264662 n k = a264662_tabl !! (n-1) !! (n-1)
    a264662_row n = a264662_tabl !! (n-1)
    a264662_tabl = map (sortBy (compare `on` (reverse . show . a007088))) $
                       tail $ inits a000040_list
  • Mathematica
    row[n_] := SortBy[Prime[Range[n]], StringJoin[ToString /@ Reverse[IntegerDigits[#, 2]]]&];
    Table[row[n], {n, 1, 20}] // Flatten (* Jean-François Alcover, Sep 25 2021 *)
Showing 1-3 of 3 results.