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.

A232862 Least positive integer m <= n^2/2 + 3 such that the set {prime(k) - k: k = 1,...,m} contains a complete system of residues modulo n, or 0 if such a number m does not exist.

Original entry on oeis.org

1, 3, 4, 11, 9, 8, 10, 15, 29, 13, 23, 22, 23, 37, 32, 28, 48, 44, 53, 41, 45, 67, 76, 117, 119, 91, 121, 88, 89, 101, 72, 88, 100, 143, 144, 185, 145, 104, 176, 141, 144, 175, 187, 213, 121, 255, 128, 129, 189, 243, 122, 267, 275, 242, 209, 205, 130, 153, 263, 335
Offset: 1

Views

Author

Zhi-Wei Sun, Dec 01 2013

Keywords

Comments

Conjecture: a(n) > 0 for all n > 0.
Note that a(4) = 11 = 4^2/2 + 3.

Examples

			a(3) = 4 since prime(1) - 1 = prime(2) - 2 = 1, prime(3) - 3 = 2, prime(4) - 4 = 3, and {1,2,3} is a complete system of residues modulo 3.
		

Crossrefs

Programs

  • Mathematica
      L[m_,n_]:=Length[Union[Table[Mod[Prime[k]-k,n],{k,1,m}]]]
    Do[Do[If[L[m,n]==n,Print[n," ",m];Goto[aa]],{m,1,n^2/2+3}];
    Print[n," ",0];Label[aa];Continue,{n,1,60}]