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 A066601 #26 Dec 07 2024 11:32:18 %S A066601 0,1,0,1,3,3,3,1,0,9,3,9,3,9,12,1,3,9,3,1,6,9,3,9,18,9,0,25,3,9,3,1, %T A066601 27,9,12,9,3,9,27,1,3,15,3,37,18,9,3,33,31,49,27,29,3,27,12,9,27,9,3, %U A066601 21,3,9,27,1,48,3,3,13,27,39,3,9,3,9,57 %N A066601 a(n) = 3^n mod n. %H A066601 Harry J. Smith and Seiichi Manyama, <a href="/A066601/b066601.txt">Table of n, a(n) for n = 1..10000</a> (first 1000 terms from Harry J. Smith) %e A066601 a(7) = 3 as 3^7 = 2187 = 7*312 + 3. %p A066601 seq(irem(3^n,n),n=1..75); # _Zerinvary Lajos_, Apr 20 2008 %t A066601 Table[PowerMod[3, n, n], {n, 75}] %o A066601 (PARI) a(n) = { lift(Mod(3, n)^n) } \\ _Harry J. Smith_, Mar 09 2010 %o A066601 (Python) %o A066601 def A066601(n): return pow(3,n,n) # _Chai Wah Wu_, Aug 24 2023 %Y A066601 Cf. k^n mod n: A015910 (k=2), this sequence (k=3), A066602 (k=4), A066603 (k=5), A066604 (k=6), A066438 (k=7), A066439 (k=8), A066440 (k=9), A056969 (k=10), A066441 (k=11), A066442 (k=12), A116609 (k=13). %K A066601 base,easy,nonn %O A066601 1,5 %A A066601 _Amarnath Murthy_, Dec 22 2001 %E A066601 More terms from _Robert G. Wilson v_, Dec 27 2001