primes
nᵗʰ ugly number
Numbers whose only prime factors are 2, 3, or 5 are called ugly numbers. Example: 1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, ...[详细]
2023-02-02 05:34 分类:问答How much time should it take to find the sum of all prime numbers less than 2 million?
I was trying to solve this Project Euler Question. I implemented the sieve of euler as a helper class in java. It works pretty well for the small numbers. But when I input 2 million as the limit it do[详细]
2023-01-31 23:38 分类:问答Given Prime Number N, Compute the Next Prime?
A coworker just told me that the C# Dictionary collection resizes by prime numbers for arcane reasons relating to hashing. And my immediate question was, \"how does it kn开发者_StackOverflowow what th[详细]
2023-01-31 00:12 分类:问答deciding if a number is perfect or prime
the problem is : \"Write a function to find out if a number is a prime or perfect number.\" so far i have worked on the perfect part first and this is what i have:[详细]
2023-01-30 18:31 分类:问答Factoring large numbers [duplicate]
This question already has answers here: Closed 12 years ago. Possible Duplicate: Factor a large number efficiently with gmp[详细]
2023-01-29 10:35 分类:问答Python modifying wrong list?
I\'m trying to generate a list of primes using the this method. I need to loop through every number 2...n and check it for multiples of 2...n. For some reason, the wrong list seems to be getting modif[详细]
2023-01-28 05:27 分类:问答What is wrong with my implementation of this algorithm to compute the first N prime numbers?
I think the constructor is logically correct, I just can\'t figure out how to call it in the main ! :) Can anyone help please ? If someone would just have a quick look over my code it would be nice :)[详细]
2023-01-27 21:29 分类:问答Prime Factorization Program in Java
I am working on a prime factorization program implemented in Java. The goal is to find the largest prime factor of 600851475143 (Project Euler problem 3).[详细]
2023-01-27 08:51 分类:问答Computing prime numbers up to N integers
I am trying to write a little script myself to compute all of the prime numbers up to n (a user submitted argument) and would appreciate a little bit of help. I want to use ArrayLists to write this fu[详细]
2023-01-27 02:18 分类:问答Sieve of Eratosthenes in Java: A Puzzle and some optimization
I did a quick implementation of the SoE algo in Java (code at the end). The output on my dual core AMD processor is:[详细]
2023-01-24 19:58 分类:问答