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
using System; | |
// In the limit Hilbert curve, what percentage of order 1 Hilbert curves that appear in it are "right side up"? | |
namespace HilbertCalc { | |
class Program { | |
static void Main(string[] args) { | |
ulong[] curves = new ulong[] { 1, 0, 0, 0 }; // index 0 is "right side up," each subsequent index is 90 degrees counterclockwise | |
for (int i = 1; i <= 20; i++) { | |
Console.WriteLine($"Order {i} Hilbert curve:"); | |
ulong sum = curves[0] + curves[1] + curves[2] + curves[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
from numpy import prod | |
# Can we reorder the positive integers based on a logical ordering of their prime factorizations? | |
# If we could iterate through all finite-sized tuples of nonnegative integers, we could increment | |
# the first element of each to uniquely cover all possible prime factorizations. | |
# We can extend and invert the Cantor pairing function to generate all k-tuples for any positive k, | |
# but now we're only iterating through the integers with highest prime factor p(k). |
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
import os | |
import sage.all as sage | |
from itertools import combinations | |
from PIL import Image, ImageDraw | |
from typing import cast, Dict | |
from enum import Enum | |
os.system("clear") | |
class SimCircle: |
OlderNewer