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.

A206946 Primes of the form (m^p-1)/(m-1), where abs(m) > 1 and p is an odd prime.

This page as a plain text file.
%I A206946 #46 Apr 03 2023 10:36:13
%S A206946 3,7,11,13,31,43,61,73,127,157,211,241,307,421,463,521,547,601,683,
%T A206946 757,1093,1123,1483,1723,2551,2731,2801,2971,3307,3541,3907,4423,4831,
%U A206946 5113,5701,6007,6163,6481,8011,8191,9091,9901,10303,11131,12211,12433,13421
%N A206946 Primes of the form (m^p-1)/(m-1), where abs(m) > 1 and p is an odd prime.
%C A206946 Old name was: Very generalized repunit prime numbers.
%C A206946 These numbers are prime numbers that can be written in the form of (11...1) base m, with 3 or more ones and |m| > 1.
%C A206946 This sequence is the prime numbers picked from A206943.
%C A206946 Generalized repunit prime numbers are defined in the Caldwell link, as the form of (111...1) base m with numbers of ones >= (1/5)m.
%C A206946 This sequence includes all (111...1) base m primes with m < 1 and number of ones > 2.
%H A206946 T. D. Noe, <a href="/A206946/b206946.txt">Table of n, a(n) for n = 1..10000</a>
%H A206946 Chris Caldwell, <a href="https://t5k.org/top20/page.php?id=16">The Top Twenty: Generalized Repunit</a>
%e A206946 3 = (111) base -2, so a(1) = 3;
%e A206946 7 = (111) base 2, so a(2) = 7;
%e A206946 11 = (11111) base -2, so a(3) = 11.
%e A206946 31 = (2^5-1)/(2-1) = (5^3-1)/(5-1) = (6^3+1)/(6+1),
%e A206946 43 = (2^7+1)/(2+1) = (7^3+1)/(7+1) = (6^3-1)/(6-1),
%e A206946 8191 = (2^13-1)/(2-1) = (90^3-1)/(90-1) = (91^3+1)/(91+1).
%t A206946 phiinv[n_, pl_] := Module[{i, p, e, pe, val}, If[pl == {}, Return[If[n == 1, {1}, {}]]]; val = {}; p = Last[pl]; For[e = 0; pe = 1, e == 0 || Mod[n, (p - 1) pe/p] == 0, e++; pe *= p, val = Join[val, pe*phiinv[If[e == 0, n, n*p/pe/(p - 1)], Drop[pl, -1]]]]; Sort[val]]; phiinv[n_] := phiinv[n, Select[1 + Divisors[n], PrimeQ]]; maxdata = 13500; max = Ceiling[(1 + Sqrt[1 + 4*(maxdata - 1)])/4]*2; eb = 2*Floor[(Log[2, maxdata])/2 + 0.5]; While[eg = phiinv[eb]; lu = Length[eg]; lu == 0, eb = eb + 2]; t = Select[Range[eg[[Length[eg]]]], ((EulerPhi[#] <= eb) && (a = FactorInteger[#]; b = Length[a]; (((b == 1) && (a[[1]][[1]] > 2)) || ((b == 2) && (a[[1]][[1]] == 2))))) &]; ap = SortBy[t, Cyclotomic[#, 2] &]; a = {}; Do[i = 0; While[i++; cc = Cyclotomic[ap[[i]], m]; cc <= maxdata, If[PrimeQ[cc], a = Append[a, cc]]], {m, 2, max}]; Union[a]
%t A206946 nn = 120; ps = Prime[Range[2, PrimePi[Log[2, 2*nn^2 + 1]]]]; t = {}; Do[n = 0; If[Abs[m] > 1, n = (m^p - 1)/(m - 1); If[n > nn^2, n = 0]]; If[PrimeQ[n], AppendTo[t, n]], {p, ps}, {m, -nn, nn}]; t = Union[t] (* _T. D. Noe_, May 03 2013 *)
%Y A206946 Cf. A206943, A002275, A066180, A005117.
%K A206946 nonn
%O A206946 1,1
%A A206946 _Lei Zhou_, Feb 28 2012
%E A206946 Better name and new examples by _Thomas Ordowski_, Apr 28 2013