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.

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

Views

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