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

A040017 Prime 3 followed by unique period primes (the period r of 1/p is not shared with any other prime) of the form A019328(r)/gcd(A019328(r),r) in order (periods r are given in A051627).

Original entry on oeis.org

3, 11, 37, 101, 9091, 9901, 333667, 909091, 99990001, 999999000001, 9999999900000001, 909090909090909091, 1111111111111111111, 11111111111111111111111, 900900900900990990990991, 909090909090909090909090909091
Offset: 1

Views

Author

Keywords

Comments

Prime p=3 is the only known example of a unique period prime such that A019328(r)/gcd(A019328(r),r) = p^k with k > 1 (cf. A323748). It is plausible to assume that no other such prime exists. Under this (unproved) assumption, the current sequence lists all unique period primes in order and represents a sorted version of A007615. - Max Alekseyev, Oct 14 2022

Examples

			The decimal expansion of 1/101 is 0.00990099..., having a period of 4 and it is the only prime with that period.
		

References

  • J.-P. Delahaye, Merveilleux nombres premiers ("Amazing primes"), p. 324, Pour la Science Paris 2000.

Crossrefs

Programs

  • Mathematica
    lst = {}; Do[c = Cyclotomic[n, 10]; q = c/GCD[c, n]; If[PrimeQ[q], AppendTo[lst, q]], {n, 62}]; Prepend[Sort[lst], 3] (* Arkadiusz Wesolowski, May 13 2012 *)

Formula

For n >= 2, a(n) = A019328(r) / gcd(A019328(r), r), where r = A051627(n). - Max Alekseyev, Oct 14 2022

Extensions

Missing term a(45) inserted in b-file at the suggestion of Eric Chen by Max Alekseyev, Oct 13 2022
Edited by Max Alekseyev, Oct 14 2022

A261524 Odd numbers n such that degree(gcd( 1 + x^n, 1 + (1+x)^n )) > 1, where the polynomials are over GF(2).

Original entry on oeis.org

3, 7, 9, 15, 21, 27, 31, 33, 35, 39, 45, 49, 51, 57, 63, 69, 73, 75, 77, 81, 85, 87, 91, 93, 99, 105, 111, 117, 119, 123, 127, 129, 133, 135, 141, 147, 153, 155, 159, 161, 165, 171, 175, 177, 183, 189, 195, 201, 203, 207, 213, 217, 219, 225, 231, 237, 243, 245, 249, 255, 259, 261, 267, 273, 279, 285, 287, 291, 297, 301
Offset: 1

Views

Author

Joerg Arndt, Aug 23 2015

Keywords

Comments

