<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>oeis on Math ∩ Programming</title><link>https://www.jeremykun.com/tags/oeis/</link><description>Recent content in oeis on Math ∩ Programming</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Thu, 09 Apr 2026 06:55:17 -0700</lastBuildDate><atom:link href="https://www.jeremykun.com/tags/oeis/index.xml" rel="self" type="application/rss+xml"/><item><title>The OEIS meta sequence and subway stations</title><link>https://www.jeremykun.com/shortform/2026-04-09-0556/</link><pubDate>Thu, 09 Apr 2026 06:55:17 -0700</pubDate><guid>https://www.jeremykun.com/shortform/2026-04-09-0556/</guid><description>A051070 is a sequence about OEIS sequences. a(n) is the n-th term in sequence A_n (or -1 if A_n doesn&amp;rsquo;t have enough terms).
So the first term in A051070 is 1 because A000001 is the number of groups of order n, and that sequence has 1 as its entry in index 1. A000002 is the Kolakoski sequence (what? For another time) and has value 2 in entry 2. The sequence continues: 1, 2, 1, 0, 2, 3, 0, 7, 8, 4, 63, 1, 316, &amp;hellip;</description></item><item><title>Deterministic Primality Testing for Limited Bit Width</title><link>https://www.jeremykun.com/2026/04/07/deterministic-miller-rabin/</link><pubDate>Tue, 07 Apr 2026 06:00:00 -0700</pubDate><guid>https://www.jeremykun.com/2026/04/07/deterministic-miller-rabin/</guid><description>Problem: Determine if a 32-bit number is prime (deterministically)
Solution: (in C++)
// Bases to test. Using the first 4 prime bases makes the test deterministic // for all 32-bit integers. See https://oeis.org/A014233. int64_t bases[] = {2, 3, 5, 7}; inline int countTrailingZeros(uint64_t n) { if (n == 0) return 64; return __builtin_ctzll(n); } int64_t modularExponentiation(int64_t base, int64_t exponent, int64_t modulus) { int64_t res = 1; int64_t b = base % modulus; int64_t e = exponent; while (e &amp;gt; 0) { if (e &amp;amp; 1) { // Doesn&amp;#39;t overflow because we assume 32-bit integer inputs res = (res * b) % modulus; } b = (b * b) % modulus; e &amp;gt;&amp;gt;= 1; } return res; } bool isPrime(int64_t n) { if (n &amp;lt; 2) return false; if (n &amp;lt; 4) return true; if (!</description></item><item><title>My 4-year-old declares 36 the best number</title><link>https://www.jeremykun.com/shortform/2025-02-23-1057/</link><pubDate>Sun, 23 Feb 2025 10:57:48 -0800</pubDate><guid>https://www.jeremykun.com/shortform/2025-02-23-1057/</guid><description>My four-year-old son has declared 36 to be the best number.
His reason: 36 is the only number (he knows of) that is both a square and a staircase number AND an up-and-down-staircase number.
&amp;ldquo;Staircase numbers&amp;rdquo; are what he calls triangular numbers (numbers that are the sum of the first $n$ integers). This name comes from the blocks he has that can be arranged into a staircase. He also calls them &amp;ldquo;step squad&amp;rdquo; numbers thanks to Numberblocks.</description></item><item><title>Carnival of Mathematics #209</title><link>https://www.jeremykun.com/2022/10/02/carnival-of-mathematics-209/</link><pubDate>Sun, 02 Oct 2022 08:00:00 +0000</pubDate><guid>https://www.jeremykun.com/2022/10/02/carnival-of-mathematics-209/</guid><description>Welcome to the 209th Carnival of Mathematics!
209 has a few distinctions, including being the smallest number with 6 representations as a sum of 3 positive squares:
$$\begin{aligned}209 &amp;= 1^2 + 8^2 + 12^2 \\\ &amp;= 2^2 + 3^2 + 14^2 \\\ &amp;= 2^2 + 6^2 + 13^2 \\\ &amp;= 3^2 + 10^2 + 10^2 \\\ &amp;= 4^2 + 7^2 + 12^2 \\\ &amp;= 8^2 + 8^2 + 9^2 \end{aligned}$$ As well as being the 43rd Ulam number, the number of partitions of 16 into relatively prime parts and the number of partitions of 63 into squares.</description></item><item><title>Carnival of Mathematics #197</title><link>https://www.jeremykun.com/2021/09/01/carnival-of-mathematics-197/</link><pubDate>Wed, 01 Sep 2021 08:00:00 +0000</pubDate><guid>https://www.jeremykun.com/2021/09/01/carnival-of-mathematics-197/</guid><description>Welcome to the 197th Carnival of Mathematics!
197 is an unseemly number, as you can tell by the Wikipedia page which currently says that it has “indiscriminate, excessive, or irrelevant examples.” How deviant. It’s also a Repfigit, which means if you start a fibonacci-type sequence with the digits 1, 9, 7, and then continue with $ a_n = a_{i-3} + a_{i-2} + a_{i-1}$, then 197 shows up in the sequence. Indeed: 1, 9, 7, 17, 33, 57, 107, 197, …</description></item><item><title>Searching for RH Counterexamples — Adding a Database</title><link>https://www.jeremykun.com/2020/09/11/searching-for-rh-counterexamples-adding-a-database/</link><pubDate>Fri, 11 Sep 2020 18:53:48 +0000</pubDate><guid>https://www.jeremykun.com/2020/09/11/searching-for-rh-counterexamples-adding-a-database/</guid><description>In the last article we set up pytest for a simple application that computes divisor sums $ \sigma(n)$ and tries to disprove the Riemann Hypothesis. In this post we’ll show how to extend the application as we add a database dependency. The database stores the computed sums so we can analyze them after our application finishes.
As in the previous post, I’ll link to specific git commits in the final code repository to show how the project evolves.</description></item></channel></rss>