java program that takes a 3 digit number n and finds out
whether
the number 2^n + 1 is prime, or if it is not prime find out
its
factors.
Answer Posted / nithi
2^n+1=2^n+1^n
(2^(n-2))^2+(1^(n-2))^2 [ like a^2 + b^2 ]
(2^(n-2)+1)*(2^(n-2)-1)) [ like (a+b) (a-b) ]
So factors is 2^(n-2)+1),2^(n-2)-1)
Is This Answer Correct ? | 0 Yes | 2 No |
Post New Answer View All Answers
Is null a value?
Why main function is static?
Explain about main thread in java?
What does bitwise or mean?
Which of the classes will have more memory allocated?
What is byte [] in java?
Explain the Propertie sof class?
Given a singly linked list, determine whether it contains a loop or not without using temporary space?
What is bean? Where it can be used?
Variable of the boolean type is automatically initialized as?
What is gc()?
Can keyword be used as identifier?
What Is Composition?
What kind of variables can a class consist?
Explain java coding standards for methods?