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
a(n) = A373830(6*n).
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.
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
A 6-section of A373830.
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Jun 18 2024
STATUS
approved