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-5 of 5 results.

A206864 Prime numbers of the form Phi_k(m), where k > 2, |m| > 1, and Phi_k(m) is the k-th cyclotomic polynomial evaluated at m.

Original entry on oeis.org

3, 5, 7, 11, 13, 17, 31, 37, 43, 61, 73, 101, 127, 151, 157, 197, 211, 241, 257, 307, 331, 401, 421, 463, 521, 547, 577, 601, 677, 683, 757, 1093, 1123, 1297, 1483, 1601, 1723, 2551, 2731, 2801, 2917, 2971, 3137, 3307, 3541, 3907, 4357, 4423, 4561, 4831, 5113
Offset: 1

Views

Author

Lei Zhou, Feb 13 2012

Keywords

Comments

These are the prime numbers picked from sequence A206942.
Choosing negative m does not generate more primes, so it does not need negative m part in the Mathematica program.
The provided mathematica program generate this sequence in six steps:
Step 1: Find the minimum m such that Phi(6, m) is greater than the search boundary maxdata, and adjust the search boundary to the next: ( maxdata = 5200; max = Ceiling[(1 + Sqrt[1 + 4*(maxdata - 1)])/2]; )
Step 2: Find the even number eulerbound such that 2^(eulerbound+1)-1 > maxdata: ( eulerbound = 2*Floor[(Log[2, maxdata])/2 + 0.5]; )
This is the maximum possible value of Phi(k, 2) when Phi(k, m) has a totient function value of eulerbound;
Step 3: Adjust (up) the eulerbound such that it is an element of A002202 and find the group of ks such that Phi(k, m) has the same totient function value eulerbound: ( 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]]; While[eulergroup = phiinv[eulerbound]; lu = Length[eulergroup]; lu == 0, eulerbound = eulerbound + 2]; )
Step 4: Make list of k values such that the totient function of Phi(k, m) smaller or equal to the chosen Euler boundary eulerbound, and sort it in the order of the Phi(k, 2): ( Select[Range[eulergroup[[Length[eulergroup]]]], EulerPhi[#] <= eulerbound &]; ap = SortBy[t, Cyclotomic[#, 2] &])
Step 5: Scan k in the set of ap, 1 < m <= max, for all appeared primes that are smaller than maxdata: (a = {}; Do[i = 2; While[i++; cc = Cyclotomic[ap[[i]], m]; cc <= maxdata, If[PrimeQ[cc], a = Append[a, cc]]], {m, 2, max}];)
Step 6: Remove duplicate and sort the set generated in the above step: ( Sort[DeleteDuplicates[a]] )
Through these steps, a mathematically abundant algorithm is presented to find all the terms up to an arbitrary bound, without requiring the user to determine any other search parameters.

Examples

			Prime 3 = Phi_6(2); so a(1) = 3;
Prime 5 = Phi_4(2), so a(2) = 5;
...
Prime 17 = Phi_8(2), so a(6)=17;
Primes 19 and 23 are not in A206942;
Prime 31 = Phi_5(2), so a(7)=31.
		

Crossrefs

Programs

  • Julia
    # Function isA206942 is defined in A206942.
    L = [n for n in 1:5113 if isprime(ZZ(n)) && isA206942(n)]
    println(L) # Peter Luschny, Feb 21 2018
  • Mathematica
    maxdata = 5200; max = Ceiling[(1 + Sqrt[1 + 4*(maxdata - 1)])/2]; eulerbound = 2*Floor[(Log[2, maxdata])/2 + 0.5]; 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]]; While[eulergroup = phiinv[eulerbound]; lu = Length[eulergroup]; lu == 0, eulerbound = eulerbound + 2]; t = Select[Range[eulergroup[[Length[eulergroup]]]], EulerPhi[#] <= eulerbound &]; ap = SortBy[t, Cyclotomic[#, 2] &]; a = {}; Do[i = 2; While[i++; cc = Cyclotomic[ap[[i]], m]; cc <= maxdata, If[PrimeQ[cc], a = Append[a, cc]]], {m, 2, max}]; Sort[DeleteDuplicates[a]]
    (* Alternatively: *)
    isA206864[n_] := If[! PrimeQ[n], Return[False],
        K = Floor[5.383 Log[n]^1.161]; M = Floor[2 Sqrt[n/3]];
        For[k = 3, k <= K, k++, For[x = 2, x <= M, x++,
            If[n == Cyclotomic[k, x], Return[True]]]];
        Return[False]
    ]; Select[Range[1000], isA206864] (* Peter Luschny, Feb 21 2018 *)

A253240 Square array read by antidiagonals: T(m, n) = Phi_m(n), the m-th cyclotomic polynomial at x=n.

Original entry on oeis.org

1, 1, -1, 1, 0, 1, 1, 1, 2, 1, 1, 2, 3, 3, 1, 1, 3, 4, 7, 2, 1, 1, 4, 5, 13, 5, 5, 1, 1, 5, 6, 21, 10, 31, 1, 1, 1, 6, 7, 31, 17, 121, 3, 7, 1, 1, 7, 8, 43, 26, 341, 7, 127, 2, 1, 1, 8, 9, 57, 37, 781, 13, 1093, 17, 3, 1, 1, 9, 10, 73, 50, 1555, 21, 5461, 82, 73, 1, 1, 1, 10, 11, 91, 65, 2801, 31, 19531, 257, 757, 11, 11, 1, 1, 11, 12, 111, 82, 4681, 43, 55987, 626, 4161, 61, 2047, 1, 1
Offset: 0

Views

Author

Eric Chen, Apr 22 2015

Keywords

Comments

Outside of rows 0, 1, 2 and columns 0, 1, only terms of A206942 occur.
Conjecture: There are infinitely many primes in every row (except row 0) and every column (except column 0), the indices of the first prime in n-th row and n-th column are listed in A117544 and A117545. (See A206864 for all the primes apart from row 0, 1, 2 and column 0, 1.)
Another conjecture: Except row 0, 1, 2 and column 0, 1, the only perfect powers in this table are 121 (=Phi_5(3)) and 343 (=Phi_3(18)=Phi_6(19)).

Examples

			Read by antidiagonals:
m\n  0   1   2   3   4   5   6   7   8   9  10  11  12
------------------------------------------------------
0    1   1   1   1   1   1   1   1   1   1   1   1   1
1   -1   0   1   2   3   4   5   6   7   8   9  10  11
2    1   2   3   4   5   6   7   8   9  10  11  12  13
3    1   3   7  13  21  31  43  57  73  91 111 133 157
4    1   2   5  10  17  26  37  50  65  82 101 122 145
5    1   5  31 121 341 781 ... ... ... ... ... ... ...
6    1   1   3   7  13  21  31  43  57  73  91 111 133
etc.
The cyclotomic polynomials are:
n        n-th cyclotomic polynomial
0        1
1        x-1
2        x+1
3        x^2+x+1
4        x^2+1
5        x^4+x^3+x^2+x+1
6        x^2-x+1
...
		

Crossrefs

Main diagonal is A070518.
Indices of primes in n-th column for n = 1-10 are A246655, A072226, A138933, A138934, A138935, A138936, A138937, A138938, A138939, A138940.
Indices of primes in main diagonal is A070519.
Cf. A117544 (indices of first prime in n-th row), A085398 (indices of first prime in n-th row apart from column 1), A117545 (indices of first prime in n-th column).
Cf. A206942 (all terms (sorted) for rows>2 and columns>1).
Cf. A206864 (all primes (sorted) for rows>2 and columns>1).

Programs

  • Mathematica
    Table[Cyclotomic[m, k-m], {k, 0, 49}, {m, 0, k}]
  • PARI
    t1(n)=n-binomial(floor(1/2+sqrt(2+2*n)), 2)
    t2(n)=binomial(floor(3/2+sqrt(2+2*n)), 2)-(n+1)
    T(m, n) = if(m==0, 1, polcyclo(m, n))
    a(n) = T(t1(n), t2(n))

Formula

T(m, n) = Phi_m(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.

Original entry on oeis.org

3, 7, 11, 13, 21, 31, 43, 57, 61, 73, 91, 111, 121, 127, 133, 157, 183, 205, 211, 241, 273, 307, 341, 343, 381, 421, 463, 507, 521, 547, 553, 601, 651, 683, 703, 757, 781, 813, 871, 931, 993, 1057, 1093, 1111, 1123, 1191, 1261, 1333, 1407, 1483, 1555, 1561
Offset: 1

Views

Author

Lei Zhou, Feb 28 2012

Keywords

Comments

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.
Normal repeat unit one numbers (a.k.a. "repunits") are numbers in the form 11...1_10 with 2 or more ones.
Trivially, any number n = 11_(n-1).
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.
This sequence is a subsequence of A206942.

Examples

			111_(-2) = 3, so 3 is a term;
111_2 = 7, so 7 is a term;
11111_(-2) = 11, so 11 is a term.
3 = (2^3 + 1)/(2 + 1);
7 = (2^3 - 1)/(2 - 1) = (3^3 + 1)/(3 + 1);
11 = (2^5 + 1)/(2 + 1).
		

Crossrefs

Programs

  • Mathematica
    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]
    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 *)

Extensions

Name improved and new example added by Thomas Ordowski, May 03 2013

A206944 Numbers Phi_k(m) with integer k > 2, |m| > 1 but k != 2^j (j > 1).

Original entry on oeis.org

3, 7, 11, 13, 21, 31, 43, 57, 61, 73, 91, 111, 121, 127, 133, 151, 157, 183, 205, 211, 241, 273, 307, 331, 341, 343, 381, 421, 463, 507, 521, 547, 553, 601, 651, 683, 703, 757, 781, 813, 871, 931, 993, 1057, 1093, 1111, 1123, 1191, 1261, 1333, 1407, 1483
Offset: 1

Views

Author

Lei Zhou, Feb 13 2012

Keywords

Comments

Phi_k(m) denotes the cyclotomic polynomial numbers Cyclotomic(k,m).
There is a property for Cyclotomic(k,m):
Cyclotomic(k^(j+1),m) = Cyclotomic(k,m^(k^j)).
So actually when k=2^(j+1), j is a positive integer,
Cyclotomic(k,m) = Cyclotomic(2,m^(2^j)) = 1+m^(2^j).
If these cases are excluded from A206942, this sequence is obtained.
This sequence is a subsequence of A206942.
Sequence A059054 is a subsequence of this sequence.
The Mathematica program can generate this sequence to arbitrary boundary maxdata without a user's choice of parameters. The parameter determination part of this program is explained at A206864.

Examples

			a(1) = 3 = Phi(6,2).
5 = Phi(4,2) = Phi(2,4) so excluded.
a(2) = 7 = Phi(3,2).
		

Crossrefs

Programs

  • Mathematica
    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 = 1500; 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) && ((! IntegerQ[Log[2, #]]) || (# <= 2))) &]; ap = SortBy[t, Cyclotomic[#, 2] &]; an = SortBy[t, Cyclotomic[#, -2] &]; a = {}; Do[i = 2; While[i++; cc = Cyclotomic[ap[[i]], m]; cc <= maxdata,
      a = Append[a, cc]]; i = 2; While[i++; cc = Cyclotomic[an[[i]], -m]; cc <= maxdata, a = Append[a, cc]], {m, 2, max}]; Union[a]

A206945 Prime numbers Phi(k,m) with integer k > 2, |m| > 1, and k != 2^j (j > 1).

Original entry on oeis.org

3, 7, 11, 13, 31, 43, 61, 73, 127, 151, 157, 211, 241, 307, 331, 421, 463, 521, 547, 601, 683, 757, 1093, 1123, 1483, 1723, 2551, 2731, 2801, 2971, 3307, 3541, 3907, 4423, 4561, 4831, 5113, 5419, 5701, 6007, 6163, 6481, 8011, 8191, 9091, 9901, 10303, 11131
Offset: 1

Views

Author

Lei Zhou, Feb 13 2012

Keywords

Comments

Phi(k,m) denotes the cyclotomic polynomial numbers Cyclotomic(k,m).
These are the prime terms of A206944.
A059055 is a subsequence of this sequence.
The Mathematica program can generate this sequence to arbitrary boundary maxdata without a user's choice of parameters. The parameter determination part of this program is explained at A206864.

Examples

			Just taking prime terms from A206944:
A206944(1)=3 is prime, so a(1)=3 ...
		

Crossrefs

Programs

  • Mathematica
    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 = 12000; 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) && ((! IntegerQ[Log[2, #]]) || (# <= 2))) &]; t = SortBy[t, Cyclotomic[#, 2] &]; a = {}; Do[i = 2; While[i++; cc = Cyclotomic[t[[i]], m]; cc <= maxdata, If[PrimeQ[cc], a = Append[a, cc]]], {m, 2, max}]; Union[a]
Showing 1-5 of 5 results.