login
A354301
Numbers k such that k!, (k+1)! and (k+2)! have the same binary weight (A000120).
1
0, 7, 12, 262, 12887667
OFFSET
1,2
COMMENTS
Numbers k such that A079584(k) = A079584(k+1) = A079584(k+2).
The corresponding values of A079584(k) are 1, 6, 12, 747, 136453086, ...
EXAMPLE
7 is a term since A079584(7) = A079584(8) = A079584(9) = 6.
12 is a term since A079584(12) = A079584(13) = A079584(14) = 12.
MATHEMATICA
s[n_] := s[n] = DigitCount[n!, 2, 1]; Select[Range[0, 300], s[#] == s[# + 1] == s[# + 2] &]
PROG
(Python)
from itertools import count, islice
def wt(n): return bin(n).count("1")
def agen(): # generator of terms
n, fn, fn1, fn2, wtn, wtn1, wtn2 = 0, 1, 1, 2, 1, 1, 1
for n in count(0):
if wtn == wtn1 == wtn2: yield n
fn, fn1, fn2 = fn1, fn2, fn2*(n+3)
wtn, wtn1, wtn2 = wtn1, wtn2, wt(fn2)
print(list(islice(agen(), 4))) # Michael S. Branicky, May 23 2022
CROSSREFS
Subsequence of A354300.
Sequence in context: A298678 A219777 A157808 * A225227 A217793 A299472
KEYWORD
nonn,base,more
AUTHOR
Amiram Eldar, May 23 2022
STATUS
approved