-
Notifications
You must be signed in to change notification settings - Fork 2
PARI GP
Gregory Morrison edited this page Feb 11, 2023
·
3 revisions
# Euler1 in PARI/GP
euler(n, acc) = {
if (n==0, return (acc));
if (! (n%3 && n%5), return (euler(n-1, acc+n)));
return (euler(n-1, acc));
};
euler1(size) = euler(size, 0);
print (euler1(999))
http://www.compileonline.com/execute_pari_online.php
$ gp -q euler1.gp
233168
$
Return home