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-5 of 5 results.

A179975 Smallest k such that k*10^n is a sum of two successive primes.

Original entry on oeis.org

5, 3, 1, 6, 6, 6, 14, 6, 9, 19, 21, 21, 42, 93, 21, 6, 11, 2, 12, 111, 37, 39, 63, 38, 42, 24, 15, 15, 60, 6, 39, 82, 47, 58, 337, 49, 72, 25, 34, 21, 6, 107, 128, 96, 20, 2, 63, 231, 70, 7, 62, 144, 28, 151, 157, 33, 98, 55, 134, 162, 87, 201, 124, 303, 64, 106, 130, 13, 43
Offset: 0

Views

Author

Zak Seidov, Aug 04 2010

Keywords

Comments

From Robert G. Wilson v, Aug 11 2010: (Start)
A179975 n's such that a(n)=1: 3, 335, ..., .
A179975 First occurrence of k: 3, 18, 2, ???, 1, 4, 50, 162, 9, 335, 17, 19, 68, 7, 27, ..., .
Records: 5, 6, 14, 19, 21, 42, 93, 111, 337, 449, 862, 1049, 1062, 1122, 1280, 2278, 3168, 4290, ..., . (End)

Examples

			a(0)=5 because 5=2+3
a(1)=3 because 30=13+17
a(2)=1 because 100=47+53
a(3)=6 because 6000=2999+3001.
		

Crossrefs

Programs

  • Mathematica
    Join[{5,3},Reap[Do[Do[n=10^m k; If[n==PreviousPrime[n/2]+NextPrime[n/2],Sow[k];Break[]],{k,2000}],{m,2,50}]][[2,1]]]
    f[n_] := Block[{k = 1, tn = 10^n}, While[h = k*tn/2; NextPrime[h, -1] + NextPrime@h != k*tn, k++ ]; k]; f[1] = 3; Array[f, 70, 0] (* Robert G. Wilson v, Aug 11 2010 *)

Extensions

More terms from Robert G. Wilson v, Aug 11 2010

A084476 Least k such that 10^(2n-1)+k is a brilliant number.

Original entry on oeis.org

0, 3, 13, 43, 81, 147, 73, 3, 831, 49, 987, 691, 183, 4153, 279, 667, 709, 277, 1687, 997, 1207, 91, 1411, 393, 951, 9793, 2217, 6229, 2317, 213, 399, 19, 2317, 609, 2607, 11901, 10563, 5473, 3, 5923, 17527, 8569, 16701, 11989, 9757, 6489, 3489, 2899
Offset: 1

Views

Author

Robert G. Wilson v, Jun 27 2003

Keywords

Comments

Least brilliant number greater than 10^(2n) is {10^n+A033873(n)}^2. The web site also lists the two prime factors.

Examples

			a(3)=13 because 10^5+13 = 100013 = 103*971.
		

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[2n + 1], {n, 1, 24}]

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

A374350 Least n-digit reversible prime whose difference from its reversal is minimal.

Original entry on oeis.org

2, 11, 101, 1231, 10301, 105601, 1003001, 10012001, 100030001, 1007457001, 10000500001, 100124521001, 1000008000001, 10000523500001, 100000323000001, 1000034344300001, 10000000500000001, 100000188981000001, 1000000008000000001, 10000001189110000001, 100000000212000000001
Offset: 1

Views

Author

Robert G. Wilson v, Jul 05 2024

Keywords

Comments

Inspired by A084475 and A373349.
For n > 1, a(2n) has a difference of 9*10^n and a(2n-1) has a difference of 0.

Examples

			a(3) = 101 since its reversal is also 101;
a(4) = 1231 since its reversal is 1321 which is also prime and their difference is minimal at 90;
a(6) = 105601 since its reversal is 106501 which is also prime and their difference is minimal at 900;
a(8) = 10012001 since its reversal is 10021001 which is also prime and their difference is minimal at 9000; etc.
		

Crossrefs

Programs

  • Mathematica
    fe[n_] := Block[{k = 1, j, p, q}, While[ j = k(10^IntegerLength[k]) + IntegerReverse[k +1]; p = 10^(2 n -1) + j(10^(n - IntegerLength[j]/2)) + 1; q = IntegerReverse@ p; !PrimeQ@ p || !PrimeQ@ q, k++; If[ Mod[k, 10] == 9, k++]]; p]; fe[1] = 11;
    fo[n_] := Block[{k = 0, j, p}, While[ j = k(10^(IntegerLength[k] -1)) + IntegerReverse@ Quotient[k, 10]; p = 10^(2n -2) + j(10^(n - (IntegerLength[j] + 1)/2)) +1; !PrimeQ@ p, k++]; p];
    a[n_] := If[ OddQ@ n, fo[(n +1)/2], fe[n/2]]; Array[a, 21]

Formula

a(2n-1) = A100027(n) = A028989(n).

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-5 of 5 results.