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 A233471 #18 May 05 2021 13:39:34 %S A233471 0,1,0,1,18,9,31,33,0,49,3,81,146,177,207,65,224,81,307,1,342,9,118, %T A233471 225,68,529,0,753,467,549,623,641,27,757,607,81,632,389,846,801,905, %U A233471 981,261,81,243,1757,1554,2241,2383,249,792,1329,851,729,1332,2529,1737,2793,298 %N A233471 a(n) = 3^n mod n^2. %H A233471 Alois P. Heinz, <a href="/A233471/b233471.txt">Table of n, a(n) for n = 1..10000</a> %F A233471 a(n) = A000244(n) mod A000290(n). %e A233471 a(4) = 1 because 3^4 = 81, 4^2 = 16 and 81 = 1 mod 80. %e A233471 a(5) = 18 because 3^5 = 243, 5^2 = 25 and 243 = 18 mod 25. %p A233471 a:= n-> 3&^n mod n^2: %p A233471 seq(a(n), n=1..60); # _Alois P. Heinz_, Dec 22 2013 %t A233471 Table[Mod[3^n, n^2], {n, 100}] (* _Alonso del Arte_, Dec 11 2013 *) %t A233471 Table[PowerMod[3,n,n^2],{n,100}] (* _Harvey P. Dale_, Aug 27 2019 *) %o A233471 (Python) %o A233471 for n in range(1,100): print(str(3**n % n**2), end=',') %o A233471 (PARI) a(n) = lift(Mod(3, n^2)^n); \\ _Michel Marcus_, May 05 2021 %Y A233471 Cf. A000244, A000290, A066606, A066607. %Y A233471 Cf. A233442, A230664. %K A233471 nonn,easy %O A233471 1,5 %A A233471 _Alex Ratushnyak_, Dec 11 2013