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-4 of 4 results.

A081118 Triangle of first n numbers per row having exactly n 1's in binary representation.

Original entry on oeis.org

1, 3, 5, 7, 11, 13, 15, 23, 27, 29, 31, 47, 55, 59, 61, 63, 95, 111, 119, 123, 125, 127, 191, 223, 239, 247, 251, 253, 255, 383, 447, 479, 495, 503, 507, 509, 511, 767, 895, 959, 991, 1007, 1015, 1019, 1021, 1023, 1535, 1791, 1919, 1983, 2015, 2031, 2039, 2043
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 06 2003

Keywords

Comments

T(n,n) = A036563(n+1) = 2^(n+1) - 3.
Numbers of the form 2^t - 2^k - 1, 1 <= k < t.

Examples

			Triangle begins:
.......... 1 ......... ................ 1
........ 3...5 ....... .............. 11 101
...... 7..11..13 ..... .......... 111 1011 1101
... 15..23..27..29 ... ...... 1111 10111 11011 11101
. 31..47..55..59..61 . . 11111 101111 110111 111011 111101.
		

Crossrefs

Programs

  • Haskell
    a081118 n k = a081118_tabl !! (n-1) !! (k-1)
    a081118_row n = a081118_tabl !! (n-1)
    a081118_tabl  = iterate
       (\row -> (map ((+ 1) . (* 2)) row) ++ [4 * (head row) + 1]) [1]
    a081118_list = concat a081118_tabl
    -- Reinhard Zumkeller, Feb 23 2012
  • Mathematica
    Table[2^(n+1)-2^(n-k+1)-1,{n,10},{k,n}]//Flatten (* Harvey P. Dale, Apr 09 2020 *)

Formula

T(n, k) = 2^(n+1) - 2^(n-k+1) - 1, 1<=k<=n.
a(n) = (2^A002260(n)-1)*2^A004736(n)-1; a(n)=(2^i-1)*2^j-1, where i=n-t*(t+1)/2, j=(t*t+3*t+4)/2-n, t=floor((-1+sqrt(8*n-7))/2). - Boris Putievskiy, Apr 04 2013

A066884 Square array read by upward antidiagonals where the n-th row contains the positive integers with n binary 1's.

Original entry on oeis.org

1, 3, 2, 7, 5, 4, 15, 11, 6, 8, 31, 23, 13, 9, 16, 63, 47, 27, 14, 10, 32, 127, 95, 55, 29, 19, 12, 64, 255, 191, 111, 59, 30, 21, 17, 128, 511, 383, 223, 119, 61, 39, 22, 18, 256, 1023, 767, 447, 239, 123, 62, 43, 25, 20, 512, 2047, 1535, 895, 479, 247, 125, 79, 45, 26, 24, 1024
Offset: 1

Views

Author

Jared Benjamin Ricks (jaredricks(AT)yahoo.com), Jan 21 2002

Keywords

Comments

This is a permutation of the positive integers; the inverse permutation is A067587.

Examples

			Column: 1   2   3   4   5   6
-----------------------------
Row 1:| 1   2   4   8  16  32
Row 2:| 3   5   6   9  10  12
Row 3:| 7  11  13  14  19  21
Row 4:|15  23  27  29  30  39
Row 5:|31  47  55  59  61  62
Row 6:|63  95 111 119 123 125
		

Crossrefs

Selected rows: A000079 (1), A018900 (2), A014311 (3), A014312 (4), A014313 (5), A023688 (6), A023689 (7), A023690 (8), A023691 (9), A038461 (10), A038462 (11), A038463 (12). For decimal analogs, see A011557 and A038444-A038452.
Selected columns: A000225 (1), A055010 (2).
Selected diagonals: A036563 (main), A000918 (1st upper), A153894 (2nd upper). [Franklin T. Adams-Watters, Apr 22 2009]
Cf. A067576 (the same array read by downward antidiagonals).
Antidiagonal sums give A361074.

Programs

  • Mathematica
    a = {}; Do[ a = Append[a, Last[ Take[ Take[ Select[ Range[2^12], Count[ IntegerDigits[ #, 2], 1] == j - i + 1 & ], j], i]]], {j, 1, 11}, {i, 1, j}]; a

Extensions

Corrected and extended by Henry Bottomley, Jan 27 2002

A038462 Sums of 11 distinct powers of 2.

Original entry on oeis.org

2047, 3071, 3583, 3839, 3967, 4031, 4063, 4079, 4087, 4091, 4093, 4094, 5119, 5631, 5887, 6015, 6079, 6111, 6127, 6135, 6139, 6141, 6142, 6655, 6911, 7039, 7103, 7135, 7151, 7159, 7163, 7165, 7166, 7423, 7551, 7615, 7647, 7663, 7671
Offset: 1

Views

Author

Keywords

Crossrefs

Base 2 interpretation of A038453.
Cf. A000079, A018900, A014311, A014312, A014313, A023688, A023689, A023690, A023691, A038461 (Hamming weight = 1, 2, ..., 10).

Programs

  • Mathematica
    Select[Range[8000], DigitCount[#, 2, 1] == 11 &] (* Amiram Eldar, Feb 14 2022 *)
  • Python
    from itertools import islice
    def A038462_gen(): # generator of terms
        yield (n:=2047)
        while True: yield (n:=n^((a:=-n&n+1)|(a>>1)) if n&1 else ((n&~(b:=n+(a:=n&-n)))>>a.bit_length())^b)
    A038462_list = list(islice(A038462_gen(),20)) # Chai Wah Wu, Mar 10 2025

Formula

Sum_{n>=1} 1/a(n) = 1.386300330514503033229968047555778179200262625510401687087371496738972082061... (calculated using Baillie's irwinSums.m, see Links). - Amiram Eldar, Feb 14 2022

Extensions

Offset changed to 1 by Ivan Neretin, Feb 28 2016

A038463 Sums of 12 distinct powers of 2.

Original entry on oeis.org

4095, 6143, 7167, 7679, 7935, 8063, 8127, 8159, 8175, 8183, 8187, 8189, 8190, 10239, 11263, 11775, 12031, 12159, 12223, 12255, 12271, 12279, 12283, 12285, 12286, 13311, 13823, 14079, 14207, 14271, 14303, 14319, 14327, 14331, 14333
Offset: 1

Views

Author

Keywords

Crossrefs

Base 2 interpretation of A038454.
Cf. A000079, A018900, A014311, A014312, A014313, A023688, A023689, A023690, A023691, A038461, A038462 (Hamming weight = 1, 2, ..., 11).

Programs

  • Mathematica
    Select[Range[15000], DigitCount[#, 2, 1] == 12 &] (* Amiram Eldar, Feb 14 2022 *)
  • Python
    from itertools import islice
    def A038463_gen(): # generator of terms
        yield (n:=4095)
        while True: yield (n:=n^((a:=-n&n+1)|(a>>1)) if n&1 else ((n&~(b:=n+(a:=n&-n)))>>a.bit_length())^b)
    A038463_list = list(islice(A038463_gen(),20)) # Chai Wah Wu, Mar 10 2025

Formula

Sum_{n>=1} 1/a(n) = 1.386296350824871649202152615241744383837323713474767661902780220440945591424... (calculated using Baillie's irwinSums.m, see Links). - Amiram Eldar, Feb 14 2022

Extensions

Offset changed to 1 by Ivan Neretin, Feb 28 2016
Showing 1-4 of 4 results.