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.

Previous Showing 11-18 of 18 results.

A099664 a(n) is the largest prime before A002278(n).

Original entry on oeis.org

3, 43, 443, 4441, 44417, 444443, 4444409, 44444399, 444444443, 4444444429, 44444444441, 444444444443, 4444444444439, 44444444444353, 444444444444421, 4444444444444423, 44444444444444411, 444444444444444419
Offset: 1

Views

Author

Labos Elemer, Nov 17 2004

Keywords

Examples

			n=2: 43 is before 44.
		

Crossrefs

Programs

  • Mathematica
    <Harvey P. Dale, Feb 25 2013 *)

A200065 Start with n, concatenate its trivial divisors, and repeat until a prime is reached. a(n) = 0 if no prime is ever reached.

Original entry on oeis.org

0, 0, 13, 0, 0, 0, 17, 0, 19, 0, 1111111111111111111, 0, 113, 0, 0, 0, 1117, 0, 11119, 0, 111121, 0, 1123, 0, 0, 0, 127, 0, 1129, 0, 131, 0
Offset: 1

Views

Author

Arkadiusz Wesolowski, Apr 18 2012

Keywords

Comments

a(33) has 715 digits and is too large to include.
a(A065502(n)) = 0. There are other integers for which a(n) = 0 (i.e., n = 221).
The number (10^270343 - 1)/9 appears 161046 times in this sequence.
All odd primes from A096497 are in the sequence.

Examples

			17 -> {1, 17} = 117 (composite) -> {1, 117} = 1117 (prime), so a(17) = 1117.
		

Crossrefs

Programs

  • Mathematica
    lst = {}; Do[If[DivisorSigma[0, n] == 1 || Divisible[n, 5] || EvenQ[n], AppendTo[lst, 0], If[PrimeQ[n], n = 10^Length[IntegerDigits[n]] + n]; While[True, If[PrimeQ[n], Break[]]; n = FromDigits[Flatten[IntegerDigits[{1, n}]]]]; AppendTo[lst, n]], {n, 32}]; lst

A384873 a(n) is the smallest n-digit zeroless prime.

Original entry on oeis.org

2, 11, 113, 1117, 11113, 111119, 1111151, 11111117, 111111113, 1111111121, 11111111113, 111111111149, 1111111111139, 11111111111123, 111111111111229, 1111111111111123, 11111111111111119, 111111111111111131, 1111111111111111111, 11111111111111111131
Offset: 1

Views

Author

Gonzalo Martínez, Jun 11 2025

Keywords

Comments

This sequence differs from A096497: besides differing in the repunit primes (A004022), it also excludes terms containing the digit 0, such as A096497(53).
Repunits primes (A004022) are in this sequence. In fact, a(A004023(k)) = A004022(k), for all k >= 1.
With the exception of a(1) = 2, the terms begin with strings of 1's. The first term to include all positive even digits is a(1756) = 111....126843.

