10 points to the best answer on this math problem.
Favorites|Homepage
Subscriptions | sitemap
HOME > Mathematics > 10 points to the best answer on this math problem.

10 points to the best answer on this math problem.

[From: ] [author: ] [Date: 11-05-14] [Hit: ]
and the ones are all separated by at least one zero,43 has the binary expansion 101101 which has two ones next to each other.n ≥ 0, how many scattered and not negative integers are there less than 2^n?-Well, this seems like a computer science related question and I dont know how to solve it mathematically so I wrote a little program in java.......
An integer that is not negative is classified as “scattered” if its binary expansion has no
two ones in a row. To give an example, 37 is scattered but 43 isn't because binary
expansion of 37 is 100101, and the ones are all separated by at least one zero, whereas the
43 has the binary expansion 101101 which has two ones next to each other. For an integer
n ≥ 0, how many scattered and not negative integers are there less than 2^n?

-
Well, this seems like a computer science related question and I don't know how to solve it mathematically so I wrote a little program in java. You give it an n and it finds the total number of "scattered" ints less than 2^n. I'll put a link in the sources to a tinypaste document with the location of the download and the source code. But here are some results for some values of n:

n | Scattered numbers less than 2^n
1 2
2 3
3 5
4 8
5 13
8 55
10 144
15 1,597
16 2,584
20 17,711
25 196,418
30 2,178,309

Thanks for the fun problem, hope I helped!

EDIT: After looking over it I realized something:
Lets say f is a function of n where f(n) is the number of scattered numbers less than 2^n.
Then:
f(3) = f(2) + f(1)
It's a pattern I noticed. More generally:
f(n) = f(n-1) + f(n-2)
So if we define a sequence S sub n, then:

S_n = { 1, n=0
. . . . . . . 2, n=1
. . . . . . . S_(n-1) + S_(n-2), n >1

Hope that made sense :P

-
Infinite
1
keywords: problem,answer,this,to,math,points,best,10,the,on,10 points to the best answer on this math problem.
New
Hot
© 2008-2010 http://www.science-mathematics.com . Program by zplan cms. Theme by wukong .