Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6665551
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T02:44:07+00:00 2026-05-26T02:44:07+00:00

I have to get in java protected final static int [] SIEVE = new

  • 0

I have to get in java protected final static int [] SIEVE = new int [ 1 << 32 ];
But i cant force java to that.

Max sieve what i get is 2^26 i need 2^32 to end my homework. I tried with mask but i need to have SIEVE[n] = k where min{k: k|n & k >2}.

EDIT
I need to find Factor numbers from 2 to 2^63-1 using Sieve and sieve must have information that P[n]= is smallest prime with divide n. I know that with sieve i can Factorise number to 2^52. But how do that exercises with holding on to the content.

EDIT x2 problem solved

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T02:44:07+00:00Added an answer on May 26, 2026 at 2:44 am

    If you really need to store that much data in memory, try using java.util.LinkedList collection instead.

    However, there’s a fundamental flaw in your algorithm if you need to store 16GB of data in memory.
    If you’re talking about Sieve of Eratosthenes and you need to store all primes < 2^32 in an array, you still wouldn’t need an array of size 2^32. I’d suggest you use java.util.BitSet to find the primes and either iterate and print or store them in a LinkedList as required.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

It doesn't seem to be working right now. I get a java.lang.NullPointerException I have
I'm still trying to get my head around using Java's generics. I have no
So, i have some question about xml Documents in Java. Can i get all
So I have a class that has the following member variables. I have get
i have to get static information from one 'module' to another. I'm trying to
I am new to Java and junit. I have the following peice of code
I have the following code but I get an error on this line userSpinner.setAdapter(adapter);
I have a method with this signature: protected final Map<String, Object> buildOutputMappings( AbstractDataObject ado,
I have one activity/java file (Browsefile.java) that would obtain the absolute path of the
I'm fairly new to Java, and I need some help figuring out a good

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.