Examples

			The list of 3-digit prime numbers starts with 101, 103, 107, 109, and 113. Among these, 113 is the first that does not contain the digit 0. So, a(3) = 113.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local x;
    for x from (10^n-1)/9 by 2 do
      if isprime(x) and not member(0,convert(x,base,10)) then return x fi
    od
    end proc:
    f(1):= 2:
    map(f, [$1..20]); # Robert Israel, Jun 12 2025
  • Mathematica
    a[n_]:=Module[{k=PrimePi[10^n/9-1]},Until[DigitCount[Prime[k],10,0]==0,k++];Prime[k]] (* James C. McMahon, Jun 21 2025 *)
  • PARI
    a(n) = forprime(p=(10^n-1)/9, , if (vecmin(digits(p)), return(p))); \\ Michel Marcus, Jun 15 2025
  • Python
    from itertools import product
    from sympy import isprime
    def a(n):
        for t in product('123456789', repeat=n):
            p = int(''.join(t))
            if isprime(p): return p
    print([a(n) for n in range(1, 21)])
    
  • Python
    from sympy import nextprime
    def A384873(n):
        m = nextprime((10**n-1)//9-1)
        while '0' in str(m):
            m = nextprime(m)
        return m # Chai Wah Wu, Jun 20 2025
    

A099657 a(n) is the least prime following A002277(n) repdigits.

Original entry on oeis.org

2, 5, 37, 337, 3343, 33343, 333337, 3333373, 33333347, 333333349, 3333333403, 33333333343, 333333333367, 3333333333347, 33333333333437, 333333333333389, 3333333333333343, 33333333333333391, 333333333333333391
Offset: 0

Views

Author

Labos Elemer, Nov 17 2004

Keywords

Examples

			n=3: 33 is followed by 37.
		

Crossrefs

Programs

  • Mathematica
    Table[NextPrime[3*(10^n-1)/9], {n, 0, 35}]

A099661 a(n) is the least prime following A002281(n) repdigits.

Original entry on oeis.org

2, 11, 79, 787, 7789, 77783, 777781, 7777801, 77777803, 777777799, 7777777781, 77777777827, 777777777841, 7777777777859, 77777777777837, 777777777777787, 7777777777777867, 77777777777777797, 777777777777777817
Offset: 0

Views

Author

Labos Elemer, Nov 17 2004

Keywords

Examples

			n=6: 77 is followed by 79.
		

Crossrefs

Programs

  • Mathematica
    Table[NextPrime[7*(10^n-1)/9], {n, 0, 35}]
    NextPrime/@LinearRecurrence[{11,-10},{0,7},35] (* Harvey P. Dale, Dec 12 2021 *)

A099663 a(n) is the largest prime before A002276(n).

Original entry on oeis.org

19, 211, 2221, 22193, 222199, 2222219, 22222199, 222222193, 2222222137, 22222222189, 222222222169, 2222222222197, 22222222222201, 222222222222151, 2222222222222203, 22222222222222153, 222222222222222221, 2222222222222222177, 22222222222222222169, 222222222222222222149, 2222222222222222222161
Offset: 2

Views

Author

Labos Elemer, Nov 17 2004

Keywords

Examples

			n=2: 19 is before 22.
		

Crossrefs

Programs

  • Mathematica
    Table[NextPrime[2(10^n-1)/9, -1], {n, 2, 35}]
    Drop[NextPrime[#,-1]&/@LinearRecurrence[{11,-10},{0,2},20],2] (* Harvey P. Dale, Dec 19 2020 *)

Formula

a(n) = A007917(A002276(n)). - Michel Marcus, Jun 29 2025

Extensions

More terms from Michel Marcus, Jun 29 2025

A099665 a(n) is the largest prime before A002279(n).

Original entry on oeis.org

3, 53, 547, 5531, 55547, 555523, 5555527, 55555553, 555555541, 5555555519, 55555555543, 555555555551, 5555555555551, 55555555555541, 555555555555529, 5555555555555539, 55555555555555519, 555555555555555487, 5555555555555555533, 55555555555555555483, 555555555555555555491
Offset: 1

Views

Author

Labos Elemer, Nov 17 2004

Keywords

Examples

			n=2: 53 is before 55.
		

Crossrefs

Programs

  • Mathematica
    Table[NextPrime[5*(10^n-1)/9, -1], {n, 1, 35}]
    NextPrime[#,-1]&/@Table[FromDigits[PadRight[{},n,5]],{n,20}] (* Harvey P. Dale, Aug 31 2015 *)

Formula

a(n) = A007917(A002282(n)). - Amiram Eldar, Jun 29 2025

A099666 a[n] is the largest prime before A002280[n] repdigits.

Original entry on oeis.org

5, 61, 661, 6661, 66653, 666649, 6666617, 66666653, 666666653, 6666666661, 66666666643, 666666666619, 6666666666629, 66666666666647, 666666666666647, 6666666666666571, 66666666666666601, 666666666666666661
Offset: 1

Views

Author

Labos Elemer, Nov 17 2004

Keywords

Examples

			n=2: 61 is before 66.
		

Crossrefs

Programs

  • Mathematica
    <
    				
Previous Showing 11-18 of 18 results.