%I #17 Feb 07 2024 01:18:46
%S 0,1,0,1,1,1,0,1,0,1,1,1,0,1,0,1,1,1,1,1,1,1,1,1,0,1,0,1,1,1,0,1,0,1,
%T 1,1,0,1,0,1,1,1,1,1,1,1,1,1,0,1,0,1,1,1,0,1,0,1,1,1,0,1,0,1,1,1,1,1,
%U 1,1,1,1,0,1,0,1,1,1,0,1,0,1,1,1,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0
%N Characteristic function for A273670: 1 if there is at least one maximal digit present in the factorial representation of n (A007623), otherwise 0.
%H Antti Karttunen, <a href="/A276950/b276950.txt">Table of n, a(n) for n = 0..5040</a>
%H <a href="/index/Ch#char_fns">Index entries for characteristic functions</a>.
%H <a href="/index/Fa#facbase">Index entries for sequences related to factorial base representation</a>.
%F If A260736(n) = 0 then a(n) = 0, otherwise a(n) = 1.
%F a(n) = A257680(A225901(n)).
%F Other identities. For all n >= 0:
%F a(A153880(n)) = 0 and a(A273670(n)) = 1.
%F a(A005408(n)) = 1.
%t a[n_] := Module[{k = n, m = 2, c = 0, r}, While[{k, r} = QuotientRemainder[k, m]; k != 0 || r != 0, If[r == m - 1, c++]; m++]; If[c > 0, 1, 0]]; Array[a, 100, 0] (* _Amiram Eldar_, Feb 07 2024 *)
%o (Scheme, two alternative implementations)
%o (define (A276950 n) (if (zero? (A260736 n)) 0 1))
%o (define (A276950 n) (A257680 (A225901 n)))
%Y Cf. A276952 (partial sums).
%Y Cf. A005408, A007623, A153880, A225901, A257680, A260736, A273670, A276948.
%K nonn,base
%O 0
%A _Antti Karttunen_, Sep 22 2016