A363244 Numbers that in primorial-base representation have digits with an alternating parity.
0, 1, 2, 5, 7, 11, 14, 19, 23, 26, 32, 44, 56, 67, 71, 79, 83, 92, 104, 116, 127, 131, 139, 143, 152, 164, 176, 187, 191, 199, 203, 217, 221, 229, 233, 277, 281, 289, 293, 337, 341, 349, 353, 397, 401, 409, 413, 452, 464, 476, 512, 524, 536, 572, 584, 596, 637
Offset: 1
Examples
7 is a term since its primorial-base representation is 101 and the parities of its digits are odd, even, odd.
Links
Crossrefs
Programs
-
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]]
-
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; }
Comments