A257693 Numbers such that the smallest nonzero digit present (A257679) in their factorial base representation is 3.
18, 72, 90, 114, 360, 378, 432, 450, 456, 474, 498, 552, 570, 594, 618, 672, 690, 714, 2160, 2178, 2232, 2250, 2256, 2274, 2520, 2538, 2592, 2610, 2616, 2634, 2640, 2658, 2712, 2730, 2736, 2754, 2760, 2778, 2832, 2850, 2856, 2874, 2898, 2952, 2970, 2994, 3240, 3258, 3312, 3330, 3336, 3354, 3378, 3432, 3450, 3474, 3498, 3552
Offset: 1
Examples
Factorial base representation (A007623) of 18 is "300" (as 18 = 3*3! + 0*2! + 0*1!), thus a(18) = 3.
Links
Programs
-
Mathematica
q[n_] := Module[{k = n, m = 2, r, s = {}}, While[{k, r} = QuotientRemainder[k, m]; k != 0|| r != 0, AppendTo[s, r]; m++]; !ContainsAny[s, {1, 2}] && MemberQ[s, 3]]; Select[Range[3600], q] (* Amiram Eldar, Feb 14 2024 *)
-
Python
def A(n, p=2): return n if n
Comments