login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A204979
Least k such that n divides 2^(k-1)-2^(j-1) for some j satisfying 1<=j<k.
6
2, 3, 3, 4, 5, 4, 4, 5, 7, 6, 11, 5, 13, 5, 5, 6, 9, 8, 19, 7, 7, 12, 12, 6, 21, 14, 19, 6, 29, 6, 6, 7, 11, 10, 13, 9, 37, 20, 13, 8, 21, 8, 15, 13, 13, 13, 24, 7, 22, 22
OFFSET
1,1
COMMENTS
See A204892 for a discussion and guide to related sequences.
EXAMPLE
1 divides 2^2-2^1, so a(1)=2
2 divides 2^3-2^2, so a(2)=3
3 divides 2^3-2^1, so a(3)=3
4 divides 2^4-2^3, so a(4)=4
MATHEMATICA
s[n_] := s[n] = 2^(n - 1); z1 = 800; z2 = 50;
Table[s[n], {n, 1, 30}] (* A000079 *)
u[m_] := u[m] = Flatten[Table[s[k] - s[j], {k, 2, z1}, {j, 1, k - 1}]][[m]]
Table[u[m], {m, 1, z1}] (* A130328 *)
v[n_, h_] := v[n, h] = If[IntegerQ[u[h]/n], h, 0]
w[n_] := w[n] = Table[v[n, h], {h, 1, z1}]
d[n_] := d[n] = First[Delete[w[n], Position[w[n], 0]]]
Table[d[n], {n, 1, z2}] (* A204939 *)
k[n_] := k[n] = Floor[(3 + Sqrt[8 d[n] - 1])/2]
m[n_] := m[n] = Floor[(-1 + Sqrt[8 n - 7])/2]
j[n_] := j[n] = d[n] - m[d[n]] (m[d[n]] + 1)/2
Table[k[n], {n, 1, z2}] (* A204979 *)
Table[j[n], {n, 1, z2}] (* A001511 ? *)
Table[s[k[n]], {n, 1, z2}] (* A204981 *)
Table[s[j[n]], {n, 1, z2}] (* A006519 ? *)
Table[s[k[n]] - s[j[n]], {n, 1, z2}] (* A204983 *)
Table[(s[k[n]] - s[j[n]])/n, {n, 1, z2}] (* A204984 *)
CROSSREFS
Sequence in context: A244929 A302920 A280386 * A243351 A376635 A071585
KEYWORD
nonn
AUTHOR
Clark Kimberling, Jan 21 2012
STATUS
approved