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!)
A364683 a(n) is the least k such that 1 + 2^k + 3^k is divisible by n, or -1 if there is no such k. 2
0, 1, 0, 3, -1, 1, 2, -1, 3, -1, 9, 3, -1, 2, -1, -1, 9, 3, -1, -1, -1, 9, 5, -1, -1, -1, 9, -1, -1, -1, 16, -1, 9, 9, -1, 3, 12, -1, -1, -1, 18, -1, -1, 9, -1, 5, -1, -1, 4, -1, 9, -1, -1, 9, -1, -1, -1, -1, -1, -1, -1, 16, -1, -1, -1, 9, -1, 9, 5, -1, -1, -1, 19, 12, -1, -1, -1, -1, 33, -1, 27 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
COMMENTS
If a(n) = -1, then a(m) = -1 for all multiples of n.
LINKS
EXAMPLE
a(7) = 2 because 1 + 2^2 + 3^2 = 14 is divisible by 7 while 1 + 2^0 + 3^0 = 3 and 1 + 2^1 + 3^1 = 6 are not.
MAPLE
f:= proc(n) local k;
for k from 0 to numtheory:-phi(n) + max(padic:-ordp(n, 2), padic:-ordp(n, 3)) do
if 1 + 2&^k + 3&^k mod n = 0 then return k fi
od;
-1
end proc:
map(f, [$1..100]);
CROSSREFS
Cf. A001550.
Sequence in context: A080847 A326406 A334006 * A270572 A095276 A246457
KEYWORD
sign,look
AUTHOR
Robert Israel, Aug 02 2023
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 August 19 10:05 EDT 2024. Contains 375284 sequences. (Running on oeis4.)