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

A096507 Numbers k such that 6*R_k + 1 is a prime, where R_k = 11...1 is the repunit (A002275) of length k.

Original entry on oeis.org

1, 2, 6, 8, 9, 11, 20, 23, 41, 63, 66, 119, 122, 149, 252, 284, 305, 592, 746, 875, 1204, 1364, 2240, 2403, 5106, 5776, 5813, 12456, 14235, 39606, 55544, 84239, 275922
Offset: 1

Views

Author

Labos Elemer, Jul 12 2004

Keywords

Comments

Also numbers k such that (2*10^k + 1)/3 is prime.
These numbers form a near-repdigit sequence (6)w7.
All the terms from k = 2403 through 14235 correspond to primes. - Joao da Silva (zxawyh66(AT)yahoo.com), Oct 03 2005

Examples

			k = 9 gives 2000000001/3 = 666666667, which is prime.
k = 20 gives 66666666666666666667, which is prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Range@ 2500, PrimeQ[FromDigits@ Table[6, {#}] + 1] &] (* or *)
    Select[Range@ 2500, PrimeQ[2 (10^# - 1)/3 + 1] &] (* Michael De Vlieger, Jul 04 2016 *)

Formula

a(n) = A056657(n) + 1.

Extensions

More terms from Julien Peter Benney (jpbenney(AT)ftml.net), Sep 14 2004
39606 and 55544 from Serge Batalov, Jun 2009
84239 from Serge Batalov, Jul 06 2009 confirmed as next term by Ray Chandler, Feb 23 2012
a(33) from Kamada data by Tyler Busby, Apr 14 2024

A266141 Number of n-digit primes in which n-1 of the digits are 2's.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

The leading digits must be 2's and only the trailing digit can vary.
For n large a(n) is usually zero.
a(n) <= 4. If n > 1 and not a multiple of 3, then a(n) <= 2. It appears that a(n) <= 1 for n > 3. - Chai Wah Wu, Dec 26 2015

Examples

			a(3) = 3 since 223, 227 and 229 are all primes.
		

Crossrefs

Programs

  • Mathematica
    d = 2; Array[Length@ Select[d (10^# - 1)/9 + (Range[0, 9] - d), PrimeQ] &, 100]
  • Perl
    use ntheory ":all"; sub a266141 { my $n=shift; return 4 if $n==1; 0+scalar(grep{is_prime("2"x($n-1).$)} 1,3,7,9); } say a266141($) for 1..20; # Dana Jacobsen, Dec 27 2015
  • Python
    from sympy import isprime
    def A266141(n):
        return 4 if n==1 else sum(1 for d in '1379' if isprime(int('2'*(n-1)+d))) # Chai Wah Wu, Dec 26 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

A069837 Smallest prime which is a concatenation of n primes.

Original entry on oeis.org

2, 23, 223, 2237, 22273, 222323, 2222273, 22222223, 222222227, 2222222377, 22222222223, 222222223273, 2222222222273, 22222222222327, 222222222222227, 2222222222222533, 22222222222223557, 222222222222222577, 2222222222222222327, 22222222222222222253, 222222222222222222277, 2222222222222222222273, 22222222222222222222327
Offset: 1

Views

Author

Amarnath Murthy, Apr 16 2002

Keywords

Comments

Conjecture: For every n there exists an n-digit prime which is composed of the digits 2,3,5 and 7. I.e., no prime > 7 is required in this concatenation. I.e., a(n) of A069637 contains exactly n digits. This is a weaker conjecture than the one by Patrick De Geest in A036937.
If the conjecture is true then this also gives the smallest n-digit prime with prime digits. - Amarnath Murthy, Apr 02 2003
Except for the first term, A096506 lists indices n=2,3,8,11,36,95,101,128,... for which a(n) is of the form 2...23. - M. F. Hasler, Apr 25 2008

Crossrefs

Cf. A036937.
Cf. A096506.

Programs

  • Mathematica
    f[n_] := Block[{p = 2(10^n - 1)/9}, While[ !PrimeQ[p] || Union[ PrimeQ[ IntegerDigits[p]]] != {True}, p++ ]; p]; Table[ f[n], {n, 1, 20}]
  • PARI
    A069837(n)={ local( p=(10^n-1)\9*2-1 ); n=Vec("2357"); until( !setminus( Set(Vec(Str(p))), n), p=nextprime(p+1)); p } /* a more efficient version should check digits one by one and skip to the next possible candidate (i.e., add 12...23 - p%10^d) when a nonprime digit is found */ \\ M. F. Hasler, Apr 25 2008

Extensions

Edited, corrected and extended by Robert G. Wilson v, Apr 22 2002

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

Original entry on oeis.org

3, 23, 223, 22222223, 22222222223, 222222222222222222222222222222222223
Offset: 1

Views

Author

Rick L. Shepherd, Mar 26 2004

Keywords

Comments

The next term (a(7)) has 95 digits. - Harvey P. Dale, Dec 26 2022

Crossrefs

Cf. A002275, A056656 (corresponding k, and count of digits 2 in a(n)), A096506.

Programs

  • Mathematica
    Select[Table[FromDigits[PadLeft[{3},n,2]],{n,40}],PrimeQ] (* Harvey P. Dale, Dec 26 2022 *)

Formula

a(n) = (20*10^A056656(n) + 7)/9 = (2*10^A096506(n) + 7)/9.

Extensions

Edited by Ray Chandler, Feb 27 2012

A056656 Numbers k such that 20*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, 7, 10, 35, 94, 100, 127, 259, 350, 466, 644, 1010, 1177, 1216, 2441, 3760, 3805, 15616, 26458, 63116, 88544, 93496
Offset: 1

Views

Author

Robert G. Wilson v, Aug 09 2000

Keywords

Comments

Also numbers k such that (2*10^(k+1)+7)/9 is prime.

Crossrefs

Cf. A093162 (corresponding primes), A096506.

Programs

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

Formula

a(n) = A096506(n) - 1.

Extensions

2441 from Rick L. Shepherd, Mar 27 2004
15616 and 26458 from Erik Branger, Jan 31 2010
63116, 88544 and 93496 from Erik Branger, Mar 14 2011; confirmed as next terms by Ray Chandler, Feb 17 2012
Showing 1-6 of 6 results.