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.

A173062 Primes of the form 2^r * 13^s - 1.

Original entry on oeis.org

3, 7, 31, 103, 127, 337, 1663, 5407, 8191, 131071, 346111, 524287, 2970343, 3655807, 22151167, 109051903, 617831551, 1631461441, 2007952543, 2147483647, 32127240703, 194664464383, 275716983697, 958348132351, 1357375919743, 1670616516607, 49834102882303, 57349132609183
Offset: 1

Views

Author

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

Keywords

Comments

s = 0 is "trivial" case of Mersenne primes: 3, 7, 31, 127, 8191, 131071, 524287, 2147483647, ...
Mersenne prime exponents r: 2, 3, 5, 7, 13, 17, 19, 31, ...
Necessarily r odd as for r = 2*k and p a prime of form 6*n+1: 2^(2*k) * p^j - 1 a multiple of 3.
Proof by induction with 2^2 * p^1 - 1 = 4*(6*n+1) - 1 = 3*(8*n+1), 2^2(k+1) * p^j - 1 = 4* (2^k * p^j - 1) + 3.
No prime in case i = j = k (k>1) as a^k - 1 has divisor a - 1.

Examples

			2^2*13^0 - 1 = 3 = prime(2) => a(1).
2^3*13^1 - 1 = 103 = prime(27) => a(4).
2^7*13^9 - 1 = 1357375919743 = prime(50467169414) => a(25).
list of (r,s) pairs: (2,0), (3,0), (5,0), (3,1), (7,0), (1,2), (7,1), (5,2), (13,0), (17,0), (11,2), (19,0), (3,5), (7,4), (17,2), (23,1), (7,6), (1,8), (5,7), (31,0), (9,7), (19,5), (1,10), (25,4), (7,9), (11,8), (27,5), (5,11), (25,6), (19,8), (13,10), (3,13), (29,7), (5,14), (39,5), (15,13), (5,16), ...
		

References

  • Peter Bundschuh, Einfuehrung in die Zahlentheorie, Springer-Verlag GmbH Berlin, 2002.
  • 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

  • PARI
    lista(nn) = {my(q=1/2, p, w=List([])); for(r=0, logint(nn, 2), q=2*q; p=q/13; for(s=0, logint(nn\q, 13), p=13*p; if(ispseudoprime(p-1), listput(w, p-1)))); Set(w); } \\ Jinyuan Wang, Feb 23 2020
    
  • Python
    from itertools import count, islice
    from sympy import integer_log, isprime
    def A173062_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)))
    A173062_list = list(islice(A173062_gen(),30)) # Chai Wah Wu, Mar 31 2025

Extensions

a(26)-a(28) from Jinyuan Wang, Feb 23 2020