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.

A113076 Smallest prime obtained by appending one or more 7's to n, -1 if no such prime exists.

Original entry on oeis.org

17, 277, 37, 47, 577, 67, -1, 877, 97, 107, 11777, 127, 137, -1, 157, 167, 1777, 1877, 197, 20777777, -1, 227, 2377, 2477, 257, 2677, 277, -1, 29777777777777777777777777777777777777777777777777, 307, 317, 3277777
Offset: 1

Views

Author

Parthasarathy Nambi, Jan 03 2006

Keywords

Examples

			a(17) = 1777 is the smallest prime obtained by appending two 7s to 17.
		

Crossrefs

Programs

  • Mathematica
    For[n = 1, n < 50, n++, If[n/7 <= Floor[n/7], k := 1; While[Not[PrimeQ[10^k*n + (10^k - 1)*7/9]], k++ ]; Print[10^k*n + (10^k - 1)*7/9]]] (* Stefan Steinerberger, Jan 27 2006 *)
    Select[Table[First[Select[Rest[FromDigits/@Table[PadRight[{x},n,7],{n,50}]],PrimeQ]],{x,35}],NumberQ]//Quiet  (* Harvey P. Dale, Jan 16 2011 *)

Extensions

More terms from Stefan Steinerberger, Jan 27 2006
Name and Data corrected by Toshitaka Suzuki, May 21 2023