A257692 Numbers such that the smallest nonzero digit present (A257679) in their factorial base representation is 2.
4, 12, 16, 22, 48, 52, 60, 64, 66, 70, 76, 84, 88, 94, 100, 108, 112, 118, 240, 244, 252, 256, 258, 262, 288, 292, 300, 304, 306, 310, 312, 316, 324, 328, 330, 334, 336, 340, 348, 352, 354, 358, 364, 372, 376, 382, 408, 412, 420, 424, 426, 430, 436, 444, 448, 454, 460, 468, 472, 478, 484, 492, 496, 502
Offset: 1
Examples
Factorial base representation (A007623) of 22 is "320" as 22 = 3*3! + 2*2! + 0*1!, thus a(22) = 2.
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++]; !MemberQ[s, 1] && MemberQ[s, 2]]; Select[Range[500], q] (* Amiram Eldar, Feb 14 2024 *)
-
Python
def A(n, p=2): return n if n
Comments