Solution Re: Request for information about basis representation

Ralf Stephan ralf at ark.in-berlin.de
Sat Mar 5 16:48:49 CET 2005


Let T(a,n) be the number 'replace 2^i with a^i in binary representation of n'.
The columns (n fixed) are all polynomials in a. The rows are 2-regular
sequences. Most 2-regular sequences can be expressed in terms of A007814,
the dyadic valuation of n (from that, they have all the same kind of 
fractality). The sequences at hand are no exception:

T(a,n) = Sum{j=1..n, ((a-2)*a^A007814(j) + 1)/(a-1) }.

Surprisingly, this can be given a closed form!
If, with fixed n, we spread out the sum we have in the exponent j 
the values of A007814:

0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,...
	
How often do we get 0 in the first n values? [(n+1)/2]
                    1              n         [(n+2)/4]
										2              n         [(n+4)/8]
                   ...
Therefore, finally
T(a,n) = 1/(a-1) * Sum{j=1..[log2(n)]+1, [(n+2^(j-1))/2^j] * ((a-2)*a^(j-1) + 1) }.

(Your) Example:		
T(m,35) = 18*((a-2)a^0+1)/(a-1) + 9*((a-2)a^1+1)/(a-1) 
          + 4*((a-2)a^2+1)/(a-1) + 2*((a-2)a^3+1)/(a-1)
					+ 1*((a-2)a^4+1)/(a-1) + 1*((a-2)a^5+1)/(a-1)

        = a^5 + a + 1.

which would have been expected from the binary rep. of 35.

I'll submit the square array to the OEIS shortly.
Regards,
ralf






More information about the SeqFan mailing list