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!)
A364724 a(n) is the least k such that 1^k + 2^k + 4^k is divisible by A364722(n). 2
0, 0, 1, 4, 6, 2, 12, 4, 7, 6, 20, 22, 3, 13, 4, 16, 17, 12, 12, 46, 14, 5, 54, 52, 60, 20, 32, 33, 22, 70, 6, 26, 8, 45, 4, 16, 34, 34, 52, 12, 10, 7, 49, 116, 114, 61, 124, 126, 68, 46, 140, 20, 24, 10, 77, 22, 81, 54, 52, 174, 180, 60, 182, 13, 38, 48, 32, 66, 101, 204, 206, 15, 70, 28, 220 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
COMMENTS
a(n) is the least k such that 1^k + 2^k + 4^k is divisible by the n-th number for which such k exists.
LINKS
EXAMPLE
a(4) = 4 because A364722(4) = 13 and 1 + 2^4 + 4^4 = 273 = 21 * 13 is divisible by 13.
MAPLE
f:= proc(n) local R, r, m, v;
R:= map(t -> subs(t, x), [msolve(1+x+x^2, n)]);
m:= infinity;
for r in R do
try
v:= NumberTheory:-ModularLog(r, 2, n);
catch "no solutions exist": next
end try;
m:= min(m, v)
od;
subs(infinity=NULL, m);
end proc:
map(f, [seq(i, i=1..1000, 2)]);
PROG
(Python)
from itertools import count, islice
from sympy import sqrt_mod_iter, discrete_log
def A364724_gen(): # generator of terms
yield 0
for k in count(2):
m = None
for d in sqrt_mod_iter(-3, k):
r = d>>1 if d&1 else d+k>>1
try:
m = discrete_log(k, r, 2) if m is None else min(m, discrete_log(k, r, 2))
except:
continue
if m is not None: yield m
A364724_list = list(islice(A364724_gen(), 30))
CROSSREFS
Sequence in context: A256508 A059030 A066984 * A241341 A085595 A173458
KEYWORD
nonn,look
AUTHOR
Robert Israel, Aug 04 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 July 16 23:11 EDT 2024. Contains 374360 sequences. (Running on oeis4.)