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.
%I A058959 #52 Jan 04 2023 10:32:39 %S A058959 2,3,5,21,31,37,41,53,73,101,175,203,225,455,557,651,1333,4823,20367, %T A058959 32555,52057,79371,267267,312155 %N A058959 Numbers k such that 3^k - 4 is prime. %C A058959 From _M. F. Hasler_ and _Farideh Firoozbakht_, Oct 30 2009: (Start) %C A058959 If Q is a perfect number such that gcd(Q, 3(3^a(n)-4))=1 then m=3^(a(n)-1) (3^a(n)-4)Q is a solution of the equation sigma(x)=3(x+Q). This is a result of the following theorem. %C A058959 Theorem : If for a prime q, Q is a (q-1)-perfect number and p=q^k-q-1 is a prime such that gcd(Q, p*q)=1, then m=p*q^(k-1)*Q is a solution of the equation sigma(x)=q(x+Q). The proof is easy. (End) %C A058959 From _M. F. Hasler_ and _Farideh Firoozbakht_, Dec 07 2009: (Start) %C A058959 2 is the only even term of this sequence because if n is an even number greater than 2 then 3^n-4=(3^(n/2)-2)*(3^(n/2)+2) is composite. %C A058959 We have also found the following generalization of this theorem. See comment lines of the sequence A171271. %C A058959 Theorem : If for a prime q, Q is a (q-1)-perfect number and for some integers k and m, p=q^k-m*q-1 is a prime such that gcd(Q, p*q)=1, then x=p*q^(k-1)*Q is a solution of the equation sigma(x)=q(x+m*Q). The proof is easy. (End) %H A058959 Farideh Firoozbakht and M. F. Hasler, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL13/Hasler/hasler2.html">Variations on Euclid's formula for Perfect Numbers</a>, JIS 13 (2010) #10.3.1. %H A058959 Henri & Renaud Lifchitz, <a href="http://www.primenumbers.net/prptop/searchform.php?form=3%5En-4&action=Search">PRP Records</a>. %t A058959 Do[ If[ PrimeQ[3^n - 4], Print[n] ], {n, 1, 3000} ] %o A058959 (PARI) for(n=1,10^3,if(ispseudoprime(3^n-4),print1(n,", "))) \\ _Derek Orr_, Mar 06 2015 %o A058959 (Magma) [n: n in [1..10^3]| IsPrime(3^n-4)]; // _Vincenzo Librandi_, Mar 24 2015 %Y A058959 Cf. A014224, A171271. - _M. F. Hasler_ and _Farideh Firoozbakht_, Dec 07 2009 %K A058959 nonn,more %O A058959 1,1 %A A058959 _Robert G. Wilson v_, Jan 13 2001 %E A058959 a(18)=4823, corresponding to a certified prime, from _Ryan Propper_, Jun 30 2005 %E A058959 a(19)=20367 from _Ray Chandler_, Jul 25 2011 %E A058959 a(20)=32555, a(21)=52057 from _Henri Lifchitz_, Jan 2005 %E A058959 a(22)=79371 from _Ray Chandler_, Jul 25 2011 %E A058959 a(23)=267267 from _Roman Ilyukhin_, Oct 17 2014 %E A058959 a(24)=312155 from _Roman Ilyukhin_, Feb 28 2015