|
|
A363244
|
|
Numbers that in primorial-base representation have digits with an alternating parity.
|
|
1
|
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
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
|
|
|
STATUS
|
approved
|
|
|
|