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.

A317556 a(n) is the smallest composite k such that k divides 2^(k*n-1) - 1.

Original entry on oeis.org

341, 80519, 15, 511, 65, 42671, 15, 161, 445, 35551, 15, 2047, 85, 80129, 15, 1561, 33, 190679, 15, 983927, 85, 511, 15, 11303, 345, 2201, 15, 217, 65, 188393, 15, 39071, 129, 2047, 15, 8727391, 33, 63457, 15, 511, 65, 2417783, 15, 64759, 85, 2921, 15, 1898777, 133, 119063, 15, 2263, 65, 10097
Offset: 1

Views

Author

Altug Alkan, Sep 15 2018

Keywords

Comments

Inspired by A001567.
Based on definition of a(n), certain terms are easy to determine, i.e., a(4*t+3) = 15 and a(20*t+17) = 33 for all t >= 0.
Least k > 1 such that k divides 2^(k*n-1) - 1 (for n >= 1) are 3, 80519, 3, 7, 3, 31, 3, 127, 3, 7, 3, 23, 3, 8191, 3, 7, 3, 131071, 3, 524287, 3, 7, 3, 47, ...

Examples

			a(1) = A001567(1) = 341.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Block[{k = 9}, While[PrimeQ[k] || PowerMod[2, k*n - 1, k] != 1, k += 2]; k]; Array[a, 54] (* Giovanni Resta, Sep 16 2018 *)
  • PARI
    isok(k,n)=Mod(2, k)^(k*n-1)==1;
    a(n)={my(k=2); while (isprime(k)||!isok(k,n), k++); k; }