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!)
A333334 a(n) is the smallest positive number k such that n divides 3^k + k. 4
1, 1, 3, 1, 3, 3, 6, 5, 9, 3, 2, 9, 10, 15, 3, 13, 4, 9, 18, 17, 6, 29, 22, 21, 23, 17, 27, 25, 28, 3, 5, 13, 57, 23, 6, 9, 36, 23, 12, 37, 40, 15, 17, 29, 63, 63, 35, 45, 6, 23, 27, 17, 19, 27, 57, 109, 18, 31, 10, 57, 52, 5, 90, 45, 17, 57, 66, 65, 63, 23, 70 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
For any positive integer n, if k = a(n) + n*m*A007734(n) and m >= 0 then 3^k + k is divisible by n.
LINKS
Brazil National Olympiad, 2005, Problem 6
FORMULA
a(3^m) = 3^m for m >= 0.
a(p) <= p - 1 if p is a prime greater than 3.
MATHEMATICA
a[n_] := Module[{k = 1}, While[!Divisible[3^k + k, n], k++]; k]; Array[a, 100] (* Amiram Eldar, Mar 16 2020 *)
PROG
(PARI) a(n) = for(k=1, oo, if(Mod(3, n)^k==-k, return(k)));
CROSSREFS
Sequence in context: A259286 A087891 A005885 * A205145 A061892 A038573
KEYWORD
nonn,easy
AUTHOR
Jinyuan Wang, Mar 15 2020
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 06:14 EDT 2024. Contains 371964 sequences. (Running on oeis4.)