A274261 Exhaustion numbers for the greedy prime offset sequence A135311.
1, 2, 4, 6, 11, 14, 19, 37, 38, 53, 50, 57, 80, 81, 99, 125, 131, 213, 156, 330, 161, 220, 173, 207, 244, 225, 312, 337, 234, 293, 462, 471, 434, 535, 349, 458, 470, 489, 477, 413, 527, 474, 619, 539, 554, 666, 743, 690, 1295, 740, 627, 617, 706, 911, 755, 867
Offset: 1
Keywords
Examples
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.
Links
- R. Michael Perry, A number sequence relating to the closepacking of primes
Programs
-
Mathematica
b[n_] := Module[{set = {}, m = 0, p, q, r}, p = Prime[n]; While[Length[set] < p - 1, m++; q = Mod[g[m], p]; If[FreeQ[set, q], set = Append[set, q]]]; r = Complement[Range[0, p - 1], set][[1]]; {n, p, r, m}] (* 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].*)
Comments