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

A194712 Numbers L such that cyclotomic polynomial Phi(L,m) < Phi(j,m) for any j > L and m >= 2.

Original entry on oeis.org

1, 2, 6, 10, 12, 14, 18, 20, 24, 30, 36, 42, 48, 60, 66, 72, 90, 96, 120, 126, 150, 210, 240, 270, 330, 390, 420, 462, 510, 546, 570, 630, 660, 690, 714, 780, 840, 870, 930, 990, 1050, 1110, 1140, 1170, 1260, 1320, 1470, 1530, 1560, 1680, 1710, 1890, 1950
Offset: 1

Views

Author

Lei Zhou, Feb 13 2012

Keywords

Examples

			For k such that A000010(k) = 1,
  Phi(1,m) = -1 + m,
  Phi(2,m) = 1 + m,
  Phi(1,m) < Phi(2,m),
so a(1) = 1, a(2) = 2.
For k > 2 such that A000010(k) = 2,
  Phi(3,m) = 1 + m + m^2,
  Phi(4,m) = 1 + m^2,
  Phi(6,m) = 1 - m + m^2.
Obviously when integer m > 1, Phi(6,m) < Phi(4,m) < Phi(3,m), so a(3)=6.
For k > 6 such that A000010(k) = 4,
  Phi(8,m) = 1 + m^4,
  Phi(10,m) = 1 - m + m^2 - m^3 + m^4,
  Phi(12,m) = 1 - m^2 + m^4.
Obviously when integer m > 1, Phi(10,m) < Phi(12,m) < Phi(8,m), so a(4) = 10, and a(5) = 12.
		

Crossrefs

Programs

  • Mathematica
    t = Select[Range[2400], EulerPhi[#] <= 480 &]; t2 = SortBy[t, Cyclotomic[#, 2] &]; DeleteDuplicates[Table[Max[Take[t2, n]], {n, Length[t2]}]]

A206942 Numbers of the form Phi_k(m) with k > 2 and |m| > 1.

Original entry on oeis.org

3, 5, 7, 10, 11, 13, 17, 21, 26, 31, 37, 43, 50, 57, 61, 65, 73, 82, 91, 101, 111, 121, 122, 127, 133, 145, 151, 157, 170, 183, 197, 205, 211, 226, 241, 257, 273, 290, 307, 325, 331, 341, 343, 362, 381, 401, 421, 442, 463, 485, 507, 521, 530, 547, 553
Offset: 1

Views

Author

Lei Zhou, Feb 13 2012

Keywords

Comments

Phi_k(m) denotes the k-th cyclotomic polynomial evaluated at m.
We can see that for any integer b, b = Phi_2(b-1). However, if we make k>2 and |m|>1, Phi(k,m) are always positive integers that do not traverse the positive integer set.
The Mathematica program can generate this sequence to arbitrary upper bound maxdata without user's chosen of parameters. The parameter determination part of this program is explained in A206864.

Examples

			a(1) = 3 = Phi_6(2) = Cyclotomic(6,2).
a(2) = 5 = Phi_4(2) = Cyclotomic(4,2).
...
a(15) = 61 = Phi_5(-3) = Cyclotomic(5,-3).
		

Crossrefs

Cf. A006511 for phiinv function in the Mathematica program.

Programs

  • Julia
    using Nemo
    function isA206942(n)
        if n < 3 return false end
        R, x = PolynomialRing(ZZ, "x")
        K = Int(floor(5.383*log(n)^1.161)) # Bounds from
        M = Int(floor(2*sqrt(n/3)))        # Fouvry & Levesque & Waldschmidt
        for k in 3:K
            c = cyclotomic(k, x)
            for m in 2:M
                n == subst(c, m) && return true
            end
        end
        return false
    end
    L = [n for n in 1:553 if isA206942(n)]; print(L) # Peter Luschny, Feb 21 2018
  • 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 = 560; 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 &]; 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]
    (* Alternatively: *)
    isA206942[n_] := If[n < 3, 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[555], isA206942] (* Peter Luschny, Feb 21 2018 *)

A206292 Numbers k such that cyclotomic polynomial Phi(k,-m) < Phi(j,-m) for any j > k and m >= 2.

Original entry on oeis.org

1, 2, 3, 4, 6, 12, 18, 30, 42, 48, 60, 66, 70, 78, 90, 102, 120, 126, 150, 180, 210, 240, 270, 300, 330, 420, 450, 462, 480, 510, 540, 630, 660, 690, 780, 840, 870, 924, 1050, 1092, 1140, 1260, 1320, 1470, 1560, 1680, 1890, 2310, 2730, 2940, 3150, 3570, 3990
Offset: 1

Views

Author

Lei Zhou, Feb 13 2012

Keywords

Examples

			For k such that A000010(k) = 1:
  Phi(1, -m) = -1 - m,
  Phi(2, -m) = 1 - m,
  Phi(1, -m) <  Phi(2, -m),
  so a(1) = 1, a(2) = 2.
For k > 2 such that A000010(k) = 2:
  Phi(3, -m) = 1 - m + m^2,
  Phi(4, -m) = 1 + m^2,
  Phi(6, -m) = 1 + m + m^2.
