OFFSET
2,5
EXAMPLE
2^6=64; the numbers 64-s(j) are 63,62,60,56,48,32, of which two are multiples of 6, so that a(6)=2.
MATHEMATICA
s[k_] := 2^(k - 1);
f[n_, k_] := If[Mod[s[n] - s[k], n] == 0, 1, 0];
t[n_] := Flatten[Table[f[n, k], {k, 1, n - 1}]]
a[n_] := Count[Flatten[t[n]], 1]
Table[a[n], {n, 2, 120}] (* A206714 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Feb 11 2012
STATUS
approved