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!)
A333339 a(n) is the smallest positive number k such that n divides 3^k - k. 4
1, 1, 3, 3, 7, 3, 2, 3, 9, 7, 4, 3, 16, 5, 27, 11, 5, 9, 29, 7, 27, 45, 39, 3, 73, 27, 27, 27, 22, 27, 132, 27, 36, 5, 27, 27, 65, 29, 27, 27, 27, 27, 10, 59, 27, 39, 12, 27, 47, 73, 42, 27, 68, 27, 36, 27, 30, 47, 154, 27, 192, 147, 27, 59, 16, 45, 119, 75, 39 (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.
a(n) > log_3(n). - Robert Israel, Mar 19 2020
LINKS
FORMULA
a(3^m) = 3^m for m >= 0.
a(3^m-m) = m for m >= 1. - Robert Israel, Mar 19 2020
MAPLE
f:= proc(n) local k;
for k from 1 do if 3 &^k - k mod n = 0 then return k fi od
end proc:
map(f, [$1..100]); # Robert Israel, Mar 19 2020
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: A076217 A256784 A324543 * A089488 A367034 A366982
KEYWORD
nonn
AUTHOR
Jinyuan Wang, Mar 16 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 24 19:52 EDT 2024. Contains 371963 sequences. (Running on oeis4.)