OFFSET
1,1
COMMENTS
The table showing the possible modulo 3 combinations for p, q, r and the sum ((p*q) + (p*r) + (q*r)):
| p | q | r | sum ((p*q) + (p*r) + (q*r)) (mod 3)
--+------+------+------+----------------------------------------
| 0 | 0 | 0 | 0, p=q=r=3, sum is 27.
--+------+------+------+----------------------------------------
| 0 | 0 | +/-1 | 0, p=q=3, r > 3.
--+------+------+------+----------------------------------------
| 0 | +1 | +1 | +1
--+------+------+------+----------------------------------------
| 0 | -1 | -1 | +1
--+------+------+------+----------------------------------------
| 0 | -1 | +1 | -1
--+------+------+------+----------------------------------------
| 0 | +1 | -1 | -1
--+------+------+------+----------------------------------------
| +1 | +1 | +1 | 0
--+------+------+------+----------------------------------------
| -1 | -1 | -1 | 0
--+------+------+------+----------------------------------------
| -1 | +1 | +1 | -1, regardless of the order, thus x3.
--+------+------+------+----------------------------------------
| +1 | -1 | -1 | -1, regardless of the order, thus x3.
--+------+------+------+----------------------------------------
Notably a(n) is a multiple of 3 only when A046316(n) is either a multiple of 9, or all primes p, q and r are either == +1 (mod 3) or all are == -1 (mod 3), and the case a(n) == +1 (mod 3) is only possible when A046316(n) is a multiple of 3, but not of 9, and furthermore, it is required that r == q (mod 3). See how these combinations affects sequences like A369241, A369245, A369450, A369451, A369452.
For n=1..9 the number of terms of the form 3k, 3k+1 and 3k+2 in range [1..10^n-1] are:
6, 2, 1,
39, 22, 38,
291, 209, 499,
2527, 1884, 5588,
23527, 17020, 59452,
227297, 156240, 616462,
2232681, 1453030, 6314288,
22119496, 13661893, 64218610,
220098425, 129624002, 650277572.
It seems that 3k+2 terms are slowly gaining at the expense of 3k+1 terms when n grows, while the density of the multiples of 3 might converge towards a limit.
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..20000
CROSSREFS
Cf. A369251 (same sequence sorted into ascending order, with duplicates removed).
Cf. A369464 (numbers that do not occur in this sequence).
Cf. also the trisections of A369055: A369460, A369461, A369462 and their partial sums A369450, A369451, A369452, also A369241, A369245.
Only terms of A004767 occur here.
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jan 22 2024
STATUS
approved