[seqfan] Re: A165783 Formula for period of shift register stages

Joerg Arndt arndt at jjj.de
Tue Nov 24 11:01:20 CET 2009


* c.zizka at email.cz <c.zizka at email.cz> [Nov 24. 2009 20:53]:
> The correct formula :
> 
> a(n)=n + digitsum ( (2^n-1)/(2*n-1) ) , digitsum in base 2.
> 
> Ctibor
> 

Using pari/gp:

? for(n=1,10,print((2^n-1)/(2*n-1)) ) 
1
1
7/5
15/7
31/9
63/11
127/13
17
511/17
1023/19

What is the Hamming weight (your digitsum) of a rational?





More information about the SeqFan mailing list