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

A037066 a(n)-th prime is the smallest prime containing exactly n 7's.

Original entry on oeis.org

1, 4, 59, 275, 4924, 58623, 506877, 4546755, 30224014, 87818618, 2836649805, 14748299309, 251285857122, 603200604933, 17530836835060, 80446298927642, 2054098188682332, 9577010472498628, 67026825574168206, 1605887402218872982, 16520076587958693329, 156502536697199220470
Offset: 0

Views

Author

Patrick De Geest, Jan 04 1999

Keywords

Crossrefs

Programs

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

Formula

a(n) = A000720(A037067(n)). - Amiram Eldar, Jul 21 2025

Extensions

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

A065581 Smallest prime ending in exactly n 7's.

Original entry on oeis.org

7, 277, 1777, 47777, 2477777, 16777777, 137777777, 577777777, 1777777777, 67777777777, 377777777777, 16777777777777, 17777777777777, 577777777777777, 2777777777777777, 157777777777777777, 377777777777777777, 2777777777777777777, 97777777777777777777, 2477777777777777777777
Offset: 1

Views

Author

Robert G. Wilson v, Nov 28 2001

Keywords

Crossrefs

Programs

  • Mathematica
    Do[a = Table[7, {n} ]; k = 0; While[ b = FromDigits[ Join[ IntegerDigits[k], a]]; Mod[k, 10] == 7 || !PrimeQ[b], k++ ]; Print[b], {n, 1, 17} ]
    k7[n_]:=Module[{c=FromDigits[PadRight[{},n,7]],k=0},While[Nand[PrimeQ[k*10^n + c], Mod[k, 10] != 7],k++];k*10^n+c]; Array[k7,20] (* Harvey P. Dale, Jan 29 2013 *)
  • PARI
    a(n)={ my(t=10^n, b=7*(t-1)/9, d=0); while (!isprime(b + t*d), d++; if(d%10==7, d++)); b + t*d } \\ Harry J. Smith, Oct 23 2009

A065590 Smallest prime beginning with exactly n 7's.

Original entry on oeis.org

2, 7, 773, 77711, 77773, 7777709, 77777719, 777777701, 777777773, 77777777717, 777777777713, 777777777773, 7777777777771, 777777777777719, 777777777777773, 77777777777777711, 777777777777777737, 7777777777777777793, 77777777777777777729, 77777777777777777771
Offset: 0

Views

Author

Robert G. Wilson v, Nov 28 2001

Keywords

Crossrefs

Extensions

Corrected by Don Reble, Jan 17 2007
Offset corrected by Sean A. Irvine, Sep 06 2023

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

A268705 Smallest n-digit prime having at least n-1 digits equal to 7.

Original entry on oeis.org

2, 17, 277, 1777, 47777, 727777, 7477777, 77767777, 577777777, 1777777777, 67777777777, 377777777777, 7177777777777, 17777777777777, 577777777777777, 2777777777777777, 77777767777777777, 377777777777777777, 2777777777777777777, 71777777777777777777
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{k = 0, p = {}, r = 7(10^n - 1)/9, s = Range@ 10 - 8}, While[k < n, AppendTo[p, Select[r + 10^k*s, PrimeQ]]; k++]; p = Min@ Flatten@ p]; f[1] = 2; f[2] = 17; Array[f, 20]
    Table[Min[Select[FromDigits/@Flatten[Permutations/@Table[Join[ {n},PadRight[ {},k,7]],{n,0,9}],1],IntegerLength[#]==k+1&&PrimeQ[#]&]],{k,0,20}] (* Harvey P. Dale, Jan 23 2021 *)

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 *)

A178005 Largest n-digit prime with the most digits equal to 7.

Original entry on oeis.org

7, 97, 977, 7877, 97777, 787777, 7877777, 77767777, 787777777, 8777777777, 79777777777, 777777779777, 7877777777777, 77777779777777, 778777777777777, 8777777777777777, 77797777777777777, 797777777777777777
Offset: 1

Views

Author

Lekraj Beedassy, May 17 2010

Keywords

Comments

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

Crossrefs

Previous Showing 11-17 of 17 results.