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-10 of 18 results. Next

A031046 Position of n-th 0 in A031045.

Original entry on oeis.org

0, 8, 24, 40, 56, 72, 88, 104, 120, 121, 124, 127, 130, 133, 136, 139, 142, 144, 168, 192, 216, 240, 264, 288, 312, 313, 316, 319, 322, 325, 328, 331, 334, 336, 360, 384, 408, 432, 456, 480, 504, 505, 508, 511, 514, 517, 520, 523
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A031045.

Extensions

Missing a(1)=0 inserted by Sean A. Irvine, Apr 10 2020

A031047 Position of n-th 1 in A031045.

Original entry on oeis.org

1, 9, 10, 11, 13, 15, 17, 19, 21, 23, 26, 42, 58, 74, 90, 106, 122, 123, 125, 128, 131, 134, 137, 140, 143, 145, 146, 147, 148, 149, 151, 152, 154, 155, 157, 158, 160, 161, 163, 164, 166, 167, 170, 171, 173, 176, 179, 182, 185, 188
Offset: 1

Views

Author

Keywords

A031048 Position of n-th 2 in A031045.

Original entry on oeis.org

2, 12, 25, 27, 28, 29, 31, 33, 35, 37, 39, 44, 60, 76, 92, 108, 126, 150, 169, 172, 174, 175, 178, 181, 184, 187, 190, 198, 222, 246, 270, 294, 314, 317, 318, 320, 323, 326, 329, 332, 335, 338, 341, 342, 344, 347, 350, 353, 356
Offset: 1

Views

Author

Keywords

A031049 Position of n-th 3 in A031045.

Original entry on oeis.org

3, 14, 30, 41, 43, 45, 46, 47, 49, 51, 53, 55, 62, 78, 94, 110, 129, 153, 177, 193, 196, 199, 201, 202, 205, 208, 211, 214, 225, 249, 273, 297, 321, 345, 369, 385, 388, 391, 393, 394, 397, 400, 403, 406, 417, 441, 465, 489, 506
Offset: 1

Views

Author

Keywords

A031050 Position of n-th 4 in A031045.

Original entry on oeis.org

4, 16, 32, 48, 57, 59, 61, 63, 64, 65, 67, 69, 71, 80, 96, 112, 132, 156, 180, 204, 217, 220, 223, 226, 228, 229, 232, 235, 238, 252, 276, 300, 324, 348, 372, 396, 409, 412, 415, 418, 420, 421, 424, 427, 430, 444, 468, 492, 516
Offset: 1

Views

Author

Keywords

A031051 Position of n-th 5 in A031045.

Original entry on oeis.org

5, 18, 34, 50, 66, 73, 75, 77, 79, 81, 82, 83, 85, 87, 98, 114, 135, 159, 183, 207, 231, 241, 244, 247, 250, 253, 255, 256, 259, 262, 279, 303, 327, 351, 375, 399, 423, 433, 436, 439, 442, 445, 447, 448, 451, 454, 471, 495, 519
Offset: 1

Views

Author

Keywords

Programs

  • Mathematica
    Flatten[Position[Flatten[Table[Reverse[IntegerDigits[n,8]], {n,300}]], 5]] (* Harvey P. Dale, Aug 08 2011 *)

A031052 Position of n-th 6 in A031045.

Original entry on oeis.org

6, 20, 36, 52, 68, 84, 89, 91, 93, 95, 97, 99, 100, 101, 103, 116, 138, 162, 186, 210, 234, 258, 265, 268, 271, 274, 277, 280, 282, 283, 286, 306, 330, 354, 378, 402, 426, 450, 457, 460, 463, 466, 469, 472, 474, 475, 478, 498, 522
Offset: 1

Views

Author

Keywords

A031053 Position of n-th 7 in A031045.

Original entry on oeis.org

7, 22, 38, 54, 70, 86, 102, 105, 107, 109, 111, 113, 115, 117, 118, 119, 141, 165, 189, 213, 237, 261, 285, 289, 292, 295, 298, 301, 304, 307, 309, 310, 333, 357, 381, 405, 429, 453, 477, 481, 484, 487, 490, 493, 496, 499, 501
Offset: 1

