The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A269111 a(n) = length of the repeating part of row n of A288097. 2
 2, 3, 2, 2, 3, 2, 2, 3, 2, 2, 2, 2, 2, 2 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS a(n) + A268479(n) = total number of different terms in the trajectory of p. a(15) is unknown, since there is no known Wieferich prime in base 47 (cf. Fischer link). Obviously, a(n) != 1 for all n. Period length of the repeating part of prime(n)-th row of A281001. - Felix Fröhlich, Jan 14 2017 LINKS R. Fischer, Thema: Fermatquotient B^(P-1) == 1 (mod P^2) EXAMPLE 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. MATHEMATICA 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 *) PROG (PARI) a039951(n) = forprime(p=1, , if(Mod(n, p^2)^(p-1)==1, return(p))) trajectory(n, terms) = my(v=[n]); while(#v < terms, v=concat(v, a039951(v[#v]))); v 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 CROSSREFS Cf. A039951, A244550, A252801, A252802, A252812, A268479, A281001, A288097. Sequence in context: A104543 A054988 A143393 * A166497 A116909 A333853 Adjacent sequences:  A269108 A269109 A269110 * A269112 A269113 A269114 KEYWORD nonn,hard,more AUTHOR Felix Fröhlich, Feb 19 2016 EXTENSIONS Definition simplified by Felix Fröhlich, Jun 05 2017 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified May 8 06:39 EDT 2021. Contains 343653 sequences. (Running on oeis4.)