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.

A173236 Primes of the form 2^r * 13^s + 1.

Original entry on oeis.org

2, 3, 5, 17, 53, 257, 677, 3329, 13313, 35153, 65537, 2768897, 13631489, 2303721473, 3489660929, 4942652417, 11341398017, 10859007357953, 1594691292233729, 31403151600910337, 310144109150467073, 578220423796228097
Offset: 1

Views

Author

Eva-Maria Zschorn (e-m.zschorn(AT)zaschendorf.km3.de), Feb 13 2010

Keywords

Comments

Necessarily r is even (elementary proof by induction).
s=0 is (trivial) case of 2 and the known five Fermat primes: 2, 3, 5, 17, 257, 65537 (A092506).
Fermat prime exponents r are 0, 1, 2, 4, 8, 16.

Examples

			2^0*13^0 + 1 = 2 = prime(1) => a(1).
2^10*13^1 + 1 = 13313 = prime(1581) => a(9).
list of (r,s): (0,0), (1,0), (2,0), (4,0), (2,1), (8,0), (2,2), (8,1), (10,1), (4,3), (16,0), (14,2), (20,1), (20,3), (28,1), (10,6), (26,2), (10,9), (32,5), (40,4), (10,13), (22,10), (32,8), (48,4), (20,13), (2,18), (28,11), (50,6).
		

References

  • Emil Artin, Galoissche Theorie, Verlag Harri Deutsch, Zürich, 1973.
  • Leonard E. Dickson, History of the Theory of numbers, vol. I, Dover Publications, 2005.
  • Paulo Ribenboim, Wilfrid Keller, and Joerg Richstein, Die Welt der Primzahlen, Springer-Verlag GmbH Berlin, 2006.

Crossrefs

Programs

  • GAP
    K:=10^7;; # to get all terms <= K.
    A:=Filtered([1..K],IsPrime);;
    B:=List(A,i->Factors(i-1));;
    C:=[];;  for i in B do if Elements(i)=[2] or Elements(i)=[2,13] then Add(C,Position(B,i)); fi; od;
    A173236:=Concatenation([2],List(C,i->A[i])); # Muniru A Asiru, Sep 10 2017
    
  • Python
    from itertools import count, islice
    from sympy import isprime, integer_log
    def A173236_gen(): # generator of terms
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            kmin = kmax >> 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def g(n):
            def f(x): return n+x-sum(((x-1)//13**i).bit_length() for i in range(integer_log(x-1,13)[0]+1))
            return bisection(f,n+1,n+1)
        return filter(lambda n:isprime(n), map(g,count(1)))
    A173236_list = list(islice(A173236_gen(),30)) # Chai Wah Wu, Mar 31 2025