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.

A189202 Let s_k(n) denote the sum of digits of n in base k. Then a(n) is the smallest m>0 such that both s_2(m*(n-1)) and s_n(2*m*(n-1))/(n-1) are even, or a(n)=0, if such m does not exist.

Original entry on oeis.org

3, 5, 5, 3, 13, 4, 9, 5, 11, 6, 19, 20, 15, 47, 17, 9, 19, 10, 21, 32, 23, 12, 37, 13, 40, 41, 29, 15, 46, 16, 33, 17, 35, 18, 37, 56, 39, 20, 41, 21, 85, 22, 45, 68, 47, 72, 73, 25, 51, 26, 79, 80, 109, 28, 57, 87, 59, 30, 91, 153, 63, 191, 65, 33, 67, 34, 69
Offset: 2

Views

Author

Vladimir Shevelev, May 02 2011

Keywords

Comments

Conjecture: For all n>=2, a(n)>0.
For a general problem, see SeqFan link.

Crossrefs

Programs

  • Maple
    s:= proc(n, b) local m, t;
          t:= 0; m:= n;
          while m<>0 do t:= t+ irem(m, b, 'm') od; t
        end:
    a:= proc(n) local m;
          for m while irem(s(m*(n-1), 2), 2)<>0 or
                      irem(s(2*m*(n-1), n)/(n-1), 2)<>0 do od; m
        end:
    seq(a(n), n=2..100);  # Alois P. Heinz, May 02 2011
  • Mathematica
    s[n_, b_] := Module[{m, t}, t = 0; m = n; While[m != 0 , t = t + Mod[m, b]; m = Quotient[m, b]]; t];
    a[n_] := Module[{m}, For[m = 1, Mod[s[m*(n-1), 2], 2] != 0 || Mod[s[2*m*(n-1), n]/(n-1), 2] != 0, m++]; m];
    Table[a[n], {n, 2, 100}](* Jean-François Alcover, May 20 2025, after Alois P. Heinz *)