login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A082511 a(n) = 3^n mod 2n. 4
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, 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, 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 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

LINKS

Vincenzo Librandi, Table of n, a(n) for n = 1..2000

EXAMPLE

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.

a(6)=9: modulus = 2*n = 12; 3^n = 3^6 = 729 = 60*12 + 9 = 720 + a(6).

MATHEMATICA

Table[PowerMod[3, n, 2n], {n, 90}] (* Harvey P. Dale, Jan 21 2014 *)

PROG

(Python) for n in range(1, 80): print(pow(3, n, 2*n), end=" ") # Stefano Spezia, Oct 20 2018

(PARI) a(n) = lift(Mod(3, 2*n)^n) \\ Felix Fröhlich, Oct 20 2018

CROSSREFS

Cf. A000079, A000244, A002379.

Cf. A083528, A083529, A083530.

Sequence in context: A143453 A248830 A164308 * A265307 A133579 A088442

Adjacent sequences:  A082508 A082509 A082510 * A082512 A082513 A082514

KEYWORD

nonn

AUTHOR

Labos Elemer, Apr 28 2003

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified November 18 01:03 EST 2018. Contains 317279 sequences. (Running on oeis4.)