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.

A339174 Let b(1) = 2 and let b(n+1) be the least prime expressible as k*(b(n)-1)*b(n)+1; this sequence gives the values of k in order.

This page as a plain text file.
%I A339174 #58 Mar 16 2023 07:06:52
%S A339174 1,1,1,2,5,9,6,79,16,219,580,387,189,7067,1803,6582,31917,18888,20973,
%T A339174 132755,11419,50111
%N A339174 Let b(1) = 2 and let b(n+1) be the least prime expressible as k*(b(n)-1)*b(n)+1; this sequence gives the values of k in order.
%C A339174 The corresponding primes in order are 3, 7, 43, 3613, 65250781, P17, P34, P70, P141, P284, P571, P1144, P2290, P4584, P9170, P18344, P36692, P73387, P146778, P293560, P587124, P1174253.
%C A339174 After each iteration the number of decimal digits is roughly twice that of the previous iteration. These primes can generally be easily certified using the N-1 method since all the prime factors for N-1 are known.
%H A339174 The 5000 Largest Known Primes, <a href="https://primes.utm.edu/primes/page.php?id=131431">P587124</a> and <a href="https://primes.utm.edu/primes/page.php?id=134690">P1174253</a>.
%F A339174 Nested f(k) = k*(p-1)*p+1 for p=2. After each iteration the last obtained f(k) is substituted for p. The primes can be certified using OpenPFGW by adding each previous iteration to the helper file.
%e A339174 [Corrected by _Peter Munn_, Nov 05 2022]
%e A339174 For p = 2, the smallest k for which f(k) = k*(p-1)*p+1 is prime is 1 because we have: f(1) = k*(p-1)*p+1 = 1*(2-1)*2+1 = 3.
%e A339174 This sets p = 3 for the next iteration for which the smallest k for which f(k) is prime is 1: f(1) = k*(p-1)*p+1 = 1*(3-1)*3+1 = 7.
%o A339174 (PARI) my(p=2, k=1); while(1, my(runningP=k*(p-1)*p+1); if(ispseudoprime(runningP), print1(k, ", "); k=1; p=runningP; , k=k+1))
%o A339174 (PARI) my(k=[1, 1, 1, 2, 5, 9, 6, 79, 16, 219, 580, 387, 189, 7067, 1803, 6582, 31917, 18888, 20973, 132755, 11419, 50111], p=2); for(i=1, #k, p=k[i]*(p-1)*p+1); print("\n", p, "\n"); \\ to produce the P587124 prime
%o A339174 (Python)
%o A339174 from sympy import isprime
%o A339174 A339174_list, a = [2], 2
%o A339174 while len(A339174_list) < 10:
%o A339174     k, c, b = 1, 1, (a-1)*a
%o A339174     while True:
%o A339174         c += b
%o A339174         if isprime(c):
%o A339174             A339174_list.append(k)
%o A339174             a = c
%o A339174             break
%o A339174         k += 1 # _Chai Wah Wu_, Dec 04 2020
%Y A339174 Cf. A359340, A306601, A000058.
%K A339174 nonn,hard,more
%O A339174 1,4
%A A339174 _Rashid Naimi_, Nov 25 2020
%E A339174 a(22) from _Rashid Naimi_, Jan 13 2023