Lucky Number Checker

Sieve-based number filter

CalculatorsFreeNo Signup
4.8(129 reviews)
All Tools

Loading tool...

About Lucky Number Checker

A lucky number checker using the sieve of lucky numbers. Start with odds: 1,3,5,7,9,11,13,15,17,19... Remove every 3rd → 1,3,7,9,13,15,19,21,25... Remove every 7th → 1,3,7,9,13,15,21,25... Continue. Survivors are lucky numbers. Client-side.

Lucky Number Checker Features

  • Lucky test
  • Sieve generation
  • Sequence
  • Comparison to primes
  • Statistics
Lucky numbers: sieve starting with odd integers, repeatedly removing every kth remaining number. Result: 1,3,7,9,13,15,21,25,31,33,37,43,49,51,63... Share many properties with primes: twin lucky numbers, Goldbach-like conjecture, similar density (~1/ln n).

How to Use

Enter n or test a value:

  • Test: Is n lucky?
  • Sequence: Lucky numbers up to n
  • Count: How many lucky ≤ n

The Sieve

1. Start: 1,3,5,7,9,11,13,15,17,19,21,...
2. Second number is 3, remove every 3rd: 1,3,7,9,13,15,19,21,25,...
3. Third number is 7, remove every 7th: 1,3,7,9,13,15,21,25,31,...
4. Continue with each surviving number as the sieve factor.

Lucky vs Primes

Amazingly similar! Both have density ~1/ln(n). Both have infinitely many 'twins' (conjectured). Both satisfy a Goldbach-like conjecture. Yet they're defined completely differently — primes by multiplication, luckies by position.

Step-by-Step Instructions

  1. 1Enter number.
  2. 2Run sieve.
  3. 3Check membership.
  4. 4Count luckies.
  5. 5Compare to primes.

Lucky Number Checker — Frequently Asked Questions

Are lucky numbers and primes related?+

Not directly — they arise from different sieves. But statistically they're astonishingly similar: same asymptotic density, both have twin pairs, both satisfy Goldbach-type conjectures. This suggests that many 'prime-like' properties come from the sieving process itself, not multiplication.

What are twin lucky numbers?+

Lucky pairs differing by 2: (3,5 isn't lucky), (7,9), (13,15), (21,25 — not twin)... Actually (1,3), (3,7 — gap 4)... Twin luckies with gap 2: (7,9), (13,15), (31,33), (37,43 — gap 6). Like twin primes, conjectured to be infinite.

How efficient is the sieve?+

O(n log log n) in the sieve construction, similar to Eratosthenes. For each round, we remove every kth element. The number of rounds is ~√n. Very efficient for generating all lucky numbers up to n.

Share this tool: