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.

This page as a plain text file.
%I A113076 #38 Jun 20 2024 02:42:30
%S A113076 17,277,37,47,577,67,-1,877,97,107,11777,127,137,-1,157,167,1777,1877,
%T A113076 197,20777777,-1,227,2377,2477,257,2677,277,-1,
%U A113076 29777777777777777777777777777777777777777777777777,307,317,3277777
%N A113076 Smallest prime obtained by appending one or more 7's to n, -1 if no such prime exists.
%H A113076 Toshitaka Suzuki, <a href="/A113076/b113076.txt">Table of n, a(n) for n = 1..94</a>
%e A113076 a(17) = 1777 is the smallest prime obtained by appending two 7s to 17.
%t A113076 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 *)
%t A113076 Select[Table[First[Select[Rest[FromDigits/@Table[PadRight[{x},n,7],{n,50}]],PrimeQ]],{x,35}],NumberQ]//Quiet  (* _Harvey P. Dale_, Jan 16 2011 *)
%Y A113076 Cf. A030432, A112386, A112394.
%K A113076 sign,base
%O A113076 1,1
%A A113076 _Parthasarathy Nambi_, Jan 03 2006
%E A113076 More terms from _Stefan Steinerberger_, Jan 27 2006
%E A113076 Name and Data corrected by _Toshitaka Suzuki_, May 21 2023