login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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. 1
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 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

COMMENTS

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

LINKS

Table of n, a(n) for n=0..53.

EXAMPLE

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 ...

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

CROSSREFS

Cf. A000079, A018900, A014311, A014312, A014313, A023688, A023689, A023690, A023691.

Sequence in context: A119907 A241335 A158911 * A301767 A169898 A281734

Adjacent sequences:  A086769 A086770 A086771 * A086773 A086774 A086775

KEYWORD

nonn,base

AUTHOR

Alford Arnold, Aug 03 2003

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 22:45 EDT 2021. Contains 343098 sequences. (Running on oeis4.)