Data update
This commit is contained in:
parent
796d366b97
commit
35bcdeebf8
504 changed files with 7045 additions and 610 deletions
6
Task/Factorial-primes/Maxima/factorial-primes.maxima
Normal file
6
Task/Factorial-primes/Maxima/factorial-primes.maxima
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
block([i:1,count:0,result:[]],
|
||||
while count<10 do (if primep(i!-1) or primep(i!+1) then (result:endcons(i,result),count:count+1),i:i+1),
|
||||
result:map(lambda([x],[x,x!-1,x!+1]),result),
|
||||
append(map(lambda([x],if primep(x[2]) then [x[1],x[2],"subtracted"]),result),map(lambda([x],if primep(x[3]) then [x[1],x[3],"added"]),result)),
|
||||
unique(%%),
|
||||
firstn(%%,10);
|
||||
Loading…
Add table
Add a link
Reference in a new issue