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)^3.
LINKS
Peter Kagey, Table of n, a(n) for n = 1..5000
FORMULA
a(n) = n + A019555(n).
EXAMPLE
a(8) = 10 because 8 divides 10^3, but 8 does not divide 9^3.
MATHEMATICA
lkn[n_]:=Module[{k=n+1}, While[PowerMod[k, 3, n]!=0, k++]; k]; Array[lkn, 70] (* Harvey P. Dale, Nov 23 2024 *)
PROG
(Ruby)
def a(n)
(n+1..2*n).find { |k| k**3 % n == 0 }
end
(PARI) a(n)=for(k=n+1, 2*n, if(k^3%n==0, return(k)))
vector(100, n, a(n)) \\ Derek Orr, Feb 07 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Peter Kagey, Feb 06 2015
STATUS
approved