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.

A097406 Largest primitive prime factor of 2^n-1, or a(n) = 1 if no such prime exists.

Original entry on oeis.org

1, 3, 7, 5, 31, 1, 127, 17, 73, 11, 89, 13, 8191, 43, 151, 257, 131071, 19, 524287, 41, 337, 683, 178481, 241, 1801, 2731, 262657, 113, 2089, 331, 2147483647, 65537, 599479, 43691, 122921, 109, 616318177, 174763, 121369, 61681, 164511353, 5419
Offset: 1

Views

Author

Marco Matosic, Aug 16 2004

Keywords

Comments

By Zsigmondy's theorem, a(n) > 1 except for n = 1 or 6.
Conjectures: (1) For every n the highest unique prime factor is of the form kn+1. The values for k are in A097407. (2) For each composite n many factors of the form kn+1 occur intermittently but always singly in any cofactor pair. (3) For each prime n every factor is of the form kn+1.
A prime factor of 2^n-1 is called primitive if it does not divide 2^r-1 for any rA086251.
a(n) is the greatest prime such that the multiplicative order of 2 mod a(n) equals n, or a(n)=1 if no such prime exists. - Jianing Song, Oct 23 2019

Crossrefs

For the smallest primitive prime factor of 2^n-1 see A112927.

Programs

  • PARI
    isprimitive(p, n) = {for (r=1, n-1, if (((2^r-1) % p) == 0, return (0));); return (1);}
    a(n) = {f = factor(2^n-1); forstep(i=#f~, 1, -1, if (isprimitive(f[i, 1], n), return (f[i, 1]));); return (1);} \\ Michel Marcus, Jul 15 2013

Formula

a(n) = A006530(A064078(n)). - Jianing Song, Oct 23 2019

Extensions

More terms and better description from Vladeta Jovovic, Sep 03 2004
a(1) and a(6) changed from 0 to 1 by Jianing Song, Oct 23 2019