← Complete problem index

PROJECT EULER · #0226

A Scoop of Blancmange

Statement only · SolvedOriginal problem ↗

The blancmange curve is the set of points (x,y) such that 0x1 and y=n=0s(2nx)2n, where s(x) is the distance from x to the nearest integer.

The area under the blancmange curve is equal to ½, shown in pink in the diagram below.

blancmange curve

Let C be the circle with centre (14,12) and radius 14, shown in black in the diagram.

What area under the blancmange curve is enclosed by C?
Give your answer rounded to eight decimal places in the form 0.abcdefgh.

Write-up coming later

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