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 A230579 #23 Mar 09 2021 04:15:57 %S A230579 1,2,4,8,16,32,64,128,256,171,1,2,4,8,16,32,64,128,256,171,1,2,4,8,16, %T A230579 32,64,128,256,171,1,2,4,8,16,32,64,128,256,171,1,2,4,8,16,32,64,128, %U A230579 256,171,1,2,4,8,16,32,64,128,256,171,1,2,4,8,16,32,64,128,256,171 %N A230579 a(n) = 2^n mod 341. %C A230579 Jeans asserts that it would have been impossible for the ancient Chinese to have discovered a case of failure for the converse of Fermat's little theorem because the smallest counterexample "(n = 341) consists of 103 figures" in base 10. %C A230579 Granted that without a computer, the task of calculating 2^340 - 1 and dividing by 341 is tedious and error-prone, thus discouraging the discovery of that number as a counterexample to the so-called Chinese hypothesis. %C A230579 But by instead computing just a few dozen powers of 2 modulo 341, it becomes readily apparent that the sequence of powers of 2 modulo 341 has a period of length 10 and therefore 2^340 = 1 mod 341, yet 341 = 11 * 31, which is not a prime number. %H A230579 L. Halbeisen and N. Hungerbühler, <a href="https://hal.archives-ouvertes.fr/hal-01109575">On generalised Carmichael numbers</a>, Hardy-Ramanujan Society, 1999, 22 (2), pp. 8-22. (hal-01109575). See p. 8. %H A230579 J. H. Jeans, <a href="http://oeis.org/w/images/c/c4/The_converse_of_Fermat%27s_theorem.pdf">The converse of Fermat's theorem</a>, Messenger of Mathematics 27 (1898), p. 174. %H A230579 <a href="/index/Rec#order_09">Index entries for linear recurrences with constant coefficients</a>, signature (1,-1,1,-1,1,-1,1,-1,1). %F A230579 a(0) = 1, a(n) = 2*a(n-1) mod 341. %e A230579 a(8) = 256 because 2^8 = 256. %e A230579 a(9) = 171 because 2^9 = 512 and 512 - 341 = 171. %e A230579 a(10) = 1 because 2 * 171 = 342 and 342 - 341 = 1. %t A230579 PowerMod[2, Range[0, 79], 341] %t A230579 LinearRecurrence[{1,-1,1,-1,1,-1,1,-1,1},{1,2,4,8,16,32,64,128,256},70] (* _Ray Chandler_, Jul 12 2015 *) %o A230579 (PARI) a(n)=lift(Mod(2,341)^n) \\ _Charles R Greathouse IV_, Mar 22 2016 %Y A230579 Cf. A206786. %K A230579 nonn,easy %O A230579 0,2 %A A230579 _Alonso del Arte_, Oct 23 2013