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 A269111 #15 Jun 08 2017 23:50:29 %S A269111 2,3,2,2,3,2,2,3,2,2,2,2,2,2 %N A269111 a(n) = length of the repeating part of row n of A288097. %C A269111 a(n) + A268479(n) = total number of different terms in the trajectory of p. %C A269111 a(15) is unknown, since there is no known Wieferich prime in base 47 (cf. Fischer link). %C A269111 Obviously, a(n) != 1 for all n. %C A269111 Period length of the repeating part of prime(n)-th row of A281001. - _Felix Fröhlich_, Jan 14 2017 %H A269111 R. Fischer, <a href="http://www.fermatquotient.com/FermatQuotienten/FermQ_Sort.txt">Thema: Fermatquotient B^(P-1) == 1 (mod P^2)</a> %e A269111 The trajectory of 31 starts 31, 7, 5, 2, 1093, 2, 1093, 2, 1093, ...., entering a repeating cycle of length 2, so a(11) = 2. %t A269111 Table[Length@ DeleteCases[Values@ PositionIndex@ NestList[Function[n, Block[{p = 2}, While[! Divisible[n^(p - 1) - 1, p^2], p = NextPrime@ p]; p]], Prime@ n, 12], _?(Length@ # == 1 &)], {n, 12}] (* _Michael De Vlieger_, Jun 06 2017, Version 10 *) %o A269111 (PARI) a039951(n) = forprime(p=1, , if(Mod(n, p^2)^(p-1)==1, return(p))) %o A269111 trajectory(n, terms) = my(v=[n]); while(#v < terms, v=concat(v, a039951(v[#v]))); v %o A269111 a(n) = my(p=prime(n), i=0, len=2, t=trajectory(p, len), k=#t); while(1, while(k > 1, k--; if(t[k]==t[#t], return(#t-k))); len++; t=trajectory(p, len); k=#t) \\ _Felix Fröhlich_, Jan 14 2017 %Y A269111 Cf. A039951, A244550, A252801, A252802, A252812, A268479, A281001, A288097. %K A269111 nonn,hard,more %O A269111 1,1 %A A269111 _Felix Fröhlich_, Feb 19 2016 %E A269111 Definition simplified by _Felix Fröhlich_, Jun 05 2017