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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A067587 Inverse of A066884 considered as a permutation of the positive integers. 3
1, 3, 2, 6, 5, 9, 4, 10, 14, 20, 8, 27, 13, 19, 7, 15, 35, 44, 26, 54, 34, 43, 12, 65, 53, 64, 18, 76, 25, 33, 11, 21, 77, 90, 89, 104, 103, 118, 42, 119, 134, 151, 52, 169, 63, 75, 17, 135, 188, 208, 88, 229, 102, 117, 24, 251, 133, 150, 32, 168, 41, 51, 16, 28, 152 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

Ivan Neretin, Table of n, a(n) for n = 1..10000

FORMULA

Let w(n)=A000120(n) be the 'weight' of n; i.e. the number of 1's in the binary expansion of n. Let p(n)=A068076(n) be the number of positive integers < n with the same weight as n. Then a(n) = binomial(w(n)+p(n), 2) + p(n) + 1.

MATHEMATICA

w[n_] := Plus@@IntegerDigits[n, 2]; p[n_] := Plus@@MapThread[Binomial, {Flatten[Position[Reverse[IntegerDigits[n, 2]], 1]]-1, Range[w[n]]}]; a[n_] := Binomial[w[n]+p[n], 2]+p[n]+1

PROG

(Perl)

foreach(1..10_000){$i=eval join "+", split //, sprintf "%b", $_; $j=$r[$i]++; print "$_ ", $j+1+($i+$j)*($i+$j-1)/2, "\n"} # Ivan Neretin, Mar 02 2016

CROSSREFS

Sequence in context: A118833 A268823 A046877 * A198259 A120476 A069159

Adjacent sequences:  A067584 A067585 A067586 * A067588 A067589 A067590

KEYWORD

easy,nonn

AUTHOR

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

EXTENSIONS

Edited by Dean Hickerson, Feb 16 2002

Offset changed to 1 by Ivan Neretin, Mar 02 2016

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 January 21 02:59 EST 2019. Contains 319344 sequences. (Running on oeis4.)