OFFSET
1,2
COMMENTS
First occurrence of k or -1 if not present: 1, 10, 5, -1, 25, 2, -1, 4, 8, 3, -1, 32, -1, 16, -1, -1, -1, -1, -1, 64, -1, -1, -1, 128, -1, 256, ..., . - Robert G. Wilson v, Aug 17 2006
EXAMPLE
a(2)=5 because 1/2 = 0.50 and 5 + 0 = 5.
a(3)=9 because 1/3 = 0.3333... and 3 + 3 + 3 = 9.
a(7)=28 because 1/7 = 0.14285714285714... and 1 + 4 + 2 + 8 + 5 + 7 + 1 = 28.
MATHEMATICA
f[n_] := If[n == 1, 0, Plus @@ IntegerDigits[Floor[10^n/n]]]; Array[f, 63] (* Robert G. Wilson v, Aug 17 2006 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Gil Broussard, Aug 09 2006
STATUS
approved