OEIS?: http://oeis.org/
Recently, I have been studying analytic number theory, and I have further felt that number theory is truly a wonderful thing. Through it, it seems that all aspects of mathematics—discrete and continuous, real and complex, and even physics—are connected. From this, it is not difficult to appreciate why Gauss once said, "Mathematics is the queen of the sciences and number theory is the queen of mathematics."
Today, while researching the upper and lower bounds for the number of prime numbers, I needed to consider how many powers of 2 can divide the binomial coefficient: C_{n}^{2n}=\binom{2n}{n}=\frac{(2n)!}{n!\ n!} My intuition told me that the exponent should increase as n increases, but that is not the case. For example, C_{15}^{30} is divisible by 16, but C_{20}^{40} is at most divisible by 4. It felt somewhat irregular, so I asked the experts in a group. Among them, wayne suggested:
You can write a small program to calculate some data and then search for it on OEIS.
Following his suggestion, I wrote the following Python code:
import math
def cout2(n):
s = 0
while n%2==0:
s = s+1
n = n//2
return s
for n in range(1,100):
m = math.factorial(2*n)//math.factorial(n)//math.factorial(n)
print(cout2(m), end=', ')Output result:
1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3,
Directly putting this string of numbers into OEIS to search, I obtained:
http://oeis.org/A000120
It turns out that this sequence has already been studied, and OEIS has long since indexed it. Each term of the sequence is exactly equal to the number of 1’s in the binary expansion of n. The general trend of the sequence terms is to increase as n increases, but the local behavior does not necessarily follow this rule. If you truncate the sequence at every 1, you get a series of finite sub-sequences where the patterns are relatively more obvious (counting the number of 1’s in binary numbers of a fixed bit-length arranged from smallest to largest). The site also lists some properties of the sequence, reference links, and so on. One must say that OEIS is truly powerful! I recall referencing materials from there a long time ago, but only now do I realize its true power. Below is its introduction on Wikipedia:
The On-Line Encyclopedia of Integer Sequences (OEIS), also cited simply as Sloane’s, is an online database of integer sequences. It is an important resource in mathematics, as each entry records the first few terms of an integer sequence, keywords, links, and more. As of June 2009, OEIS contained over 160,000 sequences.
When reposting, please include the original address of this article: https://kexue.fm/archives/2765
For more detailed information on reposting, please refer to: Scientific Space FAQ