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.

A231370 Squarefree composite numbers k such that 2 is a primitive root for all prime factors of k.

Original entry on oeis.org

15, 33, 39, 55, 57, 65, 87, 95, 111, 143, 145, 159, 165, 177, 183, 185, 195, 201, 209, 247, 249, 265, 285, 295, 303, 305, 319, 321, 335, 377, 393, 407, 415, 417, 429, 435, 447, 481, 489, 505, 519, 535, 537, 543, 551, 555, 583, 591, 627, 633, 649, 655, 671, 681
Offset: 1

Views

Author

Arkadiusz Wesolowski, Nov 08 2013

Keywords

Comments

If k is the smallest integer satisfying 10^k == 1 (mod p), we say that 10 has order k (mod p). If n is the product of distinct primes p_i, the period of 1/n in base b is the least common multiple of the orders of b (mod p_i), provided b and n are relatively prime.

Crossrefs

Subsequence of A024556.

Programs

  • Mathematica
    q[n_] := CompositeQ[n] && SquareFreeQ[n] && AllTrue[FactorInteger[n][[;;,1]],  MultiplicativeOrder[2, #] == # - 1 &]; Select[Range[700], q] (* Amiram Eldar, Oct 03 2021 *)
  • PARI
    isok(k) = if ((k>1) && (k%2) && !isprime(k) && issquarefree(k), my(f=factor(k)[,1]~); for (j=1, #f, if (znorder(Mod(2, f[j])) != (f[j]-1), return(0))); return (1)); return (0); \\ Michel Marcus, Oct 03 2021