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 A083289 #19 Jul 08 2023 18:09:19 %S A083289 3,0,21,3,201,13,18081,43,140049,81,600009,147,6000009,73,380000361,3, %T A083289 1400000049,831,14000000049,49,380000000361,987,600000000009,691, %U A083289 78000000001521,183,740000000001369,4153,6200000000000961,279 %N A083289 Least k such that 10^n+k is a brilliant number (cf. A078972). %C A083289 If n is an even positive exponent, then a(n) is the first prime greater than 10^(n/2) squared less 10^n. %H A083289 Chai Wah Wu, <a href="/A083289/b083289.txt">Table of n, a(n) for n = 0..42</a> %H A083289 Dario Alejandro Alpern, <a href="https://www.alpertron.com.ar/BRILLIANT.HTM">Brilliant numbers</a> %t A083289 NextPrim[n_] := Block[{k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; LengthBase10[n_] := Floor[ Log[10, n] + 1]; f[n_] := Block[{k = 0}, If[ EvenQ[n] && n > 1, NextPrim[ 10^(n/2)]^2 - 10^n, While[fi = FactorInteger[10^n + k]; Plus @@ Flatten[ Table[ # [[2]], {1}] & /@ fi] != 2 || Length[ Union[ LengthBase10 /@ Flatten[ Table[ # [[1]], {1}] & /@ fi]]] != 1, k++ ]; k]]; Table[ f[n], {n, 0, 30}] %o A083289 (Python) %o A083289 from sympy import nextprime, factorint %o A083289 def A083289(n): %o A083289 a, b = divmod(n,2) %o A083289 c, d = 10**n, 10**a %o A083289 if b == 0: return nextprime(d)**2-c %o A083289 k = 0 %o A083289 while True: %o A083289 fs = factorint(c+k,multiple=True) %o A083289 if len(fs) == 2 and min(fs) >= d: %o A083289 return k %o A083289 k += 1 # _Chai Wah Wu_, Sep 28 2021 %Y A083289 Cf. A078972, A084475, A084476. %K A083289 base,nonn %O A083289 0,1 %A A083289 _Jason Earls_, Jun 03 2003 %E A083289 Edited and extended by _Robert G. Wilson v_, Jun 27 2003