Created
June 28, 2022 13:00
-
-
Save neoneye/a54947142434492a2e73d2a678be869d to your computer and use it in GitHub Desktop.
PARI/GP create OEIS bfile in browser
This file contains hidden or 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
bfile(name, v, offset=1, limit=1000)={ | |
my(cur=offset-1,F); | |
for(i=1,#v, | |
if (#Str(v[i]) > limit, | |
print("Next term has "#Str(v[i])" digits; exiting."); | |
break | |
); | |
my(s=Str(cur++, " ", v[i])); | |
print(s); | |
); | |
}; | |
\\ Example of how to use | |
a(n) = (n+sqrtint(5*n^2))\2; | |
myvec = [a(n)|n<-[0..100]]; | |
bfile("A066096", myvec, 0); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment