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.

A266147 Number of n-digit primes in which n-1 of the digits are 8's.

Original entry on oeis.org

4, 2, 3, 1, 1, 1, 0, 1, 2, 0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Keywords

Comments

The leading digits must be 8's and only the trailing digit can vary.
For n large a(n) is usually zero.

Examples

			a(3) = 3 since 881, 883, and 887 are all primes.
		

Crossrefs

Programs

  • Mathematica
    d = 8; Array[Length@ Select[d (10^# - 1)/9 + (Range[0, 9] - d), PrimeQ] &, 100]
    Join[{4},Table[Count[Table[10FromDigits[PadRight[{},k,8]]+n,{n,{1,3,7,9}}], ?PrimeQ],{k,110}]] (* _Harvey P. Dale, Jun 22 2021 *)
  • Python
    from _future_ import division
    from sympy import isprime
    def A266147(n):
        return 4 if n==1 else sum(1 for d in [-7,-5,-1,1] if isprime(8*(10**n-1)//9+d)) # Chai Wah Wu, Dec 27 2015

A093166 Primes of the form 80*R_k + 3, where R_k is the repunit (A002275) of length k.

Original entry on oeis.org

3, 83, 883, 88883, 88888883, 888888883, 888888888888883, 888888888888888888888888888888888888888888888888883, 88888888888888888888888888888888888888888888888888888888888888888888883
Offset: 1

Views

Author

Rick L. Shepherd, Mar 26 2004

Keywords

Comments

Primes of the form (8*10^k - 53)/9. - Vincenzo Librandi, Nov 16 2010

Crossrefs

Cf. A002275, A056694 (corresponding k), A099422.

Programs

  • Mathematica
    Select[Table[FromDigits[PadLeft[{3},n,8]],{n,80}],PrimeQ] (* Harvey P. Dale, Sep 21 2013 *)

A056694 Numbers k such that 80*R_k + 3 is prime, where R_k = 11...1 is the repunit (A002275) of length k.

Original entry on oeis.org

0, 1, 2, 4, 7, 8, 14, 50, 70, 76, 223, 295, 314, 2089, 2905, 3394, 3881, 5113, 6055, 7253, 7994, 18172, 18970, 35005, 69673
Offset: 1

Views

Author

Robert G. Wilson v, Aug 10 2000

Keywords

Comments

Also numbers k such that (8*10^(k+1)-53)/9 is prime.
a(26) > 10^5. - Robert Price, Oct 31 2014

Crossrefs

Programs

  • Magma
    [n: n in [0..500] | IsPrime((8*10^(n+1)-53) div 9)]; // Vincenzo Librandi, Nov 01 2014
  • Mathematica
    Do[ If[ PrimeQ[80*(10^n - 1)/9 + 3], Print[n]], {n, 0, 5000}]

Formula

a(n) = A099422(n) - 1. [adapted by Georg Fischer, Jan 04 2021]

Extensions

More terms from Herman Jamke (hermanjamke(AT)fastmail.fm), Jan 01 2008
a(22)-a(25) from Robert Price, Oct 31 2014
Showing 1-3 of 3 results.