%I #46 Feb 22 2023 23:13:13
%S 5,17,37,101,257,1297,4357,14401,44101,65537,828101,933157,8122501,
%T 8386817,12362257,41990401,121220101,157402117,223502501,318622501,
%U 378146917,506700101,684345601,702038017
%N Numbers of the form n^2+1 such that 3^(m+3)==9(mod m) where m=n^41.
%C All the known value of the sequence are prime (for a(n)<10^20.  _Charles R Greathouse IV_, Jun 07 2012
%C The values of n+1 are prime or composite 121, 11011, 108781, 170431...
%C All composite n+1 == 1(mod 3) ???
%H Charles R Greathouse IV, <a href="/A212876/b212876.txt">Table of n, a(n) for n = 1..3556</a>
%e Let n = 10. Then m = n^41 = 9999. 3^10002 == 9 (mod 9999), so n^2+1 = 101 is a member of the sequence.
%o (PARI) v=List();for(n=2,1e6,m=n^41;if(Mod(3,m)^(m+3)==9, listput(v, n^2+1))); Vec(v) \\ _Charles R Greathouse IV_, May 29 2012
%K nonn
%O 1,1
%A _Alzhekeyev Ascar M_, May 29 2012
