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 A125609 #24 Mar 20 2025 22:32:53 %S A125609 2,17,53,163,487,1459,4373,13121,39367,472391,1062881,1062881, %T A125609 19131877,19131877,57395627,86093443,258280327,3874204891,6973568801, %U A125609 6973568801,188286357653,188286357653,188286357653,4518872583697,15251194969973 %N A125609 Smallest prime p such that 3^n divides p^2 - 1. %C A125609 Smallest prime of the form k*3^n-1 or k*3^n+1. - _Robert Israel_, Oct 27 2019 %H A125609 Robert Israel, <a href="/A125609/b125609.txt">Table of n, a(n) for n = 1..2088</a> %H A125609 Martin Fuller, <a href="/A125609/a125609.gp.txt">PARI program</a> %H A125609 W. Keller and J. Richstein, <a href="https://web.archive.org/web/20140809030451/http://www1.uni-hamburg.de/RRZ/W.Keller/FermatQuotient.html">Fermat quotients that are divisible by p</a>. %p A125609 f:= proc(n) local k; %p A125609 for k from 1 do %p A125609 if isprime(k*3^n-1) then return k*3^n-1 %p A125609 elif isprime(k*3^n+1) then return k*3^n+1 %p A125609 fi %p A125609 od %p A125609 end proc: %p A125609 map(f, [$1..30]); # _Robert Israel_, Oct 27 2019 %t A125609 f[n_] := Module[{k}, For[k = 1, True, k++, If[PrimeQ[k*3^n-1], Return[k*3^n-1], If[PrimeQ[k*3^n+1], Return[k*3^n+1]]]]]; %t A125609 Array[f, 30] (* _Jean-François Alcover_, Jun 04 2020, after Maple *) %o A125609 (PARI) \\ See link. %Y A125609 Cf. A125609 = Smallest prime p such that 3^n divides p^2 - 1. Cf. A125610 = Smallest prime p such that 5^n divides p^4 - 1. Cf. A125611 = Smallest prime p such that 7^n divides p^6 - 1. Cf. A125612 = Smallest prime p such that 11^n divides p^10 - 1. Cf. A125632 = Smallest prime p such that 13^n divides p^12 - 1. Cf. A125633 = Smallest prime p such that 17^n divides p^16 - 1. Cf. A125634 = Smallest prime p such that 19^n divides p^18 - 1. Cf. A125635 = Smallest prime p such that 257^n divides p^256 - 1. %K A125609 nonn %O A125609 1,1 %A A125609 _Alexander Adamchuk_, Nov 28 2006 %E A125609 Corrected and extended by _Ryan Propper_, Jan 01 2007 %E A125609 More terms from _Martin Fuller_, Jan 11 2007