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.

A274678 Numbers k such that 7*10^k + 27 is prime.

Original entry on oeis.org

1, 2, 3, 5, 7, 34, 38, 49, 51, 89, 91, 132, 227, 3662, 5019, 9729, 25437, 99944, 106553, 114577
Offset: 1

Views

Author

Vincenzo Librandi, Jul 04 2016

Keywords

Examples

			3 is in this sequence because 7*10^3 + 27 = 7027 is prime.
4 is not in the sequence because 7*10^4 + 27 = 70027 = 239 * 293.
Initial terms and associated primes:
a(1) = 1: 97;
a(2) = 2: 727;
a(3) = 3: 7027;
a(4) = 5: 700027, etc.
		

Crossrefs

Cf. similar sequences listed in A274676.

Programs

  • Magma
    [n: n in [1..800] | IsPrime(7*10^n+27)];
    
  • Mathematica
    Select[Range[0, 3000], PrimeQ[7 10^# + 27] &]
  • PARI
    lista(nn) = for(n=1, nn, if(ispseudoprime(7*10^n+27), print1(n, ", "))); \\ Altug Alkan, Jul 05 2016
    
  • Python
    from sympy import isprime
    def afind(limit, startk=0):
        sevenpow10 = 7*10**startk
        for k in range(startk, limit+1):
            if isprime(sevenpow10 + 27):
                print(k, end=", ")
            k += 1
            sevenpow10 *= 10
    afind(500) # Michael S. Branicky, Dec 31 2021

Extensions

a(15)-a(16) from Michael S. Branicky, Dec 31 2021
a(17)-a(20) from Kamada data by Tyler Busby, Apr 14 2024