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.

Showing 1-3 of 3 results.

A091733 a(n) is the least m > 1 such that m^3 = 1 (mod n).

Original entry on oeis.org

2, 3, 4, 5, 6, 7, 2, 9, 4, 11, 12, 13, 3, 9, 16, 17, 18, 7, 7, 21, 4, 23, 24, 25, 26, 3, 10, 9, 30, 31, 5, 33, 34, 35, 11, 13, 10, 7, 16, 41, 42, 25, 6, 45, 16, 47, 48, 49, 18, 51, 52, 9, 54, 19, 56, 9, 7, 59, 60, 61, 13, 5, 4, 65, 16, 67, 29, 69, 70, 11, 72, 25, 8, 47, 76, 45, 23, 55, 23
Offset: 1

Views

Author

David Wasserman, Mar 05 2004

Keywords

Comments

a(n) <= n + 1; the inequality is strict iff n is divisible by 9 or by a prime congruent to 1 mod 3. - Robert Israel, May 27 2014

Examples

			a(7) = 2 because 2^3 is congruent to 1 (mod 7).
		

Crossrefs

Programs

  • MATLAB
    m = 2; while mod(m^3 - 1, n); m = m + 1; end; m
    
  • Maple
    A:= n -> min(select(t -> type((t^3-1)/n, integer), [$2 .. n+1]));
    map(A, [$1 .. 1000]); # Robert Israel, May 27 2014
  • Mathematica
    f[n_] := Block[{x = 2}, While[Mod[x^3 - 1, n] != 0, x++]; x]; Array[f, 79] (* Robert G. Wilson v, Mar 29 2016 *)
  • PARI
    a(n) = my(k = 2); while(Mod(k, n)^3 != 1, k++); k; \\ Michel Marcus, Mar 30 2016

A266236 Least m > 0 such that m*n^3 + 1 is a cube.

Original entry on oeis.org

1, 7, 91, 37, 4291, 16003, 1801, 17, 263683, 19927, 1003003, 1775557, 111169, 506115, 17145, 423001, 16789507, 24152311, 1261657, 3266062, 64024003, 5080, 113411851, 148072393, 7082497, 244187503, 1922636, 14355469, 3132736, 594896491, 27009001, 8341522, 1073840131
Offset: 0

Views

Author

Alex Ratushnyak, Dec 25 2015

Keywords

Comments

Least m>0 for which x^3 - m*y^3 = 1 has a solution with y = n.

Examples

			17*7^3+1 = 18^3, and 17 is the smallest positive m such that m*7^3+1 is a cube, so a(7)=17.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{x = 2, n3 = n^3}, While[ Mod[x^3 - 1, n3] != 0, x++]; (x^3 - 1)/n3]; f[0] = 1; Array[f, 34, 0] (* Robert G. Wilson v, Mar 24 2016 *)
  • PARI
    a(n) = {my(m = 1, cn = n^3); while (!ispower(m*cn + 1, 3), m++); m;} \\ Michel Marcus, Feb 09 2016

Formula

a(n) = A076947(n^3). - Robert Israel, Dec 25 2015

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
Showing 1-3 of 3 results.