A217445 Numbers n such that n! has the same number of terminating zeros in bases 3 and 4.
1, 2, 4, 5, 6, 7, 10, 11, 12, 13, 14, 18, 19, 21, 22, 23, 33, 36, 37, 38, 42, 43, 46, 47, 51, 56, 58, 59, 60, 61, 62, 75, 86, 88, 89, 92, 100, 101, 102, 103, 105, 112, 113, 114, 115, 120, 121, 122, 124, 125, 138, 139, 141, 147, 153, 159, 164, 166, 167, 168
Offset: 1
Examples
6! is 222200 in base 3 and 23100 in base 4, both of them have 2 zeros at the end, so 6 is in the sequence.
References
- Jean-Marc Deshouillers, Laurent Habsieger, Shanta Laishram, Bernard Landreau, Sums of the digits in bases 2 and 3, arXiv:1611.08180, 2016
Links
- Alois P. Heinz, Table of n, a(n) for n = 1..10000
Programs
-
Maple
s2:= n -> convert(convert(n,base,2),`+`): s3:= n -> convert(convert(n,base,3),`+`): select(n -> s2(n) + (n+s2(n) mod 2) = s3(n), [$1..1000]); # Robert Israel, Jan 19 2017
-
Mathematica
sntzQ[n_]:=Module[{f=n!},Last[Split[IntegerDigits[f,3]]]==Last[ Split[ IntegerDigits[ f,4]]]]; Select[Range[200],sntzQ] (* Harvey P. Dale, Jul 11 2020 *)
-
PARI
is(n)=my(L=log(n+1));sum(k=1,L\log(3),n\3^k)==sum(k=1,L\log(2),n>>k)\2 \\ Charles R Greathouse IV, Oct 04 2012
Extensions
More terms from Alois P. Heinz, Oct 03 2012
Comments