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.

Previous Showing 11-19 of 19 results.

A067576 Array T(i,j) read by downward antidiagonals, where T(i,j) is the j-th term whose binary expansion has i 1's.

Original entry on oeis.org

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

Views

Author

Robert G. Wilson v, Jan 30 2002

Keywords

Comments

This is a permutation of the positive integers; the inverse permutation is A356419. - Jianing Song, Aug 06 2022

Examples

			Array begins:
        j=1  j=2  j=3  j=4  j=5  j=6
  i=1:    1,   2,   4,   8,  16,  32, ...
  i=2:    3,   5,   6,   9,  10,  12, ...
  i=3:    7,  11,  13,  14,  19,  21, ...
  i=4:   15,  23,  27,  29,  30,  39, ...
  i=5:   31,  47,  55,  59,  61,  62, ...
  i=6:   63,  95, 111, 119, 123, 125, ...
		

Crossrefs

T(n,n) gives A036563(n+1).
The antidiagonals are read in the opposite direction from those in A066884.
Antidiagonal sums give A361074.

Programs

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

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

A038461 Sums of 10 distinct powers of 2.

Original entry on oeis.org

1023, 1535, 1791, 1919, 1983, 2015, 2031, 2039, 2043, 2045, 2046, 2559, 2815, 2943, 3007, 3039, 3055, 3063, 3067, 3069, 3070, 3327, 3455, 3519, 3551, 3567, 3575, 3579, 3581, 3582, 3711, 3775, 3807, 3823, 3831, 3835, 3837, 3838, 3903
Offset: 1

Views

Author

Keywords

Crossrefs

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

