login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Smallest cube of the form n*k + 1 with k>0.
1

%I #36 Apr 06 2018 10:33:48

%S 8,27,64,125,216,343,8,729,64,1331,1728,2197,27,729,4096,4913,5832,

%T 343,343,9261,64,12167,13824,15625,17576,27,1000,729,27000,29791,125,

%U 35937,39304,42875,1331,2197,1000,343,4096,68921,74088,15625,216,91125,4096

%N Smallest cube of the form n*k + 1 with k>0.

%H David A. Corneth, <a href="/A076989/b076989.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) <= (n+1)^3. In particular, a(n) < (n+1)^3 if n is in A066498. - _David A. Corneth_, Mar 30 2018

%F a(n) = A076947(n)*n + 1. - _Altug Alkan_, Mar 30 2018

%e a(9) = 64 as 64 = 7*9 + 1.

%p 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);

%p # Alternative

%p f:=proc(n) local R;

%p R:= sort([numtheory:-rootsunity(3,n)] mod n);

%p if nops(R)=1 then (n+1)^3 else R[2]^3 fi

%p end proc:

%p map(f, [$1..150]); # _Robert Israel_, Mar 30 2018

%t 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 *)

%o (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

%Y Cf. A066498, A076947.

%K nonn,easy,look

%O 1,1

%A _Amarnath Murthy_, Oct 25 2002

%E More terms from _Sascha Kurz_, Jan 26 2003