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.

A276172 Number of primitive prime divisors of 3^n - 2^n.

Original entry on oeis.org

0, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 2, 2, 1, 1, 1, 2, 1, 2, 2, 2, 2, 3, 2, 2, 1, 3, 4, 1, 3, 1, 1, 3, 3, 1, 2, 2, 3, 2, 1, 1, 2, 2, 2, 3, 1, 2, 3, 3, 3, 2, 3, 2, 3, 1, 5, 1, 2, 3, 3, 2, 3, 1, 3, 2, 4, 1, 3, 4, 3, 2, 2, 5, 3
Offset: 1

Views

Author

Michel Lagneau, Aug 23 2016

Keywords

Comments

A prime factor of 3^n - 2^n is called primitive if it does not divide 3^r - 2^r for any positive r=2, Zsigmondy's theorem says that there is at least one primitive prime factor except two cases:
(i) 2^6 - 1^6
(ii) n=2 and a+b is a power of 2.

Examples

			a(7) = 2 because 3^7 - 2^7 = 2059 = 29*71 => 29 and 71 do not divide 3^r - 2^r  for r < 7:
3^1 - 2^1 = 1;
3^2 - 2^2 = 5;
3^3 - 2^3 = 19;
3^4 - 2^4 = 65 = 5*13;
3^5 - 2^5 = 211;
3^6 - 2^6 = 665 = 5*7*19.
		

Crossrefs

Programs

  • Maple
    f:= n -> nops(select(p -> numtheory:-order(3/2 mod p, p) = n, numtheory:-factorset(3^n-2^n)));
    map(f, [$1..100]); # Robert Israel, Sep 14 2016
  • Mathematica
    nMax=100; pLst={}; Table[f=Transpose[FactorInteger[3^n-2^n]][[1]]; f=Complement[f, pLst]; cnt=Length[f]; pLst=Union[pLst, f]; cnt, {n, 1, nMax}]

Extensions

a(1) corrected by Robert Israel, Sep 14 2016