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.
%I A206943 #52 May 09 2021 12:48:57 %S A206943 3,7,11,13,21,31,43,57,61,73,91,111,121,127,133,157,183,205,211,241, %T A206943 273,307,341,343,381,421,463,507,521,547,553,601,651,683,703,757,781, %U A206943 813,871,931,993,1057,1093,1111,1123,1191,1261,1333,1407,1483,1555,1561 %N A206943 Generalized repeat unit one numbers: all numbers of the form (m^p-1)/(m-1), where abs(m) > 1 and p is odd prime. %C A206943 Here we define "generalized repeat unit one numbers" as numbers that can be represented in the form 11...1_m where the number of ones is k > 2 and |m| > 1. %C A206943 Normal repeat unit one numbers (a.k.a. "repunits") are numbers in the form 11...1_10 with 2 or more ones. %C A206943 Trivially, any number n = 11_(n-1). %C A206943 These numbers take the form of cyclotomic polynomial number Phi(k,m) with k in the form 2^i*p^j, where p is prime and i >= 0, j >= 1. It has p digits of one base -m^(2^(i-1)*p^(j-1)) when i > 0 or base m^(p^(j-1)) when i = 0. %C A206943 This sequence is a subsequence of A206942. %e A206943 111_(-2) = 3, so 3 is a term; %e A206943 111_2 = 7, so 7 is a term; %e A206943 11111_(-2) = 11, so 11 is a term. %e A206943 3 = (2^3 + 1)/(2 + 1); %e A206943 7 = (2^3 - 1)/(2 - 1) = (3^3 + 1)/(3 + 1); %e A206943 11 = (2^5 + 1)/(2 + 1). %t A206943 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 = 1600; 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] &]; an = SortBy[t, Cyclotomic[#, -2] &]; a = {}; Do[i = 0; While[i++; cc = Cyclotomic[ap[[i]], m]; cc <= maxdata, a = Append[a, cc]]; i = 0; While[i++; cc = Cyclotomic[an[[i]], -m]; cc <= maxdata, a = Append[a, cc]], {m, 2, max}]; Union[a] %t A206943 nn = 40; ps = Prime[Range[2, PrimePi[Log[2, 2*nn^2 + 1]]]]; t = {}; Do[If[Abs[m] > 1, n = (m^p - 1)/(m - 1); If[n < nn^2, AppendTo[t, n]]], {p, ps}, {m, -nn, nn}]; t = Union[t] (* _T. D. Noe_, May 03 2013 *) %Y A206943 Cf. A206942, A208507. %K A206943 nonn,base,easy %O A206943 1,1 %A A206943 _Lei Zhou_, Feb 28 2012 %E A206943 Name improved and new example added by _Thomas Ordowski_, May 03 2013