login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A233471 a(n) = 3^n mod n^2. 3
0, 1, 0, 1, 18, 9, 31, 33, 0, 49, 3, 81, 146, 177, 207, 65, 224, 81, 307, 1, 342, 9, 118, 225, 68, 529, 0, 753, 467, 549, 623, 641, 27, 757, 607, 81, 632, 389, 846, 801, 905, 981, 261, 81, 243, 1757, 1554, 2241, 2383, 249, 792, 1329, 851, 729, 1332, 2529, 1737, 2793, 298 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,5
LINKS
FORMULA
a(n) = A000244(n) mod A000290(n).
EXAMPLE
a(4) = 1 because 3^4 = 81, 4^2 = 16 and 81 = 1 mod 80.
a(5) = 18 because 3^5 = 243, 5^2 = 25 and 243 = 18 mod 25.
MAPLE
a:= n-> 3&^n mod n^2:
seq(a(n), n=1..60); # Alois P. Heinz, Dec 22 2013
MATHEMATICA
Table[Mod[3^n, n^2], {n, 100}] (* Alonso del Arte, Dec 11 2013 *)
Table[PowerMod[3, n, n^2], {n, 100}] (* Harvey P. Dale, Aug 27 2019 *)
PROG
(Python)
for n in range(1, 100): print(str(3**n % n**2), end=', ')
(PARI) a(n) = lift(Mod(3, n^2)^n); \\ Michel Marcus, May 05 2021
CROSSREFS
Sequence in context: A112876 A070703 A181761 * A040309 A146676 A147438
KEYWORD
nonn,easy
AUTHOR
Alex Ratushnyak, Dec 11 2013
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 10:42 EDT 2024. Contains 371967 sequences. (Running on oeis4.)