OFFSET
1,3
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
7 is a term since its primorial-base representation is 101 and the parities of its digits are odd, even, odd.
MATHEMATICA
With[{max = 5}, bases = Prime@ Range[max, 1, -1]; nmax = Times @@ bases - 1; q[n_] := AllTrue[Differences@ Mod[IntegerDigits[n, MixedRadix[bases]], 2], # != 0 &]; Select[Range[0, nmax], q]]
PROG
(PARI) is(n) = {my(p = 3, r1 = n%2); n \= 2; while(n > 0, r2 = (n%p)%2; n \= p; p = nextprime(p+1); if(r1 == r2, return(0)); r1 = r2); 1; }
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Amiram Eldar, May 23 2023
STATUS
approved