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,13 @@
my @Fusc = 0, 1, 1, { |(@Fusc[$_ - 1] + @Fusc[$_], @Fusc[$_]) given ++$+1 } ... *;
sub comma { $^i.flip.comb(3).join(',').flip }
put "First 61 terms of the Fusc sequence:\n{@Fusc[^61]}" ~
"\n\nIndex and value for first term longer than any previous:";
for flat 'Index', 'Value', 0, 0, (1..4).map({
my $l = 10**$_;
@Fusc.first(* > $l, :kv).map: &comma
}) -> $i, $v {
printf "%15s : %s\n", $i, $v
}

View file

@ -0,0 +1,5 @@
multi fusc( 0 ) { 0 }
multi fusc( 1 ) { 1 }
multi fusc( $n where $n %% 2 ) { fusc $n div 2 }
multi fusc( $n ) { [+] map *.&fusc, ( $n - 1 ) div 2, ( $n + 1 ) div 2 }
put map *.&fusc, 0..60;