cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A274261 Exhaustion numbers for the greedy prime offset sequence A135311.

This page as a plain text file.
%I A274261 #19 Aug 25 2019 13:43:14
%S A274261 1,2,4,6,11,14,19,37,38,53,50,57,80,81,99,125,131,213,156,330,161,220,
%T A274261 173,207,244,225,312,337,234,293,462,471,434,535,349,458,470,489,477,
%U A274261 413,527,474,619,539,554,666,743,690,1295,740,627,617,706,911,755,867
%N A274261 Exhaustion numbers for the greedy prime offset sequence A135311.
%C A274261 The greedy prime offset sequence, A135311, is the close-packed integer sequence, starting with 0, such that for no prime p does the sequence form a complete system of residues modulo p. Instead, at least one residue must be missing for p, this is the (conjectured to be unique) "forbidden residue" for p. Every prime, it appears, has a unique forbidden residue. If this is true then every prime has an "exhaustion number" which is the number of terms of the greedy sequence needed to exhaust all the other residues and determine which one is forbidden. The uniqueness of the forbidden residue for any individual prime can be verified by calculation.
%C A274261 Note: I discovered the greedy sequence many years ago and did a writeup including discussion of forbidden residues and exhaustion numbers. See Links section.
%H A274261 R. Michael Perry, <a href="/A274261/a274261.pdf">A number sequence relating to the closepacking of primes</a>
%e A274261 The first few terms of the greedy offset sequence are 0, 2, 6, 8. For n=3, the n-th prime = 5. The residues of the greedy sequence modulo 5 are 0, 2, 1, 3 .... The first four residues exhaust all the possibilities but one, showing that 4 is the forbidden residue for 5 and the exhaustion number is also 4.
%t A274261 b[n_] := Module[{set = {}, m = 0, p, q, r}, p = Prime[n];
%t A274261   While[Length[set] < p - 1, m++; q = Mod[g[m], p];
%t A274261    If[FreeQ[set, q], set = Append[set, q]]];
%t A274261   r = Complement[Range[0, p - 1], set][[1]];
%t A274261   {n, p, r, m}]
%t A274261 (* b[n] returns a 4-element list: {n, Prime[n], forbidden_residue[n], exhaustion_number[n]}. g is the greedy sequence, see A135311 for Mathematica code, where a[n]=g[n].*)
%Y A274261 Cf. A135311, A274260.
%K A274261 nonn
%O A274261 1,2
%A A274261 _R. Michael Perry_, Jun 16 2016