OFFSET
1,1
COMMENTS
Otherwise said, floor(10^m*k/n) = n for some k and m.
Also, numbers n which have n as a subsequence in the decimal expansion of k/n, 0 < k < n.
Initially it appears that if n is present so is 10n and 11n. These two statements are false. 14 is present but 140 is not. 1/140 = 0.00714285... 17 is present but 187 is not.
However if there is a k between 0 and n so that gcd(k,n) = r > 1 and k/r is used to show that n/r is a term, then so is n. As an example, 33 is a term since 11/33 = 1/3 and 3 is a term. See the first example.
EXAMPLE
3 is a term since 1/3 = 0.3333... and its fractional part begins with 3;
6 is a term since 10/6 = 1.666... and its fractional part begins with 6;
7 is a term since 5/7 = 0.714285... and its fractional part begins with 7;
8 is a term since 7/8 = 0.87500... and its fractional part begins with 8;
10 is a term since 1/10 = 0.1000... and its fractional part begins with 10;
14 is a term since 2/14 = 0.142857... and its fractional part begins with 14;
17 is a term since 3/17 = 0.17647058823... and its fractional part begins with 17; etc.
MATHEMATICA
fQ = Compile[{{n, _Integer}}, Block[{k = 1, il = IntegerLength@ n}, While[m = 10^il*k/n; While[ IntegerLength@ Floor@ m < il, m *= 10]; k < n && Floor[m] != n, k++]; k < n]]; Select[Range@200, fQ]
PROG
(PARI) is_A298980(n, k=(n^2-1)\10^(logint(n, 10)+1)+1)={k*10^(logint((n^2-(n>1))\k, 10)+1)\n==n} \\ Or use A298982 to get the k-value if n is in this sequence or 0 otherwise. \\ M. F. Hasler, Feb 01 2018
CROSSREFS
KEYWORD
easy,base,nonn
AUTHOR
STATUS
approved