cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A373505 Numbers k such that k and k+1 both have an equal number of odd and even digits in their factorial-base representations.

This page as a plain text file.
%I A373505 #8 Jun 07 2024 05:21:57
%S A373505 25,29,37,41,55,67,73,77,85,89,103,115,727,739,745,749,757,761,775,
%T A373505 787,793,797,805,809,823,835,841,845,853,857,889,893,901,905,937,941,
%U A373505 949,953,967,979,985,989,997,1001,1015,1027,1033,1037,1045,1049,1063,1075,1081
%N A373505 Numbers k such that k and k+1 both have an equal number of odd and even digits in their factorial-base representations.
%C A373505 If m is the sum of the first k odd-indexed factorial numbers (A000142), for k >= 2, then m-1 is a term, since the factorial-base representation of m is 1010...10, with the block "10" repeated k times, and the factorial-base representation of m-1 is the 1010...1001, with the block "10" repeated k-1 times and followed by "01" (these numbers are 25, 745, 41065, 3669865, 482671465, ...).
%H A373505 Amiram Eldar, <a href="/A373505/b373505.txt">Table of n, a(n) for n = 1..10000</a>
%H A373505 Wikipedia, <a href="https://en.wikipedia.org/wiki/Factorial_number_system">Factorial number system</a>.
%H A373505 <a href="/index/Fa#facbase">Index entries for sequences related to factorial base representation.</a>.
%e A373505 25 is a term since the factorial-base representations of 25 and 26 are 1001 and 1010, respectively, and both have 2 odd digits and 2 even digits.
%t A373505 With[{max = 7}, fctBaseDigits[n_] := IntegerDigits[n, MixedRadix[Range[max, 2, -1]]]; s = Select[Range[1, max!], EvenQ[Length[(d = fctBaseDigits[#])]] && Count[d, _?EvenQ] == Length[d]/2 &]; ind = Position[Differences[s], 1] // Flatten; s[[ind]]]
%o A373505 (PARI) iseq(n) = {my(p = 2, o = 0, e = 0); while(n > 0, if((n%p) %2  == 0, e++, o++); n \= p; p++); e == o;}
%o A373505 lista(kmax) = {my(q1 = 0, q2); for(k = 1, kmax, q2 = iseq(k); if(q1 && q2, print1(k-1, ", ")); q1 = q2);}
%Y A373505 Subsequence of A351895.
%Y A373505 Cf. A000142, A007623.
%Y A373505 Similar sequences: A337238, A373460.
%K A373505 nonn,base,easy
%O A373505 1,1
%A A373505 _Amiram Eldar_, Jun 07 2024