Skip to content

Instantly share code, notes, and snippets.

@neoneye
neoneye / a338277_integer.rb
Last active February 4, 2021 15:01
Integer sequence A338277 generates a sunflower
items = []
values = Array.new(1000) do |i|
n = i + 2
x = (n ** 2) / 2
y = Integer.sqrt(x)
value = x % y
items << [n, x, y, value]
value
end
IO.write('a338277_values.csv', values.join("\n"))
@neoneye
neoneye / gist:a54947142434492a2e73d2a678be869d
Created June 28, 2022 13:00
PARI/GP create OEIS bfile in browser
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);
);
@neoneye
neoneye / main.py
Created March 14, 2024 15:41
Find available domain names by combining words
from tqdm import tqdm
import whois
import csv
# Base parts of the names to combine
base_parts = [
'paper', 'rock', 'scissors',
]
# Suffixes to append