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!)
A003571 Order of 3 mod 3n+1. 5
1, 2, 6, 4, 3, 4, 18, 5, 20, 6, 30, 16, 18, 4, 42, 11, 42, 6, 20, 28, 10, 16, 22, 12, 12, 18, 78, 8, 16, 10, 6, 23, 48, 20, 34, 52, 27, 12, 44, 29, 5, 30, 126, 12, 18, 16, 138, 35, 28, 18, 50, 30, 78, 8, 162, 41, 39, 42, 60, 88, 45, 22, 80, 36, 16, 42, 198, 100, 8 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
LINKS
MAPLE
a := n -> `if`(n=0, 1, numtheory:-order(3, 3*n+1)):
seq(a(n), n = 0..68);
MATHEMATICA
Table[MultiplicativeOrder[3, 3*n + 1], {n, 0, 68}] (* Arkadiusz Wesolowski, Nov 27 2012 *)
PROG
(Sage)
def A003571(n):
s, m, N = 0, 1, 3*n + 1
while True:
k = N + m
v = valuation(k, 3)
s += v
m = k // 3^v
if m == 1: break
return s
print([A003571(n) for n in (0..68)]) # Peter Luschny, Oct 07 2017
(GAP) List([0..70], n->OrderMod(3, 3*n+1)); # Muniru A Asiru, Feb 16 2019
(PARI) a(n) = znorder(Mod(3, 3*n+1)); \\ Michel Marcus, Feb 16 2019
CROSSREFS
Sequence in context: A368516 A283614 A333520 * A068457 A299402 A286451
KEYWORD
nonn
AUTHOR
EXTENSIONS
a(0) = 1 added by Peter Luschny, Oct 07 2017
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 10:11 EDT 2024. Contains 371935 sequences. (Running on oeis4.)