When integer m > 1, Phi(3, -m) < Phi(4, -m) < Phi(6, -m), so a(3) = 3, a(4) = 4, and a(5) = 6.
For k > 6 such that A000010(k) = 4:
  Phi(8, -m) = 1 + m^4,
  Phi(10, -m) = 1 + m + m^2 + m^3 + m^4,
  Phi(12, -m) = 1 - m^2 + m^4.
When integer m > 1, Phi(12, -m) < Phi(8, -m) < Phi(10, -m), so a(6) = 12.
		

Crossrefs

Programs

  • Mathematica
    t = Select[Range[4000], EulerPhi[#] <= 1000 &]; t =  SortBy[t, Cyclotomic[#, -2] &]; DeleteDuplicates[Table[Max[Take[t, n]], {n, 1, Length[t]}]]

A206710 This irregular table contains indices j, k, l,... in each row such that the values Phi(j,-m) < Phi(k,-m)< Phi(l,-m)< ... of cyclotomic polynomials Phi(.,.) are sorted given any constant integer argument m >= 2.

Original entry on oeis.org

1, 2, 3, 4, 6, 5, 12, 8, 10, 7, 9, 18, 14, 30, 20, 24, 16, 15, 11, 22, 42, 13, 28, 36, 21, 26, 17, 40, 48, 32, 60, 34, 19, 27, 54, 38, 66, 44, 25, 50, 33, 23, 46, 70, 78, 52, 90, 56, 72, 45, 84, 39, 35, 29, 58, 31, 62, 102, 68, 80, 96, 64, 120
Offset: 1

Views

Author

Lei Zhou, Feb 13 2012

Keywords

Comments

Based on A002202 "Values taken by totient function phi(m)", A000010 can only take certain even numbers. So for the worst case, the largest Phi(k,m) with degree d (even positive integer) will be (1-k^(d+1))/(1-k) (or smaller)and the smallest Phi(k,m) with degree d+2 will be (1+k^(d+3))/(1+k) (or larger).
(1+k^(d+3))/(1+k)-(1-k^(d+1))/(1-k)=(k/(k^2-1))*(2+k^d*(k^3-(k^2+k+1)))
k^3>k^2+k+1 when k>=2.
This means that this sequence can be segmented to sets in which Cyclotomic(k,m) shares the same degree of Polynomial and it can be generated in this way.

Examples

			For those k's that make A000010(k) = 1
Phi(1,-m) = -1-m
Phi(2,-m) = 1-m
Phi(1,-m) < Phi(2,-m)
So, a(1) = 1, a(2) = 2;
For those k's (k > 2) that make A000010(k) = 2
Phi(3,-m) = 1 - m + m^2
Phi(4,-m) = 1 + m^2
Phi(6,-m) = 1 + m + m^2
Obviously when integer m > 1, Phi(3,m) < Phi(4,m) < Phi(6,m)
So a(3)=3, a(4)=4, and a(5)=6
For those k's that make A000010(k) = 4
  Phi(5,-m) = 1 - m + m^2 - m^3 + m^4
  Phi(8,-m) = 1 + m^4
Phi(10,-m) = 1 + m + m^2 + m^3 + m^4
Phi(12,-m) = 1 - m^2 + m^4
Obviously when integer m > 1, Phi(5,m) < Phi(12,m) < Phi(8,m) < Phi(10,m),
So a(6) = 5, a(7) = 12, a(8) = 8, and a(9) = 10.
The table starts
1,2;
3,4,6;
5,12,8,10;
		

Crossrefs

Programs

  • Mathematica
    t = Select[Range[400], EulerPhi[#] <= 40 &]; SortBy[t, Cyclotomic[#, -2] &]

A208507 Reordering of A070776 such that the cyclotomic polynomial Phi(A070776, m) is in sorted order for any integer m >= 2.

Original entry on oeis.org

1, 2, 6, 4, 3, 10, 12, 8, 5, 14, 18, 9, 7, 20, 24, 16, 22, 11, 26, 28, 36, 13, 34, 40, 48, 32, 17, 38, 54, 27, 19, 44, 50, 25, 46, 23, 52, 56, 72, 58, 29, 62, 31, 68, 80, 96, 64, 74, 76, 108, 37, 82, 88, 100, 41, 86, 98, 49, 43, 92, 94, 47, 104, 112, 144
Offset: 1

Views

Author

Lei Zhou, Feb 27 2012

Keywords

Comments

When p is an odd prime number and i >= 1, j >= 1, the cyclotomic polynomial
Phi(2^i*p^j, k)
= Phi(2p,k^(2^(i-1)*p^(j-1)))
= Phi(p, -(k^(2^(i-1)*p^(j-1))))
= (111.....1) (p ones) base -(k^(2^(i-1)*p^(j-1)))
Phi(p^j, k)
= Phi(p, k^(p^(j-1)))
= (111.....1) (p ones) base k^(p^(j-1)).
For odd prime p >= 3, the above numbers can be called "Very Generic Repdigit Numbers".
This sequence is a subsequence of A206225.
The Mathematica program is rewritten to be able to generate this sequence to an arbitrary EulerPhi boundary.

Examples

			The first 20 elements of A206225 are 1, 2, 6, 4, 3, 10, 12, 8, 5, 14, 18, 9, 7, 15, 20, 24, 16, 30, 22, 11.
Among these, 15 = 3 * 5 and 30 = 2 * 3 * 5 cannot be written in the form 2^i*p^j and are thus rejected. So the first 18 terms of this sequence are 1, 2, 6, 4, 3, 10, 12, 8, 5, 14, 18, 9, 7, 20, 24, 16, 22, 11.
		

Crossrefs

Programs

  • Mathematica
    eb = 48; 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]]; elim =  Max[Table[Max[phiinv[n]], {n, 2, eb, 2}]]; t = Select[Range[elim], (a = FactorInteger[#]; b = Length[a]; ((b == 1) || ((b == 2) && (a[[1]][[1]] == 2))) && (EulerPhi[#] <= eb)) &]; SortBy[t, Cyclotomic[#, 2] &]

A252502 Number of digits of Phi_n(10), or number of digits in base b of Phi_n(b), where Phi is the cyclotomic polynomial.

Original entry on oeis.org

1, 2, 3, 3, 5, 2, 7, 5, 7, 4, 11, 4, 13, 6, 8, 9, 17, 6, 19, 8, 12, 10, 23, 8, 21, 12, 19, 12, 29, 9, 31, 17, 20, 16, 24, 12, 37, 18, 24, 16, 41, 13, 43, 20, 24, 22, 47, 16, 43, 20, 32, 24, 53, 18, 40, 24, 36, 28, 59, 17, 61, 30, 36, 33, 48, 21, 67, 32, 44, 25, 71, 24
Offset: 1

Views

Author

Eric Chen, Dec 17 2014

Keywords

Comments

a(n) = phi(n) if and only if the number of distinct prime factors of n (A001221(n)) is even, a(n) = phi(n) + 1 if and only if the number of distinct prime factors of n (A001221(n)) is odd, where phi is Euler's totient function.

Examples

			Values of phi_n(b) written in base b are #, 11, 111, 101, 11111, #1, 1111111, 10001, 1001001, #0#1, 11111111111, ##01, ..., where # represents b - 1.
		

Crossrefs

Programs

  • Mathematica
    a252502[n_] := Array[Total@DigitCount[Cyclotomic[#, 10]] &, n]; a252502[72] (* Michael De Vlieger, Dec 21 2014 *)

A208547 Phi(k,m) with squarefree k values in sorted order for any integer m > 1.

Original entry on oeis.org

1, 2, 6, 3, 10, 5, 14, 7, 15, 30, 22, 11, 21, 26, 42, 13, 34, 17, 38, 19, 33, 66, 46, 23, 35, 39, 78, 70, 58, 29, 62, 31, 51, 102, 57, 74, 114, 37, 55, 82, 110, 41, 86, 43, 69, 138, 94, 47, 65, 210, 130, 105, 106, 53, 87, 174, 118, 59, 77, 93, 122, 186, 154
Offset: 1

Views

Author

Lei Zhou, Feb 28 2012

Keywords

Comments

Phi(k,m) denotes cyclotomic polynomial numbers Cyclotomic(k, m).
When k = Product(p_i^j_i), i = 1, 2,..., and p_i are prime factors of k, then Phi(k, m) = Phi(Product(p_i), m^(Product(p_i^(j_i-1)))).
For this reason, number space of Phi(k, m) is still traversed with Phi(k, m) terms with only squarefree k values.
This sequence sorts the Phi(k, m) value along k-axis for all squarefree k values.

Examples

			For those squarefree numbers that make A000010(k) = 1
Phi(1,m) = -1 + m
Phi(2,m) = 1 + m
Phi(1,m) < Phi(2,m)
So, a(1)=1, a(2)=2;
For those squarefree numbers that make A000010(k) = 2
Phi(3,m) = 1 + m + m^2
Phi(6,m) = 1 - m + m^2
Obviously when integer m > 1, Phi(6,m) < Phi(3,m)
So a(3)=6, a(4)=3 (noting that Phi(6,m) > Phi(2,m) when m > 2, and Phi(6,2) = Phi(2,2))
For those squarefree numbers that make A000010(k) = 4
Phi(5,m) = 1 + m + m^2 + m^3 + m^4
Phi(10,m) = 1 - m + m^2 - m^3 + m^4
Obviously when integer m > 1, Phi(10,m) < Phi(5,m),
So a(5) = 10, and a(6) = 5 (noting Phi(10,m) - Phi(3,m) = m((m^2 + m + 2)(m - 2) + 2) >= 4 > 0 when m >= 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]]; eb = 60; t =  Select[Range[Max[Table[phiinv[n], {n, 1, eb}]]], ((EulerPhi[#] <= eb) && SquareFreeQ[#]) &]; SortBy[t, Cyclotomic[#, 2]&]
Showing 1-7 of 7 results.