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 A366671 #20 Jan 07 2024 10:09:02 %S A366671 2,3,5,3,17,3,5,3,97,3,5,3,17,3,5,3,193,3,5,3,17,3,5,3,97,3,5,3,17,3, %T A366671 5,3,641,3,5,3,17,3,5,3,97,3,5,3,17,3,5,3,193,3,5,3,17,3,5,3,97,3,5,3, %U A366671 17,3,5,3,769,3,5,3,17,3,5,3,97,3,5,3,17,3,5 %N A366671 Smallest prime dividing 8^n + 1. %C A366671 a(n) = 3 if n is odd. a(n) = 5 if n == 2 (mod 4). - _Robert Israel_, Nov 20 2023 %H A366671 Max Alekseyev, <a href="/A366671/b366671.txt">Table of n, a(n) for n = 0..16383</a> %F A366671 a(n) = A020639(A062395(n)). - _Paul F. Marrero Romero_, Oct 20 2023 %F A366671 a(n) = A002586(3*n) for n >= 1. - _Robert Israel_, Nov 20 2023 %p A366671 P1000:= mul(ithprime(i),i= 4..1000): %p A366671 f:= proc(n) local t; %p A366671 if n::odd then return 3 elif n mod 4 = 2 then return 5 fi; %p A366671 t:= igcd(8^n+1,P1000); %p A366671 if t <> 1 then min(numtheory:-factorset(t)) else min(numtheory:-factorset(8^n+1)) fi %p A366671 end proc: %p A366671 map(f, [$0..100]); # _Robert Israel_, Nov 20 2023 %t A366671 Table[FactorInteger[8^n + 1][[1,1]], {n, 0, 78}] (* _Paul F. Marrero Romero_, Oct 20 2023 *) %o A366671 (Python) %o A366671 from sympy import primefactors %o A366671 def A366671(n): return min(primefactors((1<<3*n)+1)) # _Chai Wah Wu_, Oct 16 2023 %Y A366671 Cf. A002586, A366609, A052536, A366655, A274905, A366670, A038371, A366719. %K A366671 nonn %O A366671 0,1 %A A366671 _Sean A. Irvine_, Oct 15 2023