← Complete problem index

PROJECT EULER · #0619

Square Subsets

Statement only · SolvedOriginal problem ↗

For a set of positive integers {a,a+1,a+2,,b}, let C(a,b) be the number of non-empty subsets in which the product of all elements is a perfect square.

For example C(5,10)=3, since the products of all elements of {5,8,10}, {5,8,9,10} and {9} are perfect squares, and no other subsets of {5,6,7,8,9,10} have this property.

You are given that C(40,55)=15, and C(1000,1234)mod1000000007=975523611.

Find C(1000000,1234567)mod1000000007.

Write-up coming later

The complete problem is available here. An approach, code, and answer will be added later.