Programs

  • Mathematica
    Select[Range[4000], DigitCount[#, 2, 1] == 10 &] (* Amiram Eldar, Feb 14 2022 *)
  • PARI
    isok(n) = hammingweight(n) == 10; \\ Michel Marcus, Feb 29 2016
    
  • Python
    from itertools import islice
    def A038461_gen(): # generator of terms
        yield (n:=1023)
        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)
    A038461_list = list(islice(A038461_gen(),20)) # Chai Wah Wu, Mar 10 2025

Formula

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

Extensions

Offset changed to 1 by Ivan Neretin, Feb 28 2016

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

A238015 Denominator of (2*n+1)!*8*Bernoulli(2*n,1/2).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 2, 4, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 2, 4, 1, 1, 1, 2, 1, 2, 2, 4, 1, 2, 2, 4, 2, 4, 4, 8, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 2, 4, 1, 1, 1, 2, 1, 2, 2, 4, 1, 2, 2, 4, 2, 4, 4, 8, 1, 1, 1, 2, 1
Offset: 0

Views

Author

Robert Israel, Feb 17 2014

Keywords

Comments

It appears that a(n) is 1 for n in A095736, 2 for n in A014312, 4 for n in A014313, 8 for n in A023688, 16 for n in A023689, 32 for n in A023690, 64 for n in A023691. - Michel Marcus, Feb 18 2014

Examples

			For n=15, (2*15+1)!*8*Bernoulli(2*15,1/2) = -79147239268966167007717425917182573906640625/2 so a(15) = 2.
		

Crossrefs

Cf. A033473.

Programs

  • Maple
    seq(denom((2*n+1)!*8*bernoulli(2*n,1/2)), n=0 .. 100);
  • Mathematica
    Table[Denominator[(2 n + 1)! 8 BernoulliB[2 n, 1/2]], {n, 0, 200}] (* Vincenzo Librandi, Feb 18 2014 *)

A255568 Numbers in whose binary representation there are six 1-bits more than there are nonleading 0-bits.

Original entry on oeis.org

63, 191, 223, 239, 247, 251, 253, 254, 639, 703, 735, 751, 759, 763, 765, 766, 831, 863, 879, 887, 891, 893, 894, 927, 943, 951, 955, 957, 958, 975, 983, 987, 989, 990, 999, 1003, 1005, 1006, 1011, 1013, 1014, 1017, 1018, 1020, 2303, 2431, 2495, 2527, 2543, 2551, 2555
Offset: 1

Views

Author

Antti Karttunen, Mar 11 2015

Keywords

Comments

Numbers for which A037861(n) = -6.
Numbers in whose binary representation (A007088) the number of 1-bits = 6 + number of (nonleading) 0 bits.

Examples

			63 ("111111" in binary) is included because there are 0 zero-bits and six 1-bits.
191 ("10111111" in binary) is included because there is 1 zero-bit and seven 1-bits, thus there are six 1-bits more than the number of 0-bits.
		

Crossrefs

The intersection of A030130 and A023689 is a finite subsequence of this sequence.

Programs

A086772 Store the natural numbers in a triangular array such that values on each row have the same number of bits. Start a new row with the smallest number not yet recorded. a(n) represents the initial terms in the resulting array.

Original entry on oeis.org

0, 1, 3, 4, 7, 9, 15, 21, 24, 31, 41, 45, 63, 64, 72, 74, 83, 94, 127, 139, 140, 173, 197, 207, 234, 255, 268, 284, 288, 339, 349, 390, 426, 445, 467, 511, 522, 553, 569, 634, 689, 706, 734, 797, 838, 934, 950, 951, 1023, 1036, 1052, 1078, 1179, 1236
Offset: 0

Views

Author

Alford Arnold, Aug 03 2003

Keywords

Comments

A067576 describes the sequences with a fixed number of binary bits using antidiagonals.

Examples

			The array begins:
   0
   1  2
   3  5  6
   4  8 16 32
   7 11 13 14 19
   9 10 12 17 18 20
  15 23 27 29 30 39 43
  ...
so the initial terms are 0 1 3 4 7 9 15 ...
		

Crossrefs

Programs

  • Maple
    A086772aux := proc(n,k)
        option remember;
        local a,npr,kpr,fnd ;
        if n = 0 then
            return 0;
        end if;
        if k = 0 then
            for a from 1 do
                fnd := false;
                for npr from 1 to n-1 do
                    for kpr from 0 to npr do
                        if procname(npr,kpr) = a then
                            fnd := true;
                            break;
                        end if;
                    end do:
                end do:
                if not fnd then
                    return a;
                end if;
            end do:
        else
            for a from 1 do
                if wt(a) = wt(procname(n,0)) then
                    fnd := false;
                    for npr from 1 to n-1 do
                        for kpr from 0 to npr do
                            if procname(npr,kpr) = a then
                                fnd := true;
                                break;
                            end if;
                        end do:
                    end do:
                    for kpr from 0 to k-1 do
                        if procname(n,kpr) = a then
                            fnd := true;
                            break;
                        end if;
                    end do:
                    if not fnd then
                        return a;
                    end if;
                end if;
            end do:
        end if;
    end proc:
    A086772 := proc(n)
        A086772aux(n,0) ;
    end proc: # R. J. Mathar, Sep 15 2012

A367680 Number of integer compositions x1+x2+...+xk of n such that each xj has exactly j bits set.

Original entry on oeis.org

1, 1, 1, 0, 2, 1, 1, 3, 2, 1, 2, 4, 2, 4, 6, 2, 4, 5, 10, 7, 10, 12, 8, 6, 11, 14, 16, 13, 16, 16, 14, 14, 30, 32, 19, 35, 28, 23, 27, 38, 36, 47, 44, 42, 55, 52, 51, 85, 88, 74, 84, 84, 72, 81, 102, 110, 122, 115, 108, 132, 137, 136, 179, 195, 164, 160, 181
Offset: 0

Views

Author

Arnauld Chevallier, Nov 26 2023

Keywords

Examples

			There are 6 such compositions for n = 14:
  14 = 1 + 6 + 7 (1 + 110 + 111)
  14 = 2 + 5 + 7 (10 + 101 + 111)
  14 = 2 + 12 (10 + 1100)
  14 = 4 + 3 + 7 (100 + 11 + 111)
  14 = 4 + 10 (100 + 1010)
  14 = 8 + 6 (1000 + 110)
Therefore a(14) = 6.
		

Crossrefs

Programs

  • PARI
    a(n) = my(nb=0); forpart(v=n, if (vecsort(apply(hammingweight, Vec(v))) == [1..#v], nb++)); nb; \\ Michel Marcus, Nov 28 2023
Previous Showing 11-19 of 19 results.