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.

Showing 1-3 of 3 results.

A084475 a(n) defines the first brilliant number, b_n, greater than 10^n. If n is odd or zero, then b_n is 10^n+a(n); and if n is a positive even number, then b_n is {10^(n/2)+a(n)}^2.

Original entry on oeis.org

3, 0, 1, 3, 1, 13, 9, 43, 7, 81, 3, 147, 3, 73, 19, 3, 7, 831, 7, 49, 19, 987, 3, 691, 39, 183, 37, 4153, 31, 279, 37, 667, 61, 709, 3, 277, 3, 1687, 51, 997, 39, 1207, 117, 91, 9, 1411, 117, 393, 7, 951, 13, 9793, 67, 2217, 103, 6229, 331, 2317, 319, 213, 57, 399, 33, 19
Offset: 0

Views

Author

Jason Earls, Jun 03 2003

Keywords

Examples

			a(5)=13 because 10^5+13 = 100013 = 103*971 and a(6)=9 because (10^3+9)^2 = 1009^2. For n>0, a(2n) = A033873(n).
		

Crossrefs

Programs

  • 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/2), 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, 63}]

Extensions

Edited and extended by Robert G. Wilson v, Jun 27 2003

A083289 Least k such that 10^n+k is a brilliant number (cf. A078972).

Original entry on oeis.org

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
Offset: 0

Views

Author

Jason Earls, Jun 03 2003

Keywords

Comments

If n is an even positive exponent, then a(n) is the first prime greater than 10^(n/2) squared less 10^n.

Crossrefs

Programs

  • 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}]
  • 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

Extensions

Edited and extended by Robert G. Wilson v, Jun 27 2003

A347818 Smallest n-digit brilliant number.

Original entry on oeis.org

4, 10, 121, 1003, 10201, 100013, 1018081, 10000043, 100140049, 1000000081, 10000600009, 100000000147, 1000006000009, 10000000000073, 100000380000361, 1000000000000003, 10000001400000049, 100000000000000831, 1000000014000000049, 10000000000000000049, 100000000380000000361
Offset: 1

Views

Author

Eric Chen, Sep 15 2021

Keywords

Comments

A brilliant number is a semiprime (products of two primes, A001358) whose two prime factors have the same number of decimal digits. For an n-digit brilliant number, the two prime factors must each have ceiling(n/2) decimal digits.
Since all brilliant numbers are semiprimes, a(n) >= A098449(n), also, a(n) = A098449(n) for n = 1, 2, 4, 16, 78, ..., are there infinitely many n such that a(n) = A098449(n)?

Examples

			a(6) =    100013 =   103 * 971.
a(7) =   1018081 =  1009 * 1009.
a(8) =  10000043 =  2089 * 4787.
a(9) = 100140049 = 10007 * 10007.
		

Crossrefs

Programs

  • Mathematica
    Join[{4,10},Table[Module[{k=1},While[PrimeOmega[10^n+k]!=2||Length[ Union[ IntegerLength/@ FactorInteger[ 10^n+k][[;;,1]]]]!=1,k+=2];10^n+k],{n,2,20}]] (* Harvey P. Dale, Jan 09 2024 *)
  • PARI
    isA078972(n)=my(f=factor(n)); (#f[, 1]==1 && f[1, 2]==2) || (#f[, 1]==2 && f[1, 2]==1 && f[2, 2]==1 && #Str(f[1, 1])==#Str(f[2, 1]))
    A084476(n)=for(k=0,10^n,if(isA078972(10^(2*n-1)+k),return(k)))
    a(n)=if(n%2,nextprime(10^((n-1)/2))^2,10^(n-1)+A084476(n/2)) \\ after Charles R Greathouse IV in A078972

Formula

a(n) = 10^(n-1) + A083289(n).
a(2*n) = 10^(2*n-1) + A084476(n).
a(2*n+1) = A003617(n+1)^2.
a(n) >= A098449(n).
Showing 1-3 of 3 results.