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 A082511 #24 Oct 21 2018 13:48:17 %S A082511 1,1,3,1,3,9,3,1,9,9,3,9,3,9,27,1,3,9,3,1,27,9,3,33,43,9,27,25,3,9,3, %T A082511 1,27,9,47,9,3,9,27,1,3,57,3,81,63,9,3,33,31,49,27,81,3,81,67,65,27,9, %U A082511 3,81,3,9,27,1,113,69,3,81,27,109,3,81,3,9,57,81,75,105,3,1,81,9,3,57,73 %N A082511 a(n) = 3^n mod 2n. %H A082511 Vincenzo Librandi, <a href="/A082511/b082511.txt">Table of n, a(n) for n = 1..2000</a> %e A082511 Residues are often also powers of 3, that is, 3^n = k*2*n + 3^j, as is the case for n=1..23. The first terms that are not powers of 3 are a(24)=33 and a(25)=43. %e A082511 a(6)=9: modulus = 2*n = 12; 3^n = 3^6 = 729 = 60*12 + 9 = 720 + a(6). %t A082511 Table[PowerMod[3,n,2n],{n,90}] (* _Harvey P. Dale_, Jan 21 2014 *) %o A082511 (Python) for n in range(1, 80): print(pow(3, n, 2*n), end=" ") # _Stefano Spezia_, Oct 20 2018 %o A082511 (PARI) a(n) = lift(Mod(3, 2*n)^n) \\ _Felix Fröhlich_, Oct 20 2018 %Y A082511 Cf. A000079, A000244, A002379. %Y A082511 Cf. A083528, A083529, A083530. %K A082511 nonn %O A082511 1,3 %A A082511 _Labos Elemer_, Apr 28 2003