(from a in Observable.Generate<BigInteger, BigInteger>(BigI…

Twetch ·

(from a in Observable.Generate<BigInteger, BigInteger>(BigInteger.One, state => state <= new BigInteger(4_190_024_921), state => ++state, state => state).DumpLatest("x", true)
from b in Observable.Generate<BigInteger, BigInteger>(a, _ => true, b => ++b, b => b)
from c in Observable.Generate<BigInteger, BigInteger>(b, _ => true, c => ++c, c => c)
let aa = a*a
let bb = b*b
let cc = c*c
where (aa + bb == cc)
select new { abc = new { a, b, c }, aabbcc = new { aa, bb, cc }})
.DumpLatest("Pythagorean Triple", true)