Very funny

Brocard's Problem
On the other hand, I did get some practice in hacking lua code before shifting to the ol' standby once the values started getting really large.
Seems straight forward. Can you give an input date for which you are getting a wrong answer?girish.r wrote: http://en.wikipedia.org/wiki/Zeller's_congruence
Im having case of...... weak brain cells......![]()
India, home of the number zero, ends a yearlong math party in unique fashion
An intuitive mathematical genius, Ramanujan's discoveries have influenced several areas of mathematics, but he is probably most famous for his contributions to number theory and infinite series, among them fascinating formulas (pdf ) that can be used to calculate digits of pi in unusual ways.
Last December Prime Minister Manmohan Singh declared 2012 to be a National Mathematics Year in India in honor of Ramanujan's quasiquicentennial.
India's mathematical heritage extends far beyond Ramanujan's time. The nation is considered home of the concept of zero. Babylonians had used a space as a placeholder (similar to the role of "0" in the number 101), but this space could not stand alone or at the end of a number. (In our number system, as in theirs, this could be problematic; imagine trying to tell the difference between the numbers 1 and 10 by context alone.) In India, however, zero was treated as a number like any other. India is also the home of our decimal numeral system.
ndian government and mathematical societies pursued several projects to celebrate their year of mathematics, from enrichment programs for students and teachers to the "Mathematical Panorama Lectures" that occurred around the country. This series of 20 short lecture courses, which will continue into 2013, brings prominent mathematicians from different fields to Indian universities to deliver five or six lectures. M. S. Raghunathan, president of the Ramanujan Mathematical Society and chair of the organizing committee for the National Mathematics Year, wrote in an e-mail that he hopes the lectures will facilitate an infusion of Indian talent into fields that lack it right now.
notes of RamanujamTwo longer-term projects begun this year could help as well: a documentary on the history of Indian mathematics and a mathematics museum in Chennai. Raghunathan hopes that the documentary will be available in 2014 and the museum will open its doors in 2015.
This yearlong fete is culminating in "The Legacy of Srinivasa Ramanujan," a conference at the University of Delhi from December 17 to 22. Included are technical lectures on mathematics influenced by Ramanujan's work, public presentations on Ramanujan's notebooks, dance performances and a film about Ramanujan's life. The annual SASTRA Ramanujan Prize, which recognizes a mathematician age 32 or younger who works in a field influenced by Ramanujan, will be awarded as well. The awardee this year is Zhiwei Yun of Stanford University, whose work lies at the intersection of geometric representation theory, algebraic geometry and number theory.
SorryArmenT wrote:^^^^
Very funny. I tried hacking some code together, but it seemed to run for ever. Then I recalled something weird I'd read a while ago (no, I'm not a math major, but I tend to remember odd stuff for some reason).
Brocard's Problem
On the other hand, I did get some practice in hacking lua code before shifting to the ol' standby once the values started getting really large.
(One can easily check that it is true for n=3,4,5 etc...For what values of n ... (2^n - 7 ) is a perfect square?
Just a wild guess - if (n is a Mersenne Prime) then (2^n - 7) is perfect square.Amber G. wrote:(One can easily check that it is true for n=3,4,5 etc...For what values of n ... (2^n - 7 ) is a perfect square?![]()
matrimc wrote:Just a wild guess - if (n is a Mersenne Prime) then (2^n - 7) is perfect square.Amber G. wrote: >>For what values of n ... (2^n - 7 ) is a perfect square? <<
(One can easily check that it is true for n=3,4,5 etc...![]()
checked only for a few values. Would working in binary give some insight?
2^7 - 7 = 121 = 11^2Amber G. wrote:NO! Why should it? Even for the very next value of n (next Mersenne prime) your assertion is does not seem to be correct. (2^7-7 = 57 is not a perfect square).
Code: Select all
... deleted as exact arbitrary precision integer arithmetic is needed ...
Code: Select all
#!/usr/bin/python
"""Ramanujan sqrt problem"""
def isqrt(n):
"""Calculate the nearest integer square root using Newton's method"""
xn = 1
xn1 = (xn + n//xn)//2
while abs(xn1 - xn) > 1:
xn = xn1
xn1 = (xn + n//xn)//2
while xn1*xn1 > n:
xn1 -= 1
return xn1
def is_a_square(n):
"""Returns a square root if n is a square, -1 if not"""
foo = isqrt(n)
if foo ** 2 == n:
return foo
return -1
for n in range(3, 1000):
x = 2 ** n - 7
y = is_a_square(x)
if y > -1:
print(n, x, y)
Code: Select all
3 1 1
4 9 3
5 25 5
7 121 11
15 32761 181
Didn't see your post until after I'd posted my previous replyAmber G. wrote:ArmenT - my point was, it is much easier to calculate square (than square root), and much easier to see if a number is 2^n or not ..so I will start in reverse .. get a number, square it, add 7 to it and see if you keep dividing it by 2 to reach 1 or some other odd number...
It is beyond Pythagoras theorem. The basic concepts of the relation of the angle to the chord, the definitions and use of sine/cosine etc, as well as tables of sine values are all from Indian maths.matrimc wrote:Viv ji,
By "trigonometry", you mean "Pythogoros Theorem"? I would say yes due to Boudhayana's estimate of Pi to be 3.14. Algebra comes from the Arab mathematician al Jabar al Khoworizmi - so does Algorithms. Of course, Number Theory gives rise to Algebra and Number Theory is well developed by Indians - Brahmagupta's "Pell equation".
Alsoviv wrote: I remember reading somewhere (Scientific American?) long back that Sine also comes from the Arabs having been incorrectly written down as jba from the original jya (in Sanskrit). This mistransliteration was taken to mean a 'bay' by the Europeans and they therefore translated it to sine as a result. The ko-jya became cosine.
From Victor J Katx, A history of mathematics.Etymologically, the word sine derives from the Sanskrit word for chord, jiva*(jya being its more popular synonym). This was transliterated in Arabic as jiba جــيــب, abbreviated jb جــــب . Since Arabic is written without short vowels, "jb" was interpreted as the word jaib جــيــب, which means "bosom" (or pocket like shirt pocket- AmberG), when the Arabic text was translated in the 12th century into Latin by Gerard of Cremona. The translator used the Latin equivalent for "bosom", sinus (which means "bosom" or "bay" or "fold")..The English form sine was introduced in the 1590s
Sorry for being sloppy and not very clear. What I meant was, that it is easy to check if a numberArmenT wrote:Didn't see your post until after I'd posted my previous replyAmber G. wrote:ArmenT - my point was, it is much easier to calculate square (than square root), and much easier to see if a number is 2^n or not ..so I will start in reverse .. get a number, square it, add 7 to it and see if you keep dividing it by 2 to reach 1 or some other odd number....
By the way, how does repeated dividing by 2 prove if a number is square or not? As far as I can see, it only proves that a number is a multiple of 2.
If you like to peek, here is a very simple proof of that...Amber G. wrote: BTW:
Can you prove (it is not really very hard) that apart from 4, there is no other even value of n.
Thanks Amber G.Amber G. wrote:Alsoviv wrote: I remember reading somewhere (Scientific American?) long back that Sine also comes from the Arabs having been incorrectly written down as jba from the original jya (in Sanskrit). This mistransliteration was taken to mean a 'bay' by the Europeans and they therefore translated it to sine as a result. The ko-jya became cosine.From Victor J Katx, A history of mathematics.Etymologically, the word sine derives from the Sanskrit word for chord, jiva*(jya being its more popular synonym). This was transliterated in Arabic as jiba جــيــب, abbreviated jb جــــب . Since Arabic is written without short vowels, "jb" was interpreted as the word jaib جــيــب, which means "bosom" (or pocket like shirt pocket- AmberG), when the Arabic text was translated in the 12th century into Latin by Gerard of Cremona. The translator used the Latin equivalent for "bosom", sinus (which means "bosom" or "bay" or "fold")..The English form sine was introduced in the 1590s
Is it something along these lines?AmberG wrote: (It is not easy, but if you think about it, the choice for y is very restrictive.. more of in later post)
Like poetry and music
Manjul Bhargava, R. Brandon Fradd Professor of Mathematics at Princeton University
I have always found mathematics very similar to poetry and music. In fact, I find that I think about all three in very similar ways. This is true, to a large extent, for all pure mathematicians. In school, mathematics is generally grouped in the ‘science’ category.
But for pure mathematicians, mathematics — like music, poetry, or painting — is a creative art. All these arts involve, and indeed require, a certain creative fire. They all strive to express truths that cannot be expressed in ordinary, everyday language. And they all strive towards beauty.
The connection between music/poetry and mathematics is not only an abstract one. While growing up, I learned from my grandfather how so much incredible mathematics was discovered in ancient times by Indian scholars, who considered themselves not mathematicians but poets (or linguists). Linguists such as Panini, Pingala, Hemachandra and Narayana discovered some wonderful and deep (and now very important and ubiquitous) mathematical concepts while studying poetry.
Here is an example, from before 200 BC, that has particularly fascinated me. In the rhythms of Sanskrit poetry, there are two kinds of syllables — long and short.
A long syllable lasts two beats, and a short syllable lasts one beat. A question that naturally arose for ancient poets was, how many rhythms can one construct with exactly 8 beats, consisting of long and short syllables? For instance, one can take long-long-long-long, or short-short-short-long-long-short, and so on.
The answer was discovered by the ancients, and is contained in Pingala's classical work Chandashastra, which dates back to between 500 and 200 BC.
Here is the elegant solution. We write down a sequence of numbers as follows. We first write down the numbers 1 and 2, and then each subsequent number is obtained by adding up the two previous numbers.
So, for example, we start with 1 and 2, and then 1+2 is 3, so we have so far 1 2 3. The next number is obtained by adding up the last two numbers 2 and 3, which is 5. So we have so far 1 2 3 5. The next number written is then 3+5 which is 8. In this way, we get a sequence of numbers 1 2 3 5 8 13 21 34 55 89 ....The n-th number written tells you the total number of rhythms, consisting of long and short syllables, having ‘n’ beats. So, for 8 beats, the answer is that there are 34 such rhythms in total.
This sequence of numbers is now ubiquitous in mathematics, as well as in a number of other arts and sciences! The numbers are known as the Hemachandra numbers, after the 11th century linguist who first documented and proved their method of generation, called a ‘recurrence relation’ in modern mathematics.
The numbers are also known as the Fibonacci numbers in the West, after the famous Italian mathematician who wrote about them in the 12th century.
These numbers play an important role now in so many areas of mathematics (there is even an entire mathematical journal, the Fibonacci Quarterly, devoted to them!) They also arise in botany and biology.
For example, the number of petals on a daisy tends to be one of these Hemachandra numbers, and similarly for the number of spirals on a pine cone.
One of my favorite photographs, which I keep in my office, is of a vast field of daisies in which every daisy has 34 petals! (Recall that 34 is the same number that appeared as the answer to our question about 8 beat rhythms, revealing a hidden connection that mathematicians now understand.)
This story inspired me as a youngster because it is a wonderful example of how simple ideas grew into concepts so omnipresent, important, and deep, unraveling surprising and beautiful connections between different realms of thought. There are many examples of this phenomenon in mathematics and its sister areas.
I grew up learning many examples from Sanskrit poetry, but it happens throughout the subject of mathematics, and is one of those things that always makes a mathematician's eyes light up.
In some sense, this is the kind of mathematics that still inspires me, and that I still strive for when I do research in number theory.
I think the same is true of all mathematicians. It's about finding the simple questions and ideas that lead one to unexpected, unexplored realms — and to deep, elegant, and lasting mathematics.
There are widespread misconceptions regarding the applications of mathematics. History has shown that much of the greatest and most applicable mathematics has been discovered not by thinking about applications, but by following one's nose and looking for what is most beautiful and elegant.
The area that I work in personally has had many recent applications in the areas of cryptography and coding theory, although I don't think about these applications directly when thinking about mathematics.
My advice to young people is to pursue whatever your passion is — that is where you will do your best work. If that passion is mathematics, pursue mathematics. The country needs you! And, remember to always think of mathematics not just as a science, but also as a creative art.
Ramanujan – 22 Dec 1887-26 April 1920
Ramanujan had no formal training in pure mathematics, but from the age of 10, he mastered the works of other mathematicians, such as S.L. Loney’s trigonometry, and the works of Bernoulli and Euler, to whom the Cambridge mathematician and Ramanujan’s mentor-collaborator G.H. Hardy compared him.
In 1904, Ramanujan received a scholarship to study at Government College, Kumbakonam, but lost it the next year when he failed in other subjects because he wanted to do only Mathematics. He ran away from home, landed at Pachaiyappa’s College, Madras, which he left without a degree and for a while lived in extreme povery and on the brink of starvation.
Ramanujan then met deputy collector V. Ramaswamy Iyer, who had recently founded the Indian Mathematical Society, and asked him for a job as a clerk in the revenue department. Iyer, instead, gave him letters of recommendation to meet other mathematicians in Madras. Iyer later said, “I was struck by the extraordinary mathematical results contained in it [the notebooks]. I had no mind to smother his genius by an appointment in the lowest rungs of the revenue department.
Eventually, through his mathematician friends, both Indian and British, Ramanujan sent some of his work to Prof. Hardy at Cambridge University in 1913. The next year, on Prof. Hardy’s persistent invitation, he sailed to England. The two collaborated for over five years. But as Ramanujan’s health failed, he returned to India where he died in 1920.
Ramanujan developed much of his mathematics in isolation while still in India, and his works – mostly only the results, because he never wrote down the proofs to his conjectures on paper, but is said to have worked on them with chalk and slate because paper was expensive – are contained in three notebooks, totalling about 640 pages in all. A fourth notebook of 87 unorganised pages, called the ‘Lost Notebook’ was rediscovered in 1976. His works have inspired many, including Prof. Hardy himself, to explore and create new branches of mathematics.
Ramanujan’s Notebooks 1, 2 and 3 were published as a two volume set, as a photocopy edition of the original manuscripts, in 1957 by TIFR, Mumbai.
An international publication, The Ramanujan Journal, was launched to publish work in all areas of mathematics influenced by his work.
Next: The other side of the mathematics genius
It is true for 20, 21, and 22 as well. I can more numbers if you want (and if they exist).Amber G. wrote:In honor of Ramanujan, Here is one problem posed by him... A *VERY* simple looking problem, see if we have a solution here...
(1+n!) is a perfect square when n=4 or 5 or 7, can you find another number for which this is true.
(n! means 1x2x3...n, for example 4! = 1x2x3x4 = 24
5! = 1x2x3x4x5 = 120
and 7! = 120x6x7 etc...)
Ok computer gurus .. or math gurus ... find another n...
Really?? What whole number is the square root of (1 + 20!) then? I think you might have a mistake in your calculations.abhischekcc wrote:It is true for 20, 21, and 22 as well. I can more numbers if you want (and if they exist).Amber G. wrote:In honor of Ramanujan, Here is one problem posed by him... A *VERY* simple looking problem, see if we have a solution here...
(1+n!) is a perfect square when n=4 or 5 or 7, can you find another number for which this is true.
(n! means 1x2x3...n, for example 4! = 1x2x3x4 = 24
5! = 1x2x3x4x5 = 120
and 7! = 120x6x7 etc...)
Ok computer gurus .. or math gurus ... find another n...
I also found the above and N's and also tested up to N of 45 (only). Since you said there is a Wiki page, do you know by who andITEM 31 (Schroeppel):
Ramanujan's problem of solutions to
N 2
2 - 7 = X
was searched to about N = 10^40; only his solutions (N = 3, 4, 5, 7, 15) were found. It has recently been proven that these are the only ones. Another Ramanujan problem: Find all solutions of n! + 1 = x^2.
20!+1 is nothing but 20639383 * 117876683047 and each of them is prime, let alone a square.ArmenT wrote:Really?? What whole number is the square root of (1 + 20!) then? I think you might have a mistake in your calculations.It is true for 20, 21, and 22 as well. I can more numbers if you want (and if they exist).
Wiki has this ..PAGEmatrimc wrote:
I also found the above and N's and also tested up to N of 45 (only). Since you said there is a Wiki page, do you know by who andwhenthe proof was given?
Thanks
EDIT: Looks like it was proved in the late 60's early 70's.
See the link I gave above... for link with 2^n type problem..matrimc wrote:In fact a Mersenne Number is defined to be 2^n-1 and Mersenne Prime is a Mersenne Number that is prime. Wikipedia directs to Mersenne Prime for Mersenne Number (since Mersenne Number definition is trivial). May be there should be a separate page for "Mersenne Number" on Wikipedia so that 2^n - 7 problem can be found from there and cross-linked from Ramanujan page. Fast computation of large Mersenne Numbers is of interest to find large primes as well as parallelization of the same.