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.

This page as a plain text file.
%I A173062 #18 Apr 22 2025 04:00:10
%S A173062 3,7,31,103,127,337,1663,5407,8191,131071,346111,524287,2970343,
%T A173062 3655807,22151167,109051903,617831551,1631461441,2007952543,
%U A173062 2147483647,32127240703,194664464383,275716983697,958348132351,1357375919743,1670616516607,49834102882303,57349132609183
%N A173062 Primes of the form 2^r * 13^s - 1.
%C A173062 s = 0 is "trivial" case of Mersenne primes: 3, 7, 31, 127, 8191, 131071, 524287, 2147483647, ...
%C A173062 Mersenne prime exponents r: 2, 3, 5, 7, 13, 17, 19, 31, ...
%C A173062 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.
%C A173062 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.
%C A173062 No prime in case i = j = k (k>1) as a^k - 1 has divisor a - 1.
%D A173062 Peter Bundschuh, Einfuehrung in die Zahlentheorie, Springer-Verlag GmbH Berlin, 2002.
%D A173062 Leonard E. Dickson, History of the Theory of numbers, vol. I, Dover Publications, 2005.
%D A173062 Paulo Ribenboim, Wilfrid Keller, and Joerg Richstein, Die Welt der Primzahlen, Springer-Verlag GmbH Berlin, 2006.
%H A173062 Jinyuan Wang, <a href="/A173062/b173062.txt">Table of n, a(n) for n = 1..950</a>
%e A173062 2^2*13^0 - 1 = 3 = prime(2) => a(1).
%e A173062 2^3*13^1 - 1 = 103 = prime(27) => a(4).
%e A173062 2^7*13^9 - 1 = 1357375919743 = prime(50467169414) => a(25).
%e A173062 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), ...
%o A173062 (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
%o A173062 (Python)
%o A173062 from itertools import count, islice
%o A173062 from sympy import integer_log, isprime
%o A173062 def A173062_gen(): # generator of terms
%o A173062     def bisection(f,kmin=0,kmax=1):
%o A173062         while f(kmax) > kmax: kmax <<= 1
%o A173062         kmin = kmax >> 1
%o A173062         while kmax-kmin > 1:
%o A173062             kmid = kmax+kmin>>1
%o A173062             if f(kmid) <= kmid:
%o A173062                 kmax = kmid
%o A173062             else:
%o A173062                 kmin = kmid
%o A173062         return kmax
%o A173062     def g(n):
%o A173062         def f(x): return n+x-sum(((x+1)//13**i).bit_length() for i in range(integer_log(x+1,13)[0]+1))
%o A173062         return bisection(f,n-1,n-1)
%o A173062     return filter(lambda n:isprime(n), map(g,count(1)))
%o A173062 A173062_list = list(islice(A173062_gen(),30)) # _Chai Wah Wu_, Mar 31 2025
%Y A173062 Cf. A000668, A005105, A077313, A077314, A077315.
%K A173062 nonn
%O A173062 1,1
%A A173062 Eva-Maria Zschorn (e-m.zschorn(AT)zaschendorf.km3.de), Feb 09 2010
%E A173062 a(26)-a(28) from _Jinyuan Wang_, Feb 23 2020