Generalised Hamming Number - MATLAB Cody - MATLAB Central

Problem 2674. Generalised Hamming Number

Difficulty:Rate

Inspired by Project Euler n°204 and Problem 1308 by James

A generalised Hamming number of type n, has no prime factor larger than n.

For example a generalised Hamming number of type 5 has no prime factor larger than 5.

Given a number X, determine how many generalised Hamming numbers n are less than or equal to that number. Please note that 1 counts as a Hamming number.

Solution Stats

36.02% Correct | 63.98% Incorrect
Last Solution submitted on May 01, 2025

Problem Comments

Solution Comments

Show comments
PIVlab surpasses 100K all-time File Exchange downloads
During the past twelve months, PIVlab, a MATLAB Community Toolbox for particle...
4
8
LLMs with MATLAB updated to support the latest OpenAI Models
Large Languge model with MATLAB, a free add-on that lets you access...
2
4

Problem Recent Solvers332

Suggested Problems

More from this Author43

Problem Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!