The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A283620 a(n) is the least exponent k such that 3^k-1 is divisible by prime(n)^2, or -1 if no such k exists. 2
2, -1, 20, 42, 5, 39, 272, 342, 253, 812, 930, 666, 328, 1806, 1081, 2756, 1711, 610, 1474, 2485, 876, 6162, 3403, 7832, 4656, 10100, 3502, 5671, 2943, 12656, 16002, 8515, 18632, 19182, 22052, 7550, 12246, 26406, 13861, 29756, 15931, 8145, 18145, 3088, 38612, 39402, 44310 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
a(2) is -1, because 3^n-1 cannot be divisible by prime(2)=3.
For some terms, prime(n)^2 is also the least square of prime which divides 3^a(n)-1. This is the case for n=1, 5, 6, ..., that is, p=2, 11, 13, ... (see A283454).
If n <> 2, then a(n) = A062117(n) if 3^A062117(n) == 1 (mod prime(n)^2), or
prime(n)*A062117(n) if not. - Robert Israel, Mar 16 2017
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000 (first 100 terms from Anton Mosunov)
MAPLE
subs(FAIL=-1, [seq(numtheory:-order(3, ithprime(i)^2), i=1..100)]); # Robert Israel, Mar 16 2017
MATHEMATICA
Join[{2, -1}, Table[Module[{k=1}, While[PowerMod[3, k, Prime[n]^2]!=1, k++]; k], {n, 3, 50}]] (* Harvey P. Dale, Oct 22 2023 *)
PROG
(PARI) a(n) = if (n == 2, -1, k = 1; p = prime(n); while((3^k-1) % p^2, k++); k; );
CROSSREFS
Sequence in context: A185169 A353914 A353873 * A012927 A013158 A012932
KEYWORD
sign,look
AUTHOR
Michel Marcus, Mar 12 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 May 31 22:12 EDT 2024. Contains 373007 sequences. (Running on oeis4.)