Views

Author

Keywords

A031054 a(n)=least k such that base 8 representation of n begins at s(k), where s=A031045.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 23, 9, 1, 13, 15, 17, 19, 21, 39, 12, 27, 2, 31, 33, 35, 37, 55, 14, 30, 45, 3, 49, 51, 53, 71, 16, 32, 48, 63, 4, 67, 69, 87, 18, 34, 50, 66, 81, 5, 85, 103, 20, 36, 52, 68, 84, 99, 6, 7, 22, 38, 54, 70, 86, 102, 117, 311, 123
Offset: 1

Views

Author

Keywords

A030308 Triangle T(n, k): Write n in base 2, reverse order of digits, to get the n-th row.

Original entry on oeis.org

0, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1
Offset: 0

Views

Author

Keywords

Comments

This is the quite common, so-called "bittest" function, see PARI code. - M. F. Hasler, Jul 21 2013
For a given number m and a digit position k the corresponding sequence index n can be calculated by n(m, k) = m*(1 + floor(log_2(m))) - 2^(1 + floor(log_2(m))) + k + 1. For example: counted from right to left, the second digit of m = 13 (binary 1101) is '0'. Hence the sequence index is n = n(13, 2) = 39. - Hieronymus Fischer, May 05 2007
A070939(n) is the length of n-th row; A000120(n) is the sum of n-th row; A030101(n) is the n-th row seen as binary number; A000035(n) = T(n, 0). - Reinhard Zumkeller, Jun 17 2012

Examples

			Triangle begins :
0
1
0, 1
1, 1
0, 0, 1
1, 0, 1
0, 1, 1
1, 1, 1
0, 0, 0, 1
1, 0, 0, 1 - _Philippe Deléham_, Oct 12 2011
		

Crossrefs

Cf. A030190.
Cf. A030341, A030386, A031235, A030567, A031007, A031045, A031087, A031298 for the base-3 to base-10 analogs.

Programs

  • Haskell
    a030308 n k = a030308_tabf !! n !! k
    a030308_row n = a030308_tabf !! n
    a030308_tabf = iterate bSucc [0] where
       bSucc []       = [1]
       bSucc (0 : bs) = 1 : bs
       bSucc (1 : bs) = 0 : bSucc bs
    -- Reinhard Zumkeller, Jun 17 2012
    
  • Maple
    A030308_row := n -> op(convert(n,base, 2)):
    seq(A030308_row(n), n=0..23); # Peter Luschny, Nov 28 2017
  • Mathematica
    Flatten[Table[Reverse[IntegerDigits[n, 2]], {n, 0, 23}]] (* T. D. Noe, Oct 12 2011 *)
  • PARI
    A030308(n,k)=bittest(n,k) \\ Assuming that columns are numbered starting with k=0, as suggested by the formula from R. Zumkeller. - M. F. Hasler, Jul 21 2013
    
  • Python
    for n in range(20): print([int(z) for z in str(bin(n)[2:])[::-1]]) # Indranil Ghosh, Mar 31 2017
    
  • Sage
    A030308_row = lambda n: n.bits() if n > 0 else [0]
    for n in (0..23): print(A030308_row(n)) # Peter Luschny, Nov 28 2017
    
  • Scala
    (0 to 31).map(Integer.toString(, 2).reverse).mkString.split("").map(Integer.parseInt()).toList // Alonso del Arte, Feb 10 2020

Formula

a(n) = floor(m/2^(k - 1)) mod 2, where m = max(j|A001855(j) < n) and k = n - A001855(m). - Hieronymus Fischer, May 05 2007, Sep 10 2007
T(n, k) = (n // 2^k) mod 2, for 0 <= k <= log[2](n) and n > 0; T(0, 0) = 0. ('//' denotes integer division). - Peter Luschny, Apr 20 2023

Extensions

Initial 0 and better name by Philippe Deléham, Oct 12 2011
Showing 1-10 of 18 results. Next