|
|
A373604
|
|
a(n) = 1 if the primorial base representation of 6*n has alternating digit sum (A373605) that is a multiple of 3, otherwise 0.
|
|
3
|
|
|
1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0
|
|
COMMENTS
|
a(n) = 1 iff the sum of even-indexed digits and the sum of odd-indexed digits in the primorial base representation (A049345) of 6*n are equal modulo 3, i.e., iff the multiplicities of prime factors of A276086(6*n) [all by necessity > 3] that are even-indexed (A031215) and odd-indexed (A031368) are equal modulo 3.
First n where a(n) = a(n-1) = 1 are 105, 210, 315, 420, 525, 630, ...
a(n) differs from A373601(6*n) for the first time at x=37182146. Note that 6*x = 223092876 = A002110(9) + A002110(2) = 1000000100 in primorial base, so a(x) = 1 [see the example], while on the other hand, A373601(6*x) = 0, as A276086(6*x) = 145 = prime(3) * prime(10) = 5 * 29, and 5+29 = 34 is not a multiple of 3. This happens because it is at the tenth prime where the alternating pattern of 2, 1, 2, 1, 2, 1, ... of congruences of primes >= 5 (mod 3) breaks for the first time (see A039701 and A112632), as both 23 (the ninth) and 29 (the tenth prime) are congruent to 2 (mod 3).
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
For n=3, we have A049345(3*6) = 300, thus the sum of digits in even positions (when the rightmost digit is considered to be in the position 0), which here is 3, and the sum of digits in odd positions, which here is 0, are equal modulo 3, and therefore a(3) = 1.
For n=6, A049345(6*6) = 1100, thus the sum of digits in even positions (1) and in odd positions (1) are equal modulo 3, and a(6) = 1.
For n=9, A049345(9*6) = 1400, thus the sum of digits in even positions (4) and in odd positions (1) are equal modulo 3, and a(9) = 1.
For n=37182146, A049345(37182146*6) = 1000000100, thus A373605(37182146*6) = 0, and a(37182146) = 1.
|
|
PROG
|
(PARI) A373604(n) = { my(p=2, i=1, c1=0, c2=0); n *= 6; while(n, if(p>3, if(i%2, c1 += (n%p), c2 += (n%p))); n = n\p; p = nextprime(1+p); i = !i); 0==((c1-c2)%3); };
|
|
CROSSREFS
|
After n=0 differs from A100283 for the next time at n=36, where a(36) = 0, while A100283(36) = 1.
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|