From the Golomb/Lee reference: "Theorem 7 (Welch’s Criterion): For any odd integer t, the irreducible polynomials of primitivity t divide trinomials iff gcd( 1 + x^n, 1 + (1+x)^n ) has degree greater than 1."
All Mersenne numbers (A000225) >= 3 are terms, as all primitive polynomials (over GF(2)) divide some trinomial.
All numbers of the form (2j-1)*(2^k-1); j>=1, k>=2 (A261871), are in the sequence. - Bob Selcoe, Sep 03 2015
From Robert Israel, Sep 03 2015: (Start)
If n is in the sequence, then so is every odd multiple of n, because 1+x^n divides 1+x^(k*n) and 1+(1+x)^n divides 1+(1+x)^(k*n).
The first few members of the sequence that are not multiples of other members are 3, 7, 31, 73, 85, 127, 2047, 3133, 4369, 8191, 11275 (see A261862). (End)
From Jianing Song, Oct 13 2023: (Start)
Also odd numbers n such that degree(gcd( 1 + x^n, 1 + (1+x)^n )) > 0. This is because degree(gcd( 1 + x^n, 1 + (1+x)^n )) cannot be 1 since gcd( 1 + x^n, 1 + (1+x)^n ) is divisible by neither x nor x+1.
In general, let p be a prime, gcd(m,p) = 1, q > 1 be a power of p that is congruent to 1 modulo m. In the finite field F_q, the roots to x^m-1 are the nonzero ((q-1)/m)-th powers, so gcd(x^m-1, (x+1)^m-1) != 1 if and only if there are two nonzero ((q-1)/m)-th powers in F_q that differ by 1. If we homogenize, this is equivalent to x^((q-1)/m) + y^((q-1)/m) = z^((q-1)/m) having solutions in (F_q)* (dehomogenize by setting y = 1).
Let p be a prime, gcd(m,p) = 1. Suppose that q > 1 is the smallest power of p that is congruent to 1 modulo m, then gcd(x^m-1, (x+1)^m-1) != 1 in F_p[x] if m > q^(3/4): set k = (q-1)/m and A_1, A_2 both be the set of nonzero ((q-1)/m)-th powers in F_q (so |A_1| = |A_2| = m). Let N be the number of solutions to x^((q-1)/m) + y^((q-1)/m) = z^((q-1)/m) has solutions in (F_q)*, then by Theorem 7.1 of the László Babai link, we have N > m^2*(q-1)/q - (q-1)*sqrt(q) >= 0.
In particular, let p and r be distinct primes, r >= 5, t >= 1. Let Zs(d,p,1) is the d-th Zsigmondy number with parameters (p,1), then gcd(x^(Zs(r^t,p,1))-1, (x+1)^(Zs(r^t,p,1))-1) != 1 in F_p[x]. This is because for d != 2, Zs(d,p,1) = Phi_d(p)/r if d is of the form r^{t'}*ord(p,r) and Phi_d(p) otherwise (see A323748), where ord(a,k) is the multiplicative order of a modulo k, Phi_d(x) is the d-th cyclotomic polynomial. Here d = r^t, so Zs(d,p,1) = Phi_d(p)/r if p == 1 (mod r), Phi_d(p) otherwise. Note that Phi_{r^t}(p) = 1 + p^(r^(t-1)) + p^(2*r^(t-1)) + ... + p^((r-1)*r^(t-1)) > q^(3/4) = p^(3/4*r^t) since r >= 5. It is easy to show that Zs(p^r,p,1) <= q^(3/4) can only happen with r = 5, p == 1 (mod 5) and p <= 601, then we can check that gcd(x^(Zs(r^t,p,1))-1, (x+1)^(Zs(r^t,p,1))-1) = gcd(x^((p^4+p^3+p^2+p+1)/5)-1, (x+1)^((p^4+p^3+p^2+p+1)/5)-1) != 1 in F_p[x] in this case.
For another example, m = (2^(2^t)+1)*(2^(2^(t+1))+1) is a term of this sequence for all t >= 0, since in the case we have q = 2^(2^(t+2)), so m = q^(3/4) + 2^(2^(t+1)) + 2^(2^t) > q^(3/4).
Conjecture 1: Zs(d,2,1) is a term if and only if d is odd and d != 1, 15, 21. Verified for odd numbers up to 91.
Conjecture 2: for a prime p >= 3, gcd(x^(Zs(d,p,1))-1, (x+1)^(Zs(d,p,1))-1) != 1 if and only if d is an odd prime power > 1 other than (d,p) = (7,3), (7,9), (13,3), (37,3), (43,3), (79,3).
Note that the comment above shows that both conjectures are true for powers > 1 of a prime r >= 5. (End)

Crossrefs

Note that A191131, A261524, A261871, and A282572 are very similar and easily confused with each other.

Programs

  • Maple
    filter:= proc(n) degree(Gcd(1+x^n, 1+(1+x)^n) mod 2)>1 end proc:
    select(filter, [2*i+1 $ i=1..200]); # Robert Israel, Sep 03 2015
  • Mathematica
    okQ[n_] := Exponent[PolynomialGCD[1+x^n, 1+(1+x)^n, Modulus -> 2], x] > 1;
    Select[Range[1, 301, 2], okQ] (* Jean-François Alcover, Apr 02 2019 *)
  • PARI
    W(n)=my(e=Mod(1,2)); poldegree(gcd(e*(1+x^n), e*(1+(1+x)^n))) > 1;
    forstep(n=1,301,2, if( W(n) , print1(n,", ") ) );
    
  • PARI
    isA261524(n,p=2) = my(d=znorder(Mod(p,n)), c=ffgen(p^d,'c), g=ffprimroot(c)); forstep(e=0, p^d-2, (p^d-1)/n, if((g^e+1)^n==1, return(1))); return(0) \\ Jianing Song, Oct 14 2023, based on the equivalence of gcd(x^m-1, (x+1)^m-1) != 1 and two ((q-1)/m)-th powers in F_q differing by 1 (see Comments)
  • Sage
    x = polygen(GF(2), 'x')
    [n for n in range(1, 10^3, 2) if gcd( 1+x^n, 1+(1+x)^n ).degree() > 1]
    # Joerg Arndt, Sep 08 2015
    

A342255 Square array read by ascending antidiagonals: T(n,k) = gcd(k, Phi_k(n)), where Phi_k is the k-th cyclotomic polynomial, n >= 1, k >= 1.

Original entry on oeis.org

1, 1, 2, 1, 1, 3, 1, 2, 1, 2, 1, 1, 1, 1, 5, 1, 2, 3, 2, 1, 1, 1, 1, 1, 1, 1, 3, 7, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 3, 1, 1, 1, 1, 1, 3, 1, 2, 1, 2, 5, 3, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 1, 2, 3, 2, 1, 1, 1, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 5, 1, 1, 13
Offset: 1

Views

Author

Jianing Song, Mar 07 2021

Keywords

Comments

T(n,k) is either 1 or a prime.
Since p is a prime factor of Phi_k(n) => either p == 1 (mod k) or p is the largest prime factor of k. As a result, T(n,k) = 1 if and only if all prime factors of Phi_k(n) are congruent to 1 modulo k.

Examples

			Table begins
  n\k |  1  2  3  4  5  6  7  8  9 10 11 12
  ------------------------------------------
    1 |  1  2  3  2  5  1  7  2  3  1 11  1
    2 |  1  1  1  1  1  3  1  1  1  1  1  1
    3 |  1  2  1  2  1  1  1  2  1  1  1  1
    4 |  1  1  3  1  1  1  1  1  3  5  1  1
    5 |  1  2  1  2  1  3  1  2  1  1  1  1
    6 |  1  1  1  1  5  1  1  1  1  1  1  1
    7 |  1  2  3  2  1  1  1  2  3  1  1  1
    8 |  1  1  1  1  1  3  7  1  1  1  1  1
    9 |  1  2  1  2  1  1  1  2  1  5  1  1
   10 |  1  1  3  1  1  1  1  1  3  1  1  1
   11 |  1  2  1  2  5  3  1  2  1  1  1  1
   12 |  1  1  1  1  1  1  1  1  1  1 11  1
		

Crossrefs

Cf. A253240, A323748, A014963 (row 1), A253235 (indices of columns with only 1), A342256 (indices of columns with some elements > 1), A342257 (period of each column, also maximum value of each column), A013595 (coefficients of cyclotomic polynomials).
A342323 is the same table with offset 0.

Programs

  • Mathematica
    A342255[n_, k_] := GCD[k, Cyclotomic[k, n]];
    Table[A342255[n-k+1,k], {n, 15}, {k, n}] (* Paolo Xausa, Feb 09 2024 *)
  • PARI
    T(n,k) = gcd(k, polcyclo(k,n))

Formula

For k > 1, let p be the largest prime factor of k, then T(n,k) = p if p does not divide n and k = p^e*ord(p,n) for some e > 0, where ord(p,n) is the multiplicative order of n modulo p. See my link above for the proof.
T(n,k) = T(n,k*p^a) for all a, where p is the largest prime factor of k.
T(n,k) = Phi_k(n)/A323748(n,k) for n >= 2, k != 2.
For prime p, T(n,p^e) = p if n == 1 (mod p), 1 otherwise.
For odd prime p, T(n,2*p^e) = p if n == -1 (mod p), 1 otherwise.
Showing 1-3 of 3 results.