Skip to content

Instantly share code, notes, and snippets.

@jason-s
jason-s / claude-4.6-sonnet-mrq.md
Created May 3, 2026 23:28
miller-rabin-testing-questions

[Claude 4.6 Sonnet, May 1 2026]

[Jason] For 2048-bit odd numbers, what fraction of them are multiples of at least one of the first 256 prime numbers?

[Claude] This is a classic inclusion-exclusion / sieve problem. Let me work through it carefully.

Setup

We want: among all 2048-bit odd numbers, what fraction are divisible by at least one prime in {3, 5, 7, 11, ..., p₂₅₆} where p₂₅₆ = 1619?

[Jason] Please factor $x^4+4x^3+18x^2+28x+77$

[ChatGPT] Try factoring it as a product of two quadratics. A good guess is something symmetric like

$$(x^2 + 2x + a)(x^2 + 2x + b).$$

Expanding gives:

$$x^4 + 4x^3 + (a+b+4)x^2 + (2a+2b)x + ab$$

@jason-s
jason-s / prime_divisibility_in_2048-bit_odd_numbers.md
Last active May 2, 2026 00:55
Claude-sonnet-4.6-20260501-Miller-Rabin

Conversation with Claude

Human (May 1, 2026, 5:19 PM):

For 2048-bit odd numbers, what fraction of them are multiples of at least one of the first 256 prime numbers?


Claude:

@jason-s
jason-s / 007-P2340220-1.JPG
Last active December 8, 2025 01:32
The analogic data-conversion systems digest (1981) pages 1-5
007-P2340220-1.JPG
@jason-s
jason-s / typst-vscode-quickstart.typ
Last active October 2, 2024 11:46
Typst VSCode quickstart
#set page(width: 20cm, height:auto)
#set heading(numbering: "1.")
= Fun with typst
The typst program is pretty neat!
- Extremely fast incremental recompile
- Easier syntax
- Markup includes a well-designed scripting language
@jason-s
jason-s / math-rosetta.md
Last active March 23, 2023 03:52
LaTeX -> typst migration guide
LaTeX (render) typst (render)
$$\sum_{i=0}^n i^2 = \frac{(n^2+n)(2n+1)}{6}$$ $$\sum_{i=0}^n i^2 = \frac{(n^2+n)(2n+1)}{6}$$ sum_(i=0)^n i^2 = ((n^2+n)(2n+1))/6
\lim_{\Delta x \to 0} \frac{\sin (x + \Delta x) - \sin x}{\Delta x} = \frac{d}{dx} \sin x = \cos x $$\lim_{\Delta x \to 0} \frac{\sin (x + \Delta x) - \sin x}{\Delta x} = \frac{d}{dx} \sin x = \cos x$$ lim_(Delta x->0) (sin (x + Delta x) - sin(x))/(Delta x) = d/(d x) sin x = cos x
\mathbf{T}(\theta) = \begin{bmatrix}\cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \end{bmatrix} (won't render in this form in GitHub Markdown math in a table) #let bf(x) = $upright(bold(#x))
#set math.mat(delim: "[")
bf(T)(theta) = mat(cos theta, -sin theta; sin theta, cos theta)
@jason-s
jason-s / html-table-border-test
Created January 4, 2023 17:24
Table border test for possible Chrome bug
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
body {
font-family: 'Segoe UI', 'Lucida Grande'
}
table {
border: 1px solid black;
border-collapse: collapse;
@jason-s
jason-s / README.md
Created June 29, 2022 13:52
MathJax in SVG

SVG_MathJax

This replaces MathJax inline markup in an <svg> element with SVG-rendered MathJax.

Usage is easy:

<html>
    <head>
 
@jason-s
jason-s / quepland-bonuses.txt
Last active April 14, 2022 03:15
Quepland 2 notes
Food side-effects
Jerky Bonus Cul Arts Hunting
-----
Rabbit +5 Knifesmanship 1 1
Deer +5 Archery 5 5 (18 Buck)
Bear +5 Hammership 30 50
Moose +5 Swordsmanship 45 65
Boar +5 Mining 35 43
Pigeon +5 Axemanship 1 1
@jason-s
jason-s / a1w.jpg
Last active December 24, 2021 21:57
a1w.jpg