login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A262881 Regular triangle where the n-th row lists the integers k between 0 and n ordered by increasing value of the Hamming weight of k, and if equal by increasing value of k. 2
0, 0, 1, 0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 4, 3, 0, 1, 2, 4, 3, 5, 0, 1, 2, 4, 3, 5, 6, 0, 1, 2, 4, 3, 5, 6, 7, 0, 1, 2, 4, 8, 3, 5, 6, 7, 0, 1, 2, 4, 8, 3, 5, 6, 9, 7, 0, 1, 2, 4, 8, 3, 5, 6, 9, 10, 7, 0, 1, 2, 4, 8, 3, 5, 6, 9, 10, 7, 11, 0, 1, 2, 4, 8, 3, 5, 6, 9, 10, 12, 7, 11 (list; table; graph; refs; listen; history; text; internal format)
OFFSET

0,6

LINKS

Michel Marcus, Table of n, a(n) for n = 0..2079 (64 rows)

EXAMPLE

Triangle starts:

0;

0, 1;

0, 1, 2;

0, 1, 2, 3;

0, 1, 2, 4, 3;

0, 1, 2, 4, 3, 5;

0, 1, 2, 4, 3, 5, 6;

0, 1, 2, 4, 3, 5, 6, 7;

0, 1, 2, 4, 8, 3, 5, 6, 7;

0, 1, 2, 4, 8, 3, 5, 6, 9, 7;

0, 1, 2, 4, 8, 3, 5, 6, 9, 10, 7;

...

MATHEMATICA

Table[SortBy[Range@ k, And[Total@ IntegerDigits[#, 2], k] &], {k, 10}] (* Michael De Vlieger, Oct 04 2015 *)

PROG

(PARI) cmph(i, j) = if (hammingweight(i) != hammingweight(j), hammingweight(i) - hammingweight(j), i - j);

row(n) = my(v = vector(n+1, k, k-1)); vecsort(v, cmph);

tabl(nn) = for (n=0, nn, print(row(n)); );

CROSSREFS

Cf. A000120 (Hamming weight), A262882 (right diagonal).

Sequence in context: A002262 A298486 A189768 * A099173 A293377 A159880

Adjacent sequences:  A262878 A262879 A262880 * A262882 A262883 A262884

KEYWORD

nonn,base,tabl

AUTHOR

Michel Marcus, Oct 04 2015

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 July 16 04:26 EDT 2019. Contains 325064 sequences. (Running on oeis4.)