OFFSET
1,1
COMMENTS
Strings of ones are always isolated and at an odd position.
MATHEMATICA
a[0] = 1; a[l_] := a[l] = Block[{k = 1, s = Sum[ a[i]*x^i, {i, 0, l - 1}]}, While[ IntegerQ[ Last[ CoefficientList[ Series[(s + k*x^l)^(1/2), {x, 0, l}], x]]] != True, k++ ]; k]; p = Flatten[ Position[ Table[ a[n], {n, 0, 4150}], 1]]; f[n_] := Block[{k = n, m = 1}, While[m < Length[p] && p[[m + 1]] - p[[m]] != n, m++ ]; If[m < Length[p] - k, p[[m]] + 1, 0]]; Table[ f[2n], {n, 10}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Paul D. Hanna and Robert G. Wilson v, Nov 08 2005
STATUS
approved