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.

A182590 Number of distinct prime factors of 2^n - 1 of the form k*n + 1.

Original entry on oeis.org

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

Views

Author

Seppo Mustonen, Nov 22 2010

Keywords

Comments

From Thomas Ordowski, Sep 08 2017: (Start)
By Bang's theorem, a(n) > 0 for all n > 1, see A186522.
Primes p such that a(p) = 1 are the Mersenne exponents A000043.
Composite numbers m for which a(m) = 1 are A292079.
a(n) >= A086251(n), where equality is for all prime numbers and for some composite numbers (among others for all odd prime powers p^k with k > 1).
Theorem: if n is prime, then a(n) = A046800(n).
Conjecture: if a(n) = A046800(n), then n is prime.
Problem: is a(n) < A046800(n) for every composite n? (End)

Examples

			For n=10 the prime factors of 2^n - 1 = 1023 are 3, 11 and 31, and 11 = n+1, 31 = 3n+1. Thus a(10)=2.
		

Crossrefs

Programs

  • Mathematica
    m = 2; n = 2; nmax = 200;
    While[n <= nmax, {l = FactorInteger[m^n - 1]; s = 0;
         For[i = 1, i <= Length[l],
          i++, {p = l[[i, 1]];
           If[IntegerQ[(p - 1)/n] == True, s = s + l[[i, 2]]];}];
         a[n] = s;} n++;];
    Table[a[n], {n, 2, nmax}]
  • PARI
    a(n) = my(f = factor(2^n-1)); sum(k=1, #f~, ((f[k,1]-1) % n)==0); \\ Michel Marcus, Sep 10 2017

Extensions

Name edited by Thomas Ordowski, Sep 19 2017

A186283 Least number k such that k*n+1 is a prime dividing 2^n-1.

Original entry on oeis.org

1, 2, 1, 6, 1, 18, 2, 8, 1, 2, 1, 630, 3, 2, 1, 7710, 1, 27594, 2, 6, 1, 2, 10, 24, 105, 9728, 1, 8, 1, 69273666, 8, 18166, 1285, 2, 1, 6, 4599, 2, 1, 326, 1, 10, 2, 14, 1, 50, 2, 90462791808, 5, 2, 1, 120, 1615, 16, 2, 568, 1, 3050, 1, 37800705069076950, 11545611, 2, 4, 126, 1, 2891160, 2, 145690999102, 1
Offset: 2

Views

Author

Bill McEachen, Feb 16 2011

Keywords

Comments

The smallest prime factor of 2^n-1 of the form k*n+1 is A186522(n).
By Fermat's little theorem, a(n) = 1 if and only if n+1 is an odd prime. Further, for prime p, a(p) = 2 if and only if p is in A002515. - Thomas Ordowski, Sep 03 2017

Examples

			For n=8, 2^n-1 = 255 = 3 * 5 * 17.  The smallest prime factor of the form k*n+1 is 17 = 2*8+1. Hence, a(8) = 2.
		

References

  • Kenneth H. Rosen, Elementary Number Theory and Its Applications, 3rd Ed, Theorem 6.12, p. 225

Crossrefs

Programs

  • Mathematica
    Table[p=First/@FactorInteger[2^n-1]; (Select[p, Mod[#1,n] == 1 &, 1][[1]] - 1)/n, {n, 2, 70}]
  • PARI
    a(n) = {if(isprime(n+1),return(1)); my(f = factor(2^n - 1)[,1]); for(i=1,#f, if(f[i]%n == 1, return((f[i]-1) / n)))} \\ David A. Corneth, Sep 03 2017

Formula

a(n) = (A186522(n)-1)/n.
Showing 1-2 of 2 results.