Note: In all formulas, n is the number being tested for primality. In all formulas, n is the number being tested for primality. In all formulas, n is the number being tested for primality. In all formulas, n is the number being tested for primality. 1. Trial division test. Divide n by each prime from 2 to ceiling(n{\displaystyle {\sqrt {n}}}). 2. Fermat's Little Theorem. Warning: false positives are possible, even for all values of a. Choose an integer value for a such that 2 â¤ a â¤ n - 1. If an (mod n) = a (mod n), then n is likely prime. If this is not true, n is not prime.
Wait at least two years. Hereâs where you will need patience: You should wait at least 24 months to apply for a mortgage after bankruptcy. You may be able to get a mortgage after bankruptcy sooner, but the terms, like interest rates, won't be as attractive as they would be if you waited two years. Since you might be paying that mortgage interest for up to 30 years, you will save money if you wait long enough after the discharge to get a good interest rate. Tips for when you're ready to apply for a mortgage. After the two-year period, make sure you are fully prepared to apply for a loan. Your lender will want you to meet certain criteria before agreeing to lend you money: A good debt-to-income ratio, stability and time on the job.
If youâve filed for bankruptcy in the past, youâll have to wait before you can discharge (wipe out) additional debt. The length of the waiting period will depend on the chapter filed previously. If you filed for Chapter 7 bankruptcy. Youâll be eligible for another discharge eight years after the first Chapter 7 filing. If you filed for Chapter 13 bankruptcy. Youâll have to wait four years before youâll be able to receive another Chapter 7 discharge.