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.

A355598 a(1) = 3. For n > 1, a(n) = smallest prime q such that q^(a(n-1)-1) == 1 (mod a(n-1)^2).

This page as a plain text file.
%I A355598 #6 Jul 23 2023 18:59:39
%S A355598 3,17,131,659,503,9833,49603,327317,13900147,144229223,5872276013
%N A355598 a(1) = 3. For n > 1, a(n) = smallest prime q such that q^(a(n-1)-1) == 1 (mod a(n-1)^2).
%C A355598 Is this overall an increasing sequence or does it enter a cycle?
%C A355598 The sequence decreases for the first time at n = 5.
%t A355598 sp[n_]:=Module[{p=2},While[PowerMod[p,n-1,n^2]!=1,p=NextPrime[p]];p]; NestList[sp,3,8] (* _Harvey P. Dale_, Jul 23 2023 *)
%o A355598 (PARI) seq(start, terms) = my(x=start, i=1); print1(start, ", "); while(1, forprime(q=1, , if(Mod(q, x^2)^(x-1)==1, print1(q, ", "); x=q; i++; if(i >= terms, break({2}), break))))
%o A355598 seq(3, 20) \\ Print initial 20 terms of sequence
%Y A355598 Row n = 2 of A249162.
%Y A355598 Cf. A355597, A355599, A355600, A355601, A355602.
%K A355598 nonn,hard,more
%O A355598 1,1
%A A355598 _Felix Fröhlich_, Jul 09 2022