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.

A385958 a(n) is the largest prime p such that b(n) = b(n-1)*(p+1)/(p-1) is an integer (A385959), where b(0) = 1.

This page as a plain text file.
%I A385958 #70 Aug 06 2025 19:44:39
%S A385958 3,5,7,5,13,3,29,31,17,37,3,5,7,5,229,47,241,23,89,271,137,277,3,557,
%T A385958 19,311,313,5,7,5,13,3,4397,7,5,13,3,29,21991,5,13,3,29,82471,677,733,
%U A385958 227,27893,19,11,111577,3,5,283,5,505663,15803
%N A385958 a(n) is the largest prime p such that b(n) = b(n-1)*(p+1)/(p-1) is an integer (A385959), where b(0) = 1.
%C A385958 a(n) = (b(n)+b(n-1))/(b(n)-b(n-1)), where b(n) = A385959(n) is the smallest k such that a(n) is a prime, where b(0) = 1.
%C A385958 a(n) is the largest prime p such that p-1 divides 2*b(n-1).
%C A385958 Note that 3 <= a(n) <= 2*b(n-1)+1.
%C A385958 Does this sequence contain all odd primes?
%H A385958 Martin Fuller, <a href="/A385958/b385958.txt">Table of n, a(n) for n = 1..3460</a>
%F A385958 a(n) = A073409(b(n-1)), where b(n) = A385959(n) = Product_{k=1..n} (a(k)+1)/(a(k)-1).
%F A385958 Also tanh(Sum_{k=1..n} arctanh(1/a(k))) = (b(n)-1)/(b(n)+1).
%o A385958 (PARI)
%o A385958 allocatemem(2^30);
%o A385958 default(factor_add_primes, 1);
%o A385958 {
%o A385958 my(a,b=1);
%o A385958 for(n=1,100,
%o A385958   removeprimes(select(p->b%p, addprimes()));
%o A385958   fordiv(2*b, d, a=2*b/d+1; if(isprime(a),break));
%o A385958   b+=b*2/(a-1);
%o A385958   print1(a, ", ");
%o A385958 );
%o A385958 } \\ _Martin Fuller_, Jul 16 2025
%Y A385958 Cf. A065091, A073409, A385959.
%K A385958 nonn,look
%O A385958 1,1
%A A385958 _Thomas Ordowski_, Jul 13 2025
%E A385958 More terms from Morné Louw and _Martin Fuller_, Jul 15 2025