OFFSET
1,1
LINKS
David A. Corneth, Table of n, a(n) for n = 1..10000
FORMULA
a(n) <= (n+1)^3. In particular, a(n) < (n+1)^3 if n is in A066498. - David A. Corneth, Mar 30 2018
a(n) = A076947(n)*n + 1. - Altug Alkan, Mar 30 2018
EXAMPLE
a(9) = 64 as 64 = 7*9 + 1.
MAPLE
a[1] := 8:for n from 2 to 150 do j := 2:while((j^3 mod n)<>1)do j := j+1:od: a[n] := j^3:od:seq(a[k], k=1..150);
# Alternative
f:=proc(n) local R;
R:= sort([numtheory:-rootsunity(3, n)] mod n);
if nops(R)=1 then (n+1)^3 else R[2]^3 fi
end proc:
map(f, [$1..150]); # Robert Israel, Mar 30 2018
MATHEMATICA
sc[n_]:=Module[{k=1}, While[!IntegerQ[Surd[n*k+1, 3]], k++]; n*k+1]; Array[ sc, 50] (* Harvey P. Dale, Mar 30 2018 *)
PROG
(PARI) first(n) = my(res = vector(n)); {res[1] = 8; for(i = 2, n + 1, i3 = i ^ 3-1; d = divisors(i3); j = 2; while(j <= #d && d[j] <= n, if(res[d[j]] == 0, res[d[j]] = i3 + 1); j++)); res} \\ David A. Corneth, Mar 30 2018
CROSSREFS
KEYWORD
AUTHOR
Amarnath Murthy, Oct 25 2002
EXTENSIONS
More terms from Sascha Kurz, Jan 26 2003
STATUS
approved