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.

User: Seppo Mustonen

Seppo Mustonen's wiki page.

Seppo Mustonen has authored 51 sequences. Here are the ten most recent ones:

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

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

A182594 Number of prime factors of form c*n+1 for numbers 7^n-1, counted with multiplicity.

Original entry on oeis.org

1, 1, 2, 1, 2, 2, 1, 3, 3, 2, 2, 1, 4, 2, 3, 2, 4, 2, 3, 1, 4, 3, 4, 3, 3, 4, 4, 3, 3, 3, 2, 4, 3, 3, 3, 3, 4, 4, 5, 3, 4, 2, 4, 2, 4, 2, 3, 4, 4, 5, 5, 3, 5, 1, 6, 3, 4, 4, 5, 4, 6, 2, 3, 6, 6, 4, 6, 3, 8, 2, 5, 5, 5, 3, 2, 3, 7, 2, 5, 6, 7, 7, 3, 3, 9, 5, 4, 3, 6, 5, 5, 4, 3, 3, 5, 3, 11, 4, 6
Offset: 2

Author

Seppo Mustonen, Nov 22 2010

Keywords

Examples

			For n=9, 7^n-1 = 40353606 = 2*3^3*19*37*1063 has three prime factors of form, namely 19 = 2n+1, 37 = 4n+1, 1063 = 118n+1. Thus a(9) = 3.
		

Programs

  • Maple
    f:= proc(n) local F;
      F:= select(t -> t[1] mod n = 1, ifactors(7^n-1)[2]);
      convert(F[..,2],`+`)
    end proc:
    map(f, [$2..100]); # Robert Israel, Apr 29 2025
  • Mathematica
    m = 7; n = 2; nmax = 80;
    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}]

Extensions

Definition clarified and more terms from Robert Israel, Apr 29 2025

A182591 Number of prime factors of form cn+1 for numbers 3^n-1.

Original entry on oeis.org

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

Author

Seppo Mustonen, Nov 22 2010

Keywords

Examples

			For n=6, 3^n-1=728 has two prime factors of the form cn+1, namely 7=n+1 and 13=2n+1. Thus a(6)=2.
		

Programs

  • Mathematica
    m = 3; n = 2; nmax = 170;
    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}]

A182592 Number of prime factors of form cn+1 for numbers 5^n-1.

Original entry on oeis.org

1, 1, 1, 2, 2, 1, 1, 2, 3, 1, 2, 1, 3, 3, 2, 2, 3, 3, 3, 3, 4, 2, 3, 4, 3, 4, 3, 3, 5, 2, 3, 3, 4, 6, 3, 3, 6, 3, 5, 2, 6, 2, 3, 4, 4, 1, 2, 1, 6, 5, 3, 3, 7, 5, 3, 2, 5, 2, 7, 3, 5, 6, 4, 4, 7, 5, 8, 6, 8, 2, 3, 3, 6, 5, 5, 3, 7, 3, 4, 2, 6, 3, 3, 3, 6, 4, 4, 6, 5, 3, 2, 5, 4, 7, 5, 3, 4, 5, 7, 3, 10, 4, 5, 8, 6, 5, 2, 4, 7, 3, 6, 8, 5, 10, 2, 3, 6, 5, 7
Offset: 2

Author

Seppo Mustonen, Nov 22 2010

Keywords

Examples

			For n=10, 5^n-1=9765624=2^3*3*11*71*521 has three prime factors of the form cn+1, namely 11=n+1, 71=7n+1, 521=52n+1. Thus a(10)=3.
		

Programs

  • Mathematica
    m = 5; n = 2; nmax = 120;
    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}]
    Table[Count[FactorInteger[5^n-1][[All,1]],?(Mod[#,n]==1&)],{n,2,130}] (* _Harvey P. Dale, Dec 11 2016 *)

A182593 Number of prime factors of form c*n+1 for numbers 6^n-1.

Original entry on oeis.org

2, 1, 2, 1, 3, 1, 1, 2, 3, 2, 3, 2, 3, 2, 3, 4, 3, 2, 3, 3, 3, 4, 3, 2, 5, 2, 4, 1, 4, 2, 3, 2, 6, 3, 5, 5, 4, 4, 3, 2, 4, 4, 4, 4, 6, 3, 5, 3, 4, 5, 6, 3, 5, 2, 5, 3, 4, 3, 7, 3, 3, 4, 4, 5, 6, 2, 4, 4, 8, 1, 7, 4, 8, 5, 4, 2, 9, 3, 5, 4, 5, 7, 4, 3, 5, 5, 4, 3, 6, 2, 6, 5, 4, 7, 8, 5, 6, 6, 7, 2, 11, 4, 7, 6, 7, 3, 6, 2, 6, 5, 6, 4, 6, 7, 4, 4, 4, 6, 6
Offset: 2

Author

Seppo Mustonen, Nov 22 2010

Keywords

Examples

			For n=6, 6^n-1=46655=5*7*31*43 and has three prime factors of form c*n+1, namely 7=n+1, 31=5*n+1, and 43=7*n+1. Thus a(6)=3. [Corrected by _N. J. A. Sloane_, Nov 16 2024]
		

Programs

  • Mathematica
    m = 6; n = 2; nmax = 120;
    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}]

A182595 Number of prime factors of form cn+1 for numbers 2^n+1.

Original entry on oeis.org

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

Author

Seppo Mustonen, Nov 24 2010

Keywords

Comments

Repeated prime factors are counted.

Examples

			For n=14, 2^n+1=16385=5*29*113 has two prime factors of form, namely 29=2n+1, 113=8n+1. Thus a(14)=2.
		

Programs

  • Mathematica
    m = 2; n = 2; nmax = 250;
    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}]
    Table[{p, e}=Transpose[FactorInteger[2^n+1]]; Sum[If[Mod[p[[i]], n] == 1, e[[i]], 0], {i, Length[p]}], {n, 2, 50}]

