number-theory
how to represent a number as a sum of 4 primes?
Here is the problem (Summation of Four Primes) states that : The input contains one integer number N (N<=10000000) in every line. This is the number you will have to express as a summation of fou[详细]
2023-02-07 09:56 分类:问答Find sum of factors
Why does this code return the sum of factors of a number? In several Project Euler problems, you are asked to compute the sum of factors as a part of the problem.On one of the forums there, someone p[详细]
2023-01-30 20:19 分类:问答Fastest way to modify one digit of an integer
Suppose I have an int x = 54897, old digit index (0 based), and the new value f开发者_如何学Goor that digit. What\'s the fastest way to get the new value?[详细]
2023-01-19 03:33 分类:问答Sieve of Eratosthenes in Haskell
I\'m solving some classic problems in Haskell to develop my functional skills and I have a problem to implement an optimization suggested at this \"Programming Praxis\" site:[详细]
2023-01-19 01:41 分类:问答Greatest GCD between some numbers
We\'ve got some nonnegative numbers. We want to find the pair with maximum gcd. actually this maximum is more important than the pair![详细]
2023-01-15 12:44 分类:问答What's a nice method to factor gaussian integers?
I already have prime factorization (for integers), but now I want开发者_StackOverflow中文版 to implement it for gaussian integers but how should I do it? thanks!This turned out to be a bit verbose, bu[详细]
2022-12-20 11:35 分类:问答Calculating sum of geometric series (mod m)
I have a series S = i^(m) + i^(2m) + ...............+ i^(km)(mod m) 0 <= i < m, k may be very large (up to 100,000,000),m <= 300000[详细]
2022-12-08 06:56 分类:问答