login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A363243
Numbers with an equal number of odd and even digits in their primorial-base representation.
1
2, 5, 31, 32, 35, 36, 40, 43, 44, 47, 48, 52, 55, 56, 59, 63, 67, 68, 71, 75, 79, 80, 83, 87, 91, 92, 95, 96, 100, 103, 104, 107, 108, 112, 115, 116, 119, 123, 127, 128, 131, 135, 139, 140, 143, 147, 151, 152, 155, 156, 160, 163, 164, 167, 168, 172, 175, 176, 179
OFFSET
1,1
COMMENTS
The sum of the first k odd-indexed primorial numbers (A002110) is a term, since its primorial-base representation is 1010...10, with the block "10" repeated k times (these numbers are 2, 32, 2342, 512852, 223605722, ...).
EXAMPLE
5 is a term since its primorial-base representation, 21, has one odd digit, 1, and one even digit, 2.
MATHEMATICA
With[{max = 5}, bases = Prime@ Range[max, 1, -1]; nmax = Times @@ bases - 1; prmBaseDigits[n_] := IntegerDigits[n, MixedRadix[bases]]; Select[Range[nmax], EvenQ[Length[(d = prmBaseDigits[#])]] && Count[d, _?EvenQ] == Length[d]/2 &]]
PROG
(PARI) is(n) = {my(p = 2, o = 0, e = 0); if(n < 1, return(0)); while(n > 0, if((n%p)%2 == 0, e++, o++); n \= p; p = nextprime(p+1)); e == o; }
CROSSREFS
Similar sequences: A031443 (binary), A227870 (decimal), A351895 (factorial base).
Sequence in context: A219273 A000133 A059086 * A215168 A370830 A266478
KEYWORD
nonn,base
AUTHOR
Amiram Eldar, May 23 2023
STATUS
approved