A182596 Number of prime factors of form cn+1 for numbers 3^n+1.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 2, 2, 1, 2, 1, 1, 2, 3, 1, 3, 2, 2, 2, 3, 2, 1, 4, 2, 2, 2, 2, 3, 1, 2, 1, 4, 2, 1, 2, 3, 2, 5, 2, 2, 2, 1, 3, 3, 2, 3, 2, 2, 3, 6, 2, 2, 2, 3, 3, 5, 2, 2, 5, 2, 3, 5, 1, 2, 1, 2, 3, 6, 3, 5, 3, 2, 3, 6, 4, 1, 2, 3, 4, 7, 3, 4, 5, 4, 5, 8, 3, 3, 3, 6, 2, 6, 2, 4, 4, 3, 5, 6, 3, 2, 5, 3, 4, 6, 4, 3, 7, 4, 4, 7, 7, 3, 4, 3, 3, 6, 1, 2, 5, 4, 4, 6, 2, 3, 4, 4, 5, 6, 3
Offset: 2

Author

Seppo Mustonen, Nov 24 2010

Keywords

Comments

Repeated prime factors are counted.

Examples

			For n=8, 3^n+1=6562=2*17*193 has two prime factors of form, namely 17=2n+1, 193=24n+1. Thus a(8)=2.
		

Programs

  • Mathematica
    m = 3; n = 2; nmax = 130;
    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}]
    Table[{p, e}=Transpose[FactorInteger[3^n+1]]; Sum[If[Mod[p[[i]], n] == 1, e[[i]], 0], {i, Length[p]}], {n, 2, 50}]

A182597 Number of prime factors of form cn+1 for numbers 5^n+1.

Original entry on oeis.org

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

Author

Seppo Mustonen, Nov 24 2010

Keywords

Comments

Repeated prime factors are counted.

Examples

			For n=11, 5^n+1=48828126=2*3*23*67*5281 has three prime factors of form, namely 23=2n+1, 67=6n+1, 5281=480n+1. Thus a(11)=3.
		

Programs

  • Mathematica
    m = 5; n = 2; nmax = 107;
    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}]
    Table[{p,e}=Transpose[FactorInteger[5^n+1]]; Sum[If[Mod[p[[i]], n] == 1, e[[i]], 0], {i, Length[p]}], {n, 2, 50}]

A182598 Number of prime factors of form cn+1 for numbers 6^n+1.

Original entry on oeis.org

1, 2, 1, 2, 3, 2, 2, 1, 2, 1, 2, 3, 2, 2, 3, 2, 4, 2, 2, 1, 3, 2, 2, 2, 3, 3, 4, 3, 6, 1, 3, 4, 2, 5, 5, 3, 2, 5, 4, 3, 4, 1, 2, 2, 4, 1, 5, 3, 3, 6, 3, 4, 5, 4, 4, 3, 2, 1, 3, 2, 1, 3, 3, 3, 8, 4, 4, 2, 4, 3, 1, 5, 3, 5, 4, 1, 7, 5, 3, 3, 3, 4, 5, 3, 4, 7, 2, 2, 7, 5, 3, 2, 4, 5, 2, 3, 2, 4, 6
Offset: 2

Author

Seppo Mustonen, Nov 24 2010

Keywords

Comments

Repeated prime factors are counted.

Examples

			For n=6, 6^n-1=46655=5*7*31*43 has three prime factors of form, namely 7=n+1, 31=5n+1, 43=7n+1. Thus a(6)=3.
		

Programs

  • Mathematica
    m = 6; n = 2; nmax = 100;
    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}]
    Table[{p, e}=Transpose[FactorInteger[6^n+1]]; Sum[If[Mod[p[[i]], n] == 1, e[[i]], 0], {i, Length[p]}], {n, 2, 50}]

A182599 Number of prime factors of form cn+1 for numbers 7^n+1.

Original entry on oeis.org

2, 1, 1, 2, 2, 2, 2, 1, 2, 2, 4, 2, 1, 1, 2, 1, 2, 2, 3, 3, 3, 1, 1, 1, 2, 1, 4, 1, 4, 3, 3, 2, 3, 5, 4, 2, 1, 3, 3, 4, 2, 7, 3, 4, 4, 1, 3, 7, 4, 4, 3, 4, 3, 6, 5, 5, 4, 4, 3, 1, 3, 8, 3, 2, 5, 3, 3, 4, 4, 2, 5, 3, 1, 5, 5, 5, 4, 4, 3, 4, 3, 2, 5, 3, 3, 4, 2, 5, 4, 5, 4, 5, 3, 6, 6, 3, 5, 3, 3
Offset: 2

Author

Seppo Mustonen, Nov 24 2010

Keywords

Comments

Repeated prime factors are counted.

Examples

			For n=12, 7^12+1=13841287202=2*73*193*409*1201 has four prime factors of form, namely 73=6n+1, 193=16n+1, 409=34n+1, 1201=100n+1. Thus a(12)=4.
		

Programs

  • Mathematica
    m = 7; n = 2; nmax = 100;
    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}]
    Table[{p,e}=Transpose[FactorInteger[7^n+1]]; Sum[If[Mod[p[[i]], n]==1, e[[i]], 0], {i, Length[p]}], {n, 2, 50}]