Data update
This commit is contained in:
parent
ed705008a8
commit
0df55f9f24
2196 changed files with 32999 additions and 3075 deletions
10
Task/Tau-number/PARI-GP/tau-number.parigp
Normal file
10
Task/Tau-number/PARI-GP/tau-number.parigp
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
mylist = []; \\ Initialize an empty list
|
||||
for (n=1, 10000, \\ Iterate from 1 to 10000
|
||||
if (n % numdiv(n) == 0, \\ Check if n is divisible by the number of its divisors
|
||||
mylist = concat(mylist, [n]); \\ If so, append n to the list
|
||||
if (#mylist == 100, break); \\ Break the loop if we've collected 100 numbers
|
||||
)
|
||||
);
|
||||
print1(mylist); \\ Return the list
|
||||
}
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
import "/math" for Int
|
||||
import "/fmt" for Fmt
|
||||
import "./math" for Int
|
||||
import "./fmt" for Fmt
|
||||
|
||||
System.print("The first 100 tau numbers are:")
|
||||
var count = 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue