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.
%I A107693 #49 Sep 08 2022 08:45:18 %S A107693 7,17,71,1117,1171,11117,11171,1111711,1117111,1171111,11111117, %T A107693 11111171,71111111,1117111111,1711111111,17111111111,1111171111111, %U A107693 11111111111111171,11111111171111111,1111111111111111171,1111171111111111111,1111711111111111111 %N A107693 Primes with digital product = 7. %C A107693 Subsequence of A034054. - _Michel Marcus_, Jul 27 2016 %C A107693 From _Bernard Schott_, Jul 12 2021: (Start) %C A107693 This sequence was the subject of the 1st problem, submitted by USSR, during the 31st International Mathematical Olympiad in 1990 at Beijing, but the jury decided not to use it in the competition. %C A107693 Problem was: Consider the m-digit numbers consisting of one '7' and m-1 '1'. For what values of m are all these numbers prime? (see the reference). %C A107693 Answer is: only for m = 1 and m = 2, all these m-digit numbers are primes, so, a(1) = 7, then a(2) = 17 and a(3) = 71. %C A107693 For other results, see A346274. (End) %D A107693 Derek Holton, A Second Step to Mathematical Olympiad Problems, Vol. 7, Mathematical Olympiad Series, World Scientific, 2011, & 8.2. USS 1 p. 260 and & 8.14 Solutions pp 284-287. %H A107693 Michael S. Branicky, <a href="/A107693/b107693.txt">Table of n, a(n) for n = 1..1318</a> (all terms with <= 1000 digits) %H A107693 <a href="/index/O#Olympiads">Index to sequences related to Olympiads</a>. %e A107693 1117 and 1171 are primes, but 1711 = 29 * 59 and 7111 = 13 * 547; hence a(4) = 1117 and a(5) = 1171. %t A107693 Flatten[ Table[ Select[ Sort[ FromDigits /@ Permutations[ Flatten[{7, Table[1, {n}]}]]], PrimeQ[ # ] &], {n, 0, 20}]] %t A107693 Select[Prime[Range[3 10^6]], Times@@IntegerDigits[#] == 7 &] (* _Vincenzo Librandi_, Jul 27 2016 *) %t A107693 Sort[Flatten[Table[Select[FromDigits/@Permutations[PadRight[{7},n,1]],PrimeQ],{n,20}]]] (* _Harvey P. Dale_, Aug 19 2021 *) %o A107693 (Magma) [p: p in PrimesUpTo(3*10^8) | &*Intseq(p) eq 7]; // _Vincenzo Librandi_, Jul 27 2016 %o A107693 (Python) %o A107693 from sympy import isprime %o A107693 def auptod(maxdigits): %o A107693 alst = [] %o A107693 for d in range(1, maxdigits+1): %o A107693 if d%3 == 0: continue %o A107693 for i in range(d): %o A107693 t = int('1'*(d-1-i) + '7' + '1'*i) %o A107693 if isprime(t): alst.append(t) %o A107693 return alst %o A107693 print(auptod(20)) # _Michael S. Branicky_, Jul 12 2021 %Y A107693 Cf. A034054. %Y A107693 Cf. A004022, A107612, A107689, A107690, A107691, A107692, A107694, A107695, A107696, A107697, A107698. %Y A107693 Cf. A346274. %K A107693 base,nonn %O A107693 1,1 %A A107693 _Zak Seidov_ and _Robert G. Wilson v_, May 20 2005 %E A107693 a(21) and beyond from _Michael S. Branicky_, Jul 12 2021