A381578 For n > 0, for k > n, a(n) is the least k such that the pre-period and first period of the decimal expansion of n/k contains every digit of n at least as many times it is contained in n.
6, 7, 8, 7, 7, 9, 8, 9, 10, 17, 17, 14, 17, 17, 17, 17, 19, 19, 21, 21, 23, 23, 29, 28, 27, 27, 28, 29, 32, 31, 34, 34, 38, 38, 38, 38, 38, 39, 46, 43, 42, 43, 46, 46, 46, 47, 49, 49, 51, 51, 53, 53, 57, 56, 57, 57, 58, 59, 61, 61, 62, 63, 65, 65, 68, 67, 68, 69
Offset: 1
Examples
n = 1: 1/2 = 0.500... 1/3 = 0.33... 1/4 = 0.2500... 1/5 = 0.200... 1/6 = 0.166... contains the digit 1, thus a(1) = 6. n = 2: 2/3 = 0.66... 2/4 = 0.500... 2/5 = 0.400... 2/6 = 0.33... 2/7 = 0.285714285714...contains the digit 2, thus a(2) = 7.
Programs
-
Mathematica
a[n_] := Module[{k = n+1, r = Range[0, 9]}, While[! AllTrue[Count[Flatten[RealDigits[n/k][[1]]], #] & /@ r - DigitCount[n, 10, r], # >= 0 &], k++]; k]; Array[a, 100] (* Amiram Eldar, Feb 28 2025 *)
Comments