|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
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, ...).
|
|
LINKS
|
|
|
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
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|