Problem 57815. List numbers such that every sum of consecutive positive integers ending in those numbers is composite
The sequence in question in this problem involves numbers m such that all sums of consecutive positive integers ending with m are composite. The number 12 is not in the sequence because 11+12 is prime. The number 13 is not in the sequence because 13 is prime. However, 14 is in the sequence because all of the sums 14, 14+13, 14+13+12, etc. through 14+13+12+…+1 are composite.
Write a function that returns the nth number in this sequence.
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers6
Suggested Problems
-
Given an unsigned integer x, find the largest y by rearranging the bits in x
1819 Solvers
-
586 Solvers
-
Lychrel Number Test (Inspired by Project Euler Problem 55)
98 Solvers
-
Temperature Conversion Utility
45 Solvers
-
Decrypt the cypher using XOR encryption (for beginners)
44 Solvers
More from this Author279
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!