-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
275 changed files
with
2,070 additions
and
1,755 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ lpb $0 | |
mov $3,$0 | ||
pow $3,4 | ||
mod $3,$2 | ||
cmp $3,0 | ||
equ $3,0 | ||
sub $0,1 | ||
add $1,$3 | ||
lpe | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,16 @@ | ||
; A000364: Euler (or secant or "Zig") numbers: e.g.f. (even powers only) sec(x) = 1/cos(x). | ||
; Submitted by Sir Stooper | ||
; Submitted by Science United | ||
; 1,1,5,61,1385,50521,2702765,199360981,19391512145,2404879675441,370371188237525,69348874393137901,15514534163557086905,4087072509293123892361,1252259641403629865468285,441543893249023104553682821,177519391579539289436664789665,80723299235887898062168247453281,41222060339517702122347079671259045,23489580527043108252017828576198947741,14851150718114980017877156781405826684425,10364622733519612119397957304745185976310201,7947579422597592703608040510088070619519273805 | ||
|
||
mov $1,4 | ||
pow $1,$0 | ||
mul $0,2 | ||
mov $5,$0 | ||
add $0,1 | ||
mov $2,$0 | ||
lpb $0 | ||
sub $0,1 | ||
div $7,2 | ||
add $7,$3 | ||
mul $7,2 | ||
add $8,1 | ||
mov $3,$2 | ||
add $3,$8 | ||
pow $3,$5 | ||
sub $3,$7 | ||
mov $4,$5 | ||
bin $4,$2 | ||
mul $4,$3 | ||
add $2,1 | ||
mul $6,-1 | ||
add $6,$4 | ||
mov $0,102 | ||
mov $1,51 | ||
mov $2,51 | ||
lpe | ||
gcd $6,$0 | ||
mov $0,$6 | ||
div $0,$1 | ||
add $2,$1 | ||
mov $1,4 | ||
pow $1,$2 | ||
seq $2,2436 ; E.g.f.: Sum_{n >= 0} a(n)*x^(2*n)/(2*n)! = sec(2*x). | ||
div $2,$1 | ||
mov $0,$2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,21 @@ | ||
; A001956: Beatty sequence of (5+sqrt(13))/2. | ||
; Submitted by p3d-cluster | ||
; Submitted by Ralfy | ||
; 4,8,12,17,21,25,30,34,38,43,47,51,55,60,64,68,73,77,81,86,90,94,98,103,107,111,116,120,124,129,133,137,141,146,150,154,159,163,167,172,176,180,185,189,193,197,202,206,210,215,219,223,228,232,236,240,245,249,253,258,262,266,271,275,279,283,288,292,296,301,305,309,314,318,322,327,331,335,339,344 | ||
; Formula: a(n) = d(n+1)+e(n+1), b(n) = truncate((-c(n-1)+b(n-1))/2), b(3) = -18, b(2) = -4, b(1) = 0, b(0) = 1, c(n) = 4*gcd(max(d(n-1)-2,0)+truncate((-c(n-1)+b(n-1))/2)-1,4)*c(n-1), c(3) = 128, c(2) = 32, c(1) = 8, c(0) = 2, d(n) = truncate(gcd(max(d(n-1)-2,0)+truncate((-c(n-1)+b(n-1))/2)-1,4)/2), d(3) = 0, d(2) = 0, d(1) = 0, d(0) = 0, e(n) = d(n-1)+e(n-1)+4, e(3) = 12, e(2) = 8, e(1) = 4, e(0) = 0 | ||
|
||
mov $1,1 | ||
mov $2,2 | ||
mov $1,$0 | ||
mul $1,2 | ||
add $0,1 | ||
lpb $0 | ||
sub $0,1 | ||
sub $1,$2 | ||
div $1,2 | ||
add $4,$3 | ||
add $4,4 | ||
trn $3,2 | ||
sub $3,1 | ||
add $3,$1 | ||
gcd $3,4 | ||
mul $2,4 | ||
mul $2,$3 | ||
div $3,2 | ||
lpe | ||
add $4,1 | ||
add $3,$4 | ||
mov $0,$3 | ||
mov $2,$0 | ||
mul $2,5 | ||
add $2,$0 | ||
mul $2,2 | ||
add $2,$0 | ||
mul $2,$0 | ||
nrt $2,2 | ||
add $2,$0 | ||
mov $0,$2 | ||
div $0,2 | ||
sub $0,1 | ||
add $1,$0 | ||
mov $0,$1 | ||
add $0,3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,17 @@ | ||
; A001965: u-pile count for the 4-Wythoff game with i=2. | ||
; Submitted by Geoff | ||
; Submitted by Science United | ||
; 0,1,3,4,5,6,8,9,10,11,12,14,15,16,17,19,20,21,22,24,25,26,27,29,30,31,32,33,35,36,37,38,40,41,42,43,45,46,47,48,50,51,52,53,55,56,57,58,59,61,62,63,64,66,67,68,69,71,72,73,74,76,77,78,79,80,82,83,84,85,87,88,89,90,92,93,94,95,97,98 | ||
|
||
mul $0,2 | ||
sub $1,$0 | ||
mov $2,$0 | ||
add $2,1 | ||
mov $3,$2 | ||
add $3,$2 | ||
mul $3,2 | ||
add $3,$2 | ||
mul $3,$2 | ||
nrt $3,2 | ||
add $3,$2 | ||
mov $2,$3 | ||
div $2,2 | ||
add $2,2 | ||
mov $1,$0 | ||
add $1,1 | ||
mov $2,$1 | ||
add $2,$1 | ||
mov $0,$2 | ||
sub $0,3 | ||
mul $2,2 | ||
add $2,$1 | ||
mul $2,$1 | ||
nrt $2,2 | ||
sub $2,$1 | ||
mov $1,$2 | ||
div $1,2 | ||
mov $0,$1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,15 @@ | ||
; A001966: v-pile counts for the 4-Wythoff game with i=2. | ||
; Submitted by shiva | ||
; Submitted by Vato | ||
; 2,7,13,18,23,28,34,39,44,49,54,60,65,70,75,81,86,91,96,102,107,112,117,123,128,133,138,143,149,154,159,164,170,175,180,185,191,196,201,206,212,217,222,227,233,238,243,248,253,259,264,269,274,280,285,290,295,301,306,311,316,322,327,332,337,342,348,353,358,363,369,374,379,384,390,395,400,405,411,416 | ||
|
||
mul $0,2 | ||
add $0,1 | ||
mov $2,$0 | ||
add $2,$0 | ||
mul $2,2 | ||
add $2,$0 | ||
mul $2,$0 | ||
nrt $2,2 | ||
add $2,$0 | ||
mov $1,$2 | ||
div $1,2 | ||
mov $1,$0 | ||
add $1,$0 | ||
mul $1,2 | ||
add $1,$0 | ||
mov $0,$1 | ||
mul $1,$0 | ||
nrt $1,2 | ||
add $1,$0 | ||
div $1,2 | ||
add $0,$1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,31 @@ | ||
; A002251: Start with the nonnegative integers; then swap L(k) and U(k) for all k >= 1, where L = A000201, U = A001950 (lower and upper Wythoff sequences). | ||
; Submitted by Science United | ||
; Submitted by Josemi | ||
; 0,2,1,5,7,3,10,4,13,15,6,18,20,8,23,9,26,28,11,31,12,34,36,14,39,41,16,44,17,47,49,19,52,54,21,57,22,60,62,24,65,25,68,70,27,73,75,29,78,30,81,83,32,86,33,89,91,35,94,96,37,99,38,102,104,40,107,109,42,112,43,115,117,45,120,46,123,125,48,128 | ||
|
||
mov $3,$0 | ||
mov $5,2 | ||
lpb $5 | ||
sub $5,1 | ||
add $0,$5 | ||
sub $0,1 | ||
mov $4,$0 | ||
max $4,0 | ||
seq $4,19445 ; Form a permutation of the positive integers, p_1, p_2, ..., such that the average of each initial segment is an integer, using the greedy algorithm to define p_n; sequence gives p_1 + ... + p_n. | ||
mov $2,$5 | ||
mul $2,$4 | ||
add $1,$2 | ||
add $0,1 | ||
mov $4,$0 | ||
mov $6,2 | ||
lpb $6 | ||
sub $6,1 | ||
mov $3,$4 | ||
add $3,$4 | ||
mul $3,2 | ||
add $3,$4 | ||
mul $3,$4 | ||
nrt $3,2 | ||
sub $3,$4 | ||
mov $2,$3 | ||
div $2,2 | ||
mov $0,$4 | ||
mul $0,2 | ||
mul $0,$2 | ||
div $0,2 | ||
sub $4,1 | ||
mov $5,$6 | ||
mul $5,$0 | ||
add $1,$5 | ||
lpe | ||
min $3,1 | ||
mul $3,$4 | ||
sub $1,$3 | ||
min $4,1 | ||
mul $4,$0 | ||
mov $0,$1 | ||
sub $0,1 | ||
sub $0,$4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ lpb $2 | |
add $3,$4 | ||
bin $3,$4 | ||
mod $3,$4 | ||
cmp $3,0 | ||
equ $3,0 | ||
sub $0,$3 | ||
add $1,1 | ||
sub $2,$0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
; A003070: a(n) = ceiling(log_2 n!). | ||
; Submitted by Science United | ||
; Submitted by Coleslaw | ||
; 0,0,1,3,5,7,10,13,16,19,22,26,29,33,37,41,45,49,53,57,62,66,70,75,80,84,89,94,98,103,108,113,118,123,128,133,139,144,149,154,160,165,170,176,181,187,192,198,203,209,215,220,226,232,238,243,249,255,261,267,273,279,285,290,296,303,309,315,321,327,333,339,345,351,358,364,370,376,383,389 | ||
|
||
seq $0,33312 ; a(n) = n! - 1. | ||
mov $1,4 | ||
lpb $0 | ||
div $0,2 | ||
add $1,2 | ||
mul $1,$0 | ||
sub $0,1 | ||
lpe | ||
sub $1,1 | ||
log $1,2 | ||
mov $0,$1 | ||
div $0,2 | ||
sub $0,1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,15 @@ | ||
; A003623: Wythoff AB-numbers: floor(floor(n*phi^2)*phi), where phi = (1+sqrt(5))/2. | ||
; Submitted by Science United | ||
; Submitted by Matthias Lehmkuhl | ||
; 3,8,11,16,21,24,29,32,37,42,45,50,55,58,63,66,71,76,79,84,87,92,97,100,105,110,113,118,121,126,131,134,139,144,147,152,155,160,165,168,173,176,181,186,189,194,199,202,207,210,215,220,223,228,231,236,241,244,249,254,257,262,265,270,275,278,283,288,291,296,299,304,309,312,317,320,325,330,333,338 | ||
|
||
add $0,1 | ||
mov $2,$0 | ||
add $2,$0 | ||
mul $2,2 | ||
add $2,$0 | ||
mul $2,$0 | ||
nrt $2,2 | ||
add $2,$0 | ||
mov $1,$2 | ||
div $1,2 | ||
add $0,$1 | ||
mov $1,$0 | ||
mul $1,4 | ||
add $1,$0 | ||
mov $0,$1 | ||
mul $1,$0 | ||
nrt $1,2 | ||
add $1,$0 | ||
mov $2,$1 | ||
div $2,2 | ||
add $0,$2 | ||
add $0,$2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,15 @@ | ||
; A004937: a(n) = round(n*phi^2), where phi is the golden ratio, A001622. | ||
; Submitted by den777 | ||
; Submitted by Mads Nissen | ||
; 0,3,5,8,10,13,16,18,21,24,26,29,31,34,37,39,42,45,47,50,52,55,58,60,63,65,68,71,73,76,79,81,84,86,89,92,94,97,99,102,105,107,110,113,115,118,120,123,126,128,131,134,136,139,141,144,147,149,152,154,157,160,162,165,168,170,173,175,178,181,183,186,188,191,194,196,199,202,204,207 | ||
|
||
mov $2,$0 | ||
add $2,$0 | ||
mul $2,2 | ||
add $2,$0 | ||
mul $2,$0 | ||
nrt $2,2 | ||
add $2,11 | ||
add $2,$0 | ||
mov $1,$2 | ||
div $1,2 | ||
mov $1,$0 | ||
mul $1,4 | ||
add $1,$0 | ||
mov $0,$1 | ||
sub $0,5 | ||
mul $1,$0 | ||
nrt $1,2 | ||
add $1,3 | ||
add $1,$0 | ||
mov $2,$1 | ||
div $2,2 | ||
add $0,$2 | ||
sub $0,1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,17 @@ | ||
; A004957: a(n) = ceiling(n*phi^2), where phi is the golden ratio, A001622. | ||
; Submitted by Heijo | ||
; Submitted by cemicle123 | ||
; 0,3,6,8,11,14,16,19,21,24,27,29,32,35,37,40,42,45,48,50,53,55,58,61,63,66,69,71,74,76,79,82,84,87,90,92,95,97,100,103,105,108,110,113,116,118,121,124,126,129,131,134,137,139,142,144,147,150,152,155,158,160,163,165,168,171,173,176,179,181,184,186,189,192,194,197,199,202,205,207 | ||
|
||
mov $2,$0 | ||
add $2,$0 | ||
mul $2,2 | ||
add $2,$0 | ||
mul $2,$0 | ||
nrt $2,2 | ||
add $2,$0 | ||
mov $1,$2 | ||
div $1,2 | ||
add $1,1 | ||
mov $1,$0 | ||
add $1,$0 | ||
lpb $1 | ||
div $1,3 | ||
mul $1,4 | ||
lpe | ||
mul $1,2 | ||
add $1,$0 | ||
mul $1,$0 | ||
nrt $1,2 | ||
add $1,$0 | ||
mov $2,$1 | ||
div $2,2 | ||
add $2,1 | ||
add $2,$0 | ||
min $1,$2 | ||
mov $0,$1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.