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.

A266143 Number of n-digit primes in which n-1 of the digits are 4's.

Original entry on oeis.org

4, 3, 2, 2, 1, 2, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Keywords

Comments

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

Examples

			a(3) = 2 since 443 and 449 are primes.
a(4) = 2 since 4441 and 4447 are primes.
		

Crossrefs

Programs

  • Mathematica
    d = 4; Array[Length@ Select[d (10^# - 1)/9 + (Range[0, 9] - d), PrimeQ] &, 100]
  • Python
    from _future_ import division
    from sympy import isprime
    def A266143(n):
        return 4 if n==1 else sum(1 for d in [-3,-1,3,5] if isprime(4*(10**n-1)//9+d)) # Chai Wah Wu, Dec 27 2015

A096846 Numbers n for which 8*R_n - 1 is prime, where R_n = 11...1 is the repunit (A002275) of length n.

Original entry on oeis.org

1, 3, 4, 6, 9, 12, 72, 118, 124, 190, 244, 304, 357, 1422, 2691, 5538, 7581, 21906, 32176, 44358, 120552, 137073, 152260
Offset: 1

Views

Author

Labos Elemer, Jul 15 2004

Keywords

Comments

Also numbers n such that (8*10^n-17)/9 is prime.
The numbers corresponding to a(1)-a(15) are certified prime, the numbers corresponding to a(16)-a(20) are probable primes. a(21) > 10^5. - Robert Price, May 20 2014

Examples

			n=6: a(4)=888887 which is prime.
		

Crossrefs

Programs

  • Mathematica
    Do[ If[ PrimeQ[ 8(10^n - 1)/9 - 1], Print[n]], {n, 0, 5000}] (* Robert G. Wilson v, Oct 15 2004; corrected by Derek Orr, Sep 06 2014 *)
  • PARI
    for(n=1,10^4,if(ispseudoprime(8*(10^n-1)/9-1),print1(n,", "))) \\ Derek Orr, Sep 06 2014

Formula

a(n) = A056695(n) + 1. - Herman Jamke (hermanjamke(AT)fastmail.fm), Jan 01 2008

Extensions

More terms from Herman Jamke (hermanjamke(AT)fastmail.fm), Jan 01 2008
a(18)-a(20) discovered and reported to Makoto Kamada by Erik Branger; added to OEIS by Robert Price, May 20 2014
a(21)-a(23) from Kamada data by Tyler Busby, Apr 23 2024

A056661 Numbers k such that 40*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, 5, 8, 11, 29, 31, 182, 296, 491, 41315
Offset: 1

Views

Author

Robert G. Wilson v, Aug 09 2000

Keywords

Comments

Also numbers k such that (4*10^(k+1)-13)/9 is prime.
a(13) > 10^5. - Robert Price, Nov 01 2014

Crossrefs

Programs

  • Mathematica
    Do[ If[ PrimeQ[ 40*(10^n - 1)/9 + 3], Print[n]], {n, 0, 5000}]

Formula

a(n) = A096845(n) - 1. - Robert Price, Nov 01 2014

Extensions

a(12) derived from A096845 by Robert Price, Nov 01 2014
Showing 1-3 of 3 results.