Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,9 @@
fcn happyNumbers{ // continously spew happy numbers
foreach N in ([1..]){
n:=N; while(1){
n=n.split().reduce(fcn(p,n){ p + n*n },0);
if(n==1) { vm.yield(N); break; }
if(n==4) break; // unhappy cycle
}
}
}

View file

@ -0,0 +1,2 @@
h:=Utils.Generator(happyNumbers);
h.walk(8).println();

View file

@ -0,0 +1 @@
Utils.Generator(happyNumbers).drop(0d1_000_000-1).next().println();