[seqfan] Re: Is A290646 = A135517?

Frank Adams-Watters franktaw at netscape.net
Tue Aug 8 23:42:52 CEST 2017


Yes, this is a correct formula for A001511 (but right-shifted; binary_weight( n XOR n - 1) matches the offset correctly). n XOR n - 1 will have a 1 for every trailing 0 in the binary representation of n, and also in the immediately preceding 1; all higher-order bits will be 0. So the binary weight is one more than the exponent of the largest power of 2 dividing n, which matches the definition of A001511.

Franklin T. Adams-Watters


-----Original Message-----
From: Alonso Del Arte <alonso.delarte at gmail.com>
To: Sequence Fanatics Discussion list <seqfan at list.seqfan.eu>
Sent: Tue, Aug 8, 2017 1:22 pm
Subject: [seqfan] Re: Is A290646 = A135517?

In trying to answer this question, I've come up with more questions and no
answers. What's another formula for A091090? I tried
binary weight(n XOR n + 1)
implemented in Mathematica with DigitCount and BitXor. This matches A1511
for the terms I've looked at, but I can't say for sure that this is indeed
a formula for A1511 Perhaps with one judicious adjustment it's possible to turn A1511 into
A091090. Something like A001511[[n]] - Boole[IntegerQ[Log[2, n]]].Al

On Tue, Aug 8, 2017 at 12:18 PM, Peter Luschny <peter.luschny at gmail.com>wrote:>

Thankful for any comment.
>> Peter>> http://oeis.org/search?q=id:A290646|id:A135517
>> --
> Seqfan Mailing list - http://list.seqfan.eu/
>-- Alonso del Arte Author at SmashWords.com<https://www.smashwords.com/profile/view/AlonsoDelarte>
Musician at ReverbNation.com <http://www.reverbnation.com/alonsodelarte>
--Seqfan Mailing list - http://list.seqfan.eu/



More information about the SeqFan mailing list