cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

Original entry on oeis.org

8, 27, 64, 125, 216, 343, 8, 729, 64, 1331, 1728, 2197, 27, 729, 4096, 4913, 5832, 343, 343, 9261, 64, 12167, 13824, 15625, 17576, 27, 1000, 729, 27000, 29791, 125, 35937, 39304, 42875, 1331, 2197, 1000, 343, 4096, 68921, 74088, 15625, 216, 91125, 4096
Offset: 1

Views

Author

Amarnath Murthy, Oct 25 2002

Keywords

Examples

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

Crossrefs

Programs

  • 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 *)
  • 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

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

Extensions

More terms from Sascha Kurz, Jan 26 2003