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

A037062 a(n)-th prime is the smallest prime containing exactly n 5's.

Original entry on oeis.org

1, 3, 102, 733, 14319, 45741, 1004275, 3313338, 169807396, 259770566, 20255937351, 21366409911, 196256438549, 10949682060338, 16876678891444, 1376534319069676, 13702579963679833, 13947379867469643, 360360819534753751, 3421022095727840569, 93257415087729395138, 113268191247939457737
Offset: 0

Views

Author

Patrick De Geest, Jan 04 1999

Keywords

Crossrefs

Programs

  • Mathematica
    (* see A037063 for f *) PrimePi[ Table[ f[n, 5], {n, 1, 12}]]

Formula

a(n) = A000720(A037063(n)). - Amiram Eldar, Jul 20 2025

Extensions

a(0)=1 prepended by Sean A. Irvine, Dec 06 2020
a(13)-a(21) calculated using Kim Walisch's primecount and added by Amiram Eldar, Jul 20 2025

A065588 Smallest prime beginning with exactly n 5's.

Original entry on oeis.org

2, 5, 557, 5557, 555521, 555557, 55555517, 55555553, 5555555501, 5555555557, 5555555555057, 555555555551, 5555555555551, 555555555555529, 555555555555557, 55555555555555519, 5555555555555555021, 555555555555555559, 55555555555555555567, 5555555555555555555087
Offset: 0

Views

Author

Robert G. Wilson v, Nov 28 2001

Keywords

Crossrefs

Cf. A037063, A065584 - A065592. Different from A068105.

Programs

  • Python
    from sympy import isprime
    def a(n):
      if n < 2: return list([2, 5])[n]
      n5s, i, pow10, end_digits = int('5'*n), 1, 1, 0
      while True:
        i = 1
        while i < pow10:
          istr = str(i)
          if istr[0] == '5' and len(istr) == end_digits:
            i += 2 if pow10 <= 10 else pow10 // 10
          else:
            t = n5s * pow10 + i
            if isprime(t): return t
            i += 2
        pow10 *= 10; end_digits += 1
    print([a(n) for n in range(20)]) # Michael S. Branicky, Feb 05 2021, corrected Mar 03 2021

Extensions

Corrected by N. J. A. Sloane, Jan 11 2007 and by Don Reble, Jan 17 2007
Offset corrected by Michael S. Branicky, Feb 05 2021

A176096 Smallest prime p = p(n) containing exactly n strings "13" (n = 1, 2, ...).

Original entry on oeis.org

13, 13313, 1313813, 131313113, 13131313133, 1131313131313, 131313131313139, 13131313131313913, 1313131311313131313, 113131313131313131313, 13131313131313133131313, 1313131131313131313131313
Offset: 1

Views

Author

Eva-Maria Zschorn (e-m.zschorn(AT)zaschendorf.km3.de), Apr 08 2010

Keywords

Examples

			n = 1: prime(6) = 13 is 1st term of sequence
prime(12268) = 131303 > 21313 = prime(2392) > 13313 = prime(1581) = p(2), 2nd term of sequence
prime(857198) = 13131317 > 4131313 = prime(291796) > prime(102949) = 1341313 > 1313813 = prime() = p(3), 3rd term of sequence
n = 13: 131131313131313131313131313 a 27-digit prime is 13th term of sequence
		

References

  • E. I. Ignatjew, Mathematische Spielereien, Urania Verlag Leipzig/Jena/Berlin 1982
  • B. A. Kordemski: Koepfchen, Koepfchen! Mathematik zur Unterhaltung, Urania Verlag Leipzig/Jena/Berlin 1965

Crossrefs

A375760 Array read by rows: T(n,k) is the first prime with exactly n occurrences of decimal digit k.

Original entry on oeis.org

2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 101, 13, 2, 3, 41, 5, 61, 7, 83, 19, 1009, 11, 223, 233, 443, 557, 661, 277, 881, 199, 10007, 1117, 2221, 2333, 4441, 5557, 6661, 1777, 8887, 1999, 100003, 10111, 22229, 23333, 44449, 155557, 166667, 47777, 88883, 49999, 1000003, 101111, 1222229, 313333, 444443, 555557, 666667, 727777, 888887, 199999
Offset: 0

Views

Author

Robert Israel, Aug 27 2024

Keywords

Examples

			T(4,1) = 10111 because 10111 is the first prime with four 1's.
Array starts
      2      2       3      2      2      2      2      2      2      2
    101     13       2      3     41      5     61      7     83     19
   1009     11     223    233    443    557    661    277    881    199
  10007   1117    2221   2333   4441   5557   6661   1777   8887   1999
 100003  10111   22229  23333  44449 155557 166667  47777  88883  49999
1000003 101111 1222229 313333 444443 555557 666667 727777 888887 199999
		

Crossrefs

Programs

  • Maple
    F:= proc(v,x) local d,y,z,L,S,SS,Cands,t,i,k;
       for d from v do
         Cands:= NULL;
         if x = 0 then SS:= combinat:-choose([$2..d-1],v)
         elif member(x,[1,3,7,9]) then SS:= combinat:-choose(d,v)
         else SS:= combinat:-choose([$2..d],v)
         fi;
         for S in SS do
           for y from 9^(d-v+1) to 9^(d-v+1)+9^(d-v)-1 do
             L:= convert(y,base,9)[1..d-v+1];
             L:= map(proc(s) if s < x then s else s+1 fi end proc, L);
             i:= 1;
             t:= 0:
             for k from 1 to d do
               if member(k,S) then t:= t + x*10^(k-1)
               else t:= t + L[i]*10^(k-1); i:= i+1;
               fi;
             od;
             Cands:= Cands, t
         od od;
         Cands:= sort([Cands]);
         for t in Cands do if isprime(t) then return t fi od;
       od
    end proc:
    F(0,0):= 2: F(1,2):= 2: F(1,5):= 5:
    for i from 0 to 10 do
      seq(F(i,x), x=0..9)
    od;
  • Mathematica
    T[n_,k_]:=Module[{p=2},While[Count[IntegerDigits[p],k]!=n, p=NextPrime[p]]; p]; Table[T[n,k],{n,0,5},{k,0,9}]//Flatten (* Stefano Spezia, Aug 27 2024 *)

A178003 Largest n-digit prime with the most digits equal to 5.

Original entry on oeis.org

5, 59, 557, 5557, 75557, 555557, 9555551, 55555559, 855555559, 5555555557, 75555555557, 555555555559, 5555555555551, 59555555555557, 555555555555557, 6555555555555553, 55556555555555557, 555555555555555559
Offset: 1

Views

Author

Lekraj Beedassy, May 17 2010

Keywords

Comments

Select first for the most 5's, then take the largest.

Crossrefs

Previous Showing 11-15 of 15 results.