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.

A138255 Smallest positive integer m such that n divides [2^m/m] (=A000799(m)).

Original entry on oeis.org

1, 1, 5, 4, 6, 5, 9, 8, 7, 6, 12, 15, 14, 9, 13, 8, 10, 7, 21, 28, 13, 24, 48, 15, 22, 14, 19, 9, 30, 13, 11, 8, 31, 10, 13, 21, 38, 21, 14, 39, 22, 13, 29, 63, 13, 67, 135, 65, 43, 22, 10, 15, 35, 19, 24, 9, 21, 30, 120, 28, 62, 11, 13, 16, 14, 31, 69, 20, 67, 13, 145, 21, 19, 38
Offset: 1

Views

Author

Max Alekseyev, Mar 09 2008

Keywords

Comments

This sequence is well-defined.

Crossrefs

Programs

  • Maple
    f:= proc(n) local m;
         for m from 1 do if floor(2^m/m) mod n = 0 then return m fi od
    end proc:
    map(f, [$1..100]); # Robert Israel, Jun 07 2018
  • Mathematica
    a[n_] := For[m = 1, True, m++, If[Divisible[Floor[2^m/m], n], Return[m]]];
    Array[a, 100] (* Jean-François Alcover, Mar 22 2019 *)
  • Python
    from itertools import count
    def A138255(n): return next(m for m in count(1) if not (1<Chai Wah Wu, Aug 24 2023