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

A266142 Number of n-digit primes in which n-1 of the digits are 3's.

Original entry on oeis.org

4, 8, 9, 12, 7, 14, 13, 11, 8, 7, 9, 8, 3, 10, 11, 14, 9, 12, 6, 11, 11, 11, 9, 10, 9, 10, 22, 10, 10, 12, 7, 14, 14, 15, 7, 16, 11, 7, 14, 10, 13, 13, 8, 10, 11, 12, 6, 12, 10, 10, 10, 11, 5, 14, 8, 8, 5, 14, 6, 18, 13, 9, 13, 10, 4, 14, 12, 6, 11, 13, 12, 20, 11, 9, 13, 6, 12, 22, 13, 10, 10, 12, 5, 20, 11, 10, 11, 10, 11, 12, 11, 13, 12, 18, 7, 20, 15, 6, 8, 8, 8, 15, 12, 10, 14
Offset: 1

Views

Author

Keywords

Examples

			a(2) = 8 since 13, 23, 31, 37, 43, 53, 73 and 83 are all primes.
a(3) = 9 since 233, 313, 331, 337, 353, 373, 383, 433 and 733 are all primes.
		

Crossrefs

Programs

  • Mathematica
    f3[n_] := Block[{cnt = k = 0, r = 3 (10^n - 1)/9, s = Range[0, 9] - 3}, While[k < n, cnt += Length@ Select[r + 10^k*s, PrimeQ@ # && IntegerLength@ # > k &]; k++]; cnt]; Array[f3, 105]
  • PARI
    a(n)={sum(i=0 ,n-1, sum(d=i==n-1, 9, isprime((10^n-1)/3 + (d-3)*10^i)))} \\ Andrew Howroyd, Feb 28 2018
    
  • Python
    from _future_ import division
    from sympy import isprime
    def A266142(n):
        return 4*n if (n==1 or n==2) else sum(1 for d in range(-3,7) for i in range(n) if isprime((10**n-1)//3+d*10**i)) # Chai Wah Wu, Dec 27 2015

Extensions

a(2) corrected by Chai Wah Wu, Dec 27 2015
a(2) in b-file corrected as above by Andrew Howroyd, Feb 28 2018

A093168 Primes of the form 30*R_k + 7, where R_k is the repunit (A002275) of length k.

Original entry on oeis.org

7, 37, 337, 333337, 3333333333333333333333333333333333333333333337
Offset: 1

Views

Author

Rick L. Shepherd, Mar 26 2004

Keywords

Comments

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

Crossrefs

Cf. A056680 (corresponding k), A099411, A173766.

A056680 Numbers k such that 30*R_k + 7 is prime, where R_k = 11...1 is the repunit (A002275) of length k.

Original entry on oeis.org

0, 1, 2, 5, 45, 393, 977, 2585, 2810, 2967, 3641, 4826, 4917, 5591, 5705, 10682, 12890, 14117, 74349, 88679
Offset: 1

Views

Author

Robert G. Wilson v, Aug 10 2000

Keywords

Comments

Also numbers k such that (10^(k+1)+11)/3 is prime.
a(21) > 10^5. - Robert Price, Nov 02 2014

Crossrefs

Programs

  • Mathematica
    Do[ If[ PrimeQ[30*(10^n - 1)/9 + 7], Print[n]], {n, 0, 10000}]

Formula

a(n) = A099411(n) - 1. - Robert Price, Nov 02 2014

Extensions

a(16)-a(20) derived from A099411 by Robert Price, Nov 02 2014

A274986 Numbers k such that (10^k + 23)/3 is prime.

Original entry on oeis.org

1, 2, 6, 146, 326, 380, 1116, 1866, 4808, 5528, 5730, 21836, 24804, 38724
Offset: 1

Views

Author

Vincenzo Librandi, Sep 25 2016

Keywords

Comments

Also numbers k for which A093137(k) + 7 or A002277(k) + 8 is prime.

Crossrefs

Cf. numbers k such that (10^k+m)/3 is prime: A099411 (m=11), this sequence (m=23).

Programs

  • Magma
    [n: n in [0..400] | IsPrime((10^n+23) div 3)];
    
  • Mathematica
    Select[Range[1000], PrimeQ[(10^# + 23) / 3] &]
  • PARI
    is(n)=ispseudoprime((10^n+23)/3) \\ Charles R Greathouse IV, Jun 13 2017

Extensions

a(9)-a(11) from Michael S. Branicky, Aug 16 2021
a(12)-a(13) from Michael S. Branicky, May 14 2023
a(14) from Kamada data by Tyler Busby, May 05 2024
Showing 1-4 of 4 results.