OFFSET
1,1
COMMENTS
A073353(n) <= a(n) <= 2*n. Any prime that divides n must also divide a(n), and because n divides (2*n)^4.
a(n) = 2*n iff n is squarefree (A005117). - Robert Israel, Feb 08 2015
LINKS
Peter Kagey, Table of n, a(n) for n = 1..5000
EXAMPLE
a(16) = 18 because 16 divides 18^4, but 16 does not divide 17^4.
MAPLE
f:= proc(n) local k;
for k from n+1 do if (k^4/n)::integer then return k fi od:
end proc:
seq(f(n), n=1..100); # Robert Israel, Feb 08 2015
MATHEMATICA
lk[n_]:=Module[{k=n+1}, While[PowerMod[k, 4, n]!=0, k++]; k]; Array[lk, 70] (* Harvey P. Dale, Nov 22 2015 *)
PROG
(Ruby)
def a(n)
(n+1..2*n).find { |k| k**4 % n == 0 }
end
(PARI) a(n)=for(k=n+1, 2*n, if(k^4%n==0, return(k)))
vector(100, n, a(n)) \\ Derek Orr Feb 07 2015
(Python)
def A254734(n):
k = n + 1
while pow(k, 4, n):
k += 1
return k # Chai Wah Wu, Feb 15 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Peter Kagey, Feb 07 2015
STATUS
approved