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-2 of 2 results.

A074792 Least k > 1 such that k^n == 1 (mod n).

Original entry on oeis.org

2, 3, 4, 3, 6, 5, 8, 3, 4, 9, 12, 5, 14, 13, 16, 3, 18, 5, 20, 3, 4, 21, 24, 5, 6, 25, 4, 13, 30, 11, 32, 3, 34, 33, 36, 5, 38, 37, 16, 3, 42, 5, 44, 21, 16, 45, 48, 5, 8, 9, 52, 5, 54, 5, 16, 13, 7, 57, 60, 7, 62, 61, 4, 3, 66, 23, 68, 13, 70, 29, 72, 5, 74, 73, 16, 37, 78, 17, 80, 3
Offset: 1

Views

Author

Benoit Cloitre, Sep 07 2002

Keywords

Crossrefs

a(n) = {A076944(n)}^(1/n).

Programs

  • Mathematica
    Do[k = 2; While[ !IntegerQ[(k^n - 1)/n], k++ ]; Print[k], {n, 1, 80}] (* Robert G. Wilson v *)
  • PARI
    a(n)=if(n<0,0,s=2; while((s^n-1)%n>0,s++); s)
    
  • PARI
    a(n)=my(s=2); while(Mod(s,n)^n-1!=0, s++); return(s) \\ Rémy Sigrist, Apr 02 2017

Formula

If p is prime a(p)=p+1 and a(2p)=2p-1; if n is in A050384 a(n)=n+1; if n is in A067945 a(n)=3 etc. It seems that sum(k=1, n, a(k)) is asymptotic to c*n^2 with c=0.2...

A076943 Smallest k > 0 such that n*k + 1 is an n-th power.

Original entry on oeis.org

1, 4, 21, 20, 1555, 2604, 299593, 820, 29127, 348678440, 67546215517, 20345052, 61054982558011, 281241170407092, 76861433640456465, 2690420, 128583032925805678351, 211927625868, 275941052631578947368421, 174339220
Offset: 1

Views

Author

Amarnath Murthy, Oct 19 2002

Keywords

Examples

			For n = 7, 1 + 7*a(7) = 1 + 7*299593 = 2097152 = 2^21 = 8^7.
For n = 10, 1 + 10*a(10) = 1 + 10*348678440 = 3486784401 = 3^20 = 9^10. - _Marius A. Burtea_, Jun 01 2019
		

Crossrefs

Programs

  • Magma
    sol:=[];
    for u in [1..20] do
       for k in [2..100] do
          if IsIntegral((k^u-1)/u) then sol[u]:=(k^u-1)/u; break; end if;
       end for;
    end for;
    sol; // Marius A. Burtea, Jun 01 2019
  • Mathematica
    Do[k = 2; While[ !IntegerQ[(k^n - 1)/n], k++ ]; Print[(k^n - 1)/n], {n, 1, 20}] (* Robert G. Wilson v, Oct 21 2002 *)

Formula

a(n) <= ((n+1)^n - 1) / n.
a(p^k) = ((p+1)^(p^k) - 1) / p^k. - Charlie Neder, May 23 2019
a(2*p) = ((2*p-1)^(2*p) - 1) / (2*p). - Charlie Neder, May 23 2019

Extensions

Edited, corrected and extended by Robert G. Wilson v, Oct 21 2002
Showing 1-2 of 2 results.