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.

A250396 a(n) is the smallest prime greater than 2^n such that 2 is a primitive root modulo a(n).

Original entry on oeis.org

3, 3, 5, 11, 19, 37, 67, 131, 269, 523, 1061, 2053, 4099, 8219, 16421, 32771, 65539, 131213, 262147, 524309, 1048589, 2097211, 4194371, 8388619, 16777259, 33554467, 67108933, 134217773, 268435459, 536871019, 1073741827, 2147483659, 4294967357, 8589934621, 17179869269, 34359738421, 68719476851, 137438953741
Offset: 0

Views

Author

Morgan L. Owens, Nov 21 2014

Keywords

References

  • Henri Cohen, A Course in Computational Algebraic Number Theory, Springer Verlag, (1993)

Crossrefs

Cf. A104080 (smallest prime >= 2^n).

Programs

  • Mathematica
    With[{n = 20},
    Module[{p = NextPrime[2^n]},
      While[FreeQ[PrimitiveRootList[p], 2], p = NextPrime[p]]; p]]
  • PARI
    a(n)=forprime(p=2^n+1,,if(znorder(Mod(2,p))==p-1,return(p))); \\ Joerg Arndt, Nov 21 2014