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.

A124977 Least positive number k such that 2^k mod k = 2n+1, or 0 if no such k exists.

Original entry on oeis.org

0, 4700063497, 19147, 25, 2228071, 262279, 95, 481, 45, 2873, 3175999, 555, 95921, 174934013, 777, 140039, 2463240427, 477, 91, 623, 2453, 55, 345119, 1131, 943, 21967, 135, 46979, 125, 3811, 23329, 155, 1064959, 245
Offset: 0

Views

Author

Zak Seidov, Nov 14 2006

Keywords

Examples

			a(3) = 25 because 2^25 = 33554432 = 7 + 25*1342177.
		

Crossrefs

Programs

  • Mathematica
    nk[n_] := Module[ {k}, k = 1;
      While[PowerMod[2, k, k] != 2 n + 1, k++]; k]
    Join[{0}, Table[nk[i], {i, 1, 33}]]  (* Robert Price, Oct 11 2018 *)

Formula

A bisection of A036236: a(n) = A036236(2n+1).

Extensions

Edited by Max Alekseyev, May 20 2011