login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A083289 Least k such that 10^n+k is a brilliant number (cf. A078972). 2
3, 0, 21, 3, 201, 13, 18081, 43, 140049, 81, 600009, 147, 6000009, 73, 380000361, 3, 1400000049, 831, 14000000049, 49, 380000000361, 987, 600000000009, 691, 78000000001521, 183, 740000000001369, 4153, 6200000000000961, 279 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
COMMENTS
If n is an even positive exponent, then a(n) is the first prime greater than 10^(n/2) squared less 10^n.
LINKS
Dario Alejandro Alpern, Brilliant numbers
MATHEMATICA
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}]
PROG
(Python)
from sympy import nextprime, factorint
def A083289(n):
a, b = divmod(n, 2)
c, d = 10**n, 10**a
if b == 0: return nextprime(d)**2-c
k = 0
while True:
fs = factorint(c+k, multiple=True)
if len(fs) == 2 and min(fs) >= d:
return k
k += 1 # Chai Wah Wu, Sep 28 2021
CROSSREFS
Sequence in context: A215583 A215678 A186747 * A108196 A370015 A328341
KEYWORD
base,nonn
AUTHOR
Jason Earls, Jun 03 2003
EXTENSIONS
Edited and extended by Robert G. Wilson v, Jun 27 2003
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 21:09 EDT 2024. Contains 371798 sequences. (Running on oeis4.)