(Translated by https://www.hiragana.jp/)
A242976 - OEIS
login
A242976
Number of ways to write n = i + j + k with 0 < i <= j <= k such that prime(i) mod i, prime(j) mod j and prime(k) mod k are all triangular numbers, where prime(m) mod m denotes the least nonnegative residue of prime(m) modulo m.
1
0, 0, 1, 1, 1, 2, 2, 3, 4, 5, 5, 6, 6, 8, 8, 9, 8, 9, 7, 9, 9, 9, 8, 9, 8, 9, 9, 10, 9, 9, 8, 8, 9, 9, 9, 8, 9, 9, 11, 13, 12, 12, 13, 13, 13, 12, 14, 12, 11, 13, 10, 13, 11, 15, 12, 12, 13, 11, 12, 11, 9, 8, 7, 9, 11, 12, 15, 12, 16, 17, 15, 19, 15, 19, 12, 17, 15, 15, 17, 15
OFFSET
1,6
COMMENTS
Conjecture: (i) a(n) > 0 for all n > 2.
(ii) Any integer n > 3 can be written as a + b + c + d with a, b, c, d in the set {k>0: prime(k) mod k is a square}.
Clearly, part (i) implies that there are infinitely many positive integer k with prime(k) mod k a triangular number, and part (ii) implies that there are infinitely many positive integer k with prime(k) mod k a square.
EXAMPLE
a(5) = 1 since 5 = 1 + 2 + 2, prime(1) == 0*1/2 (mod 1) and prime(2) = 3 == 1*2/2 (mod 2). Note that prime(3) = 5 == 2 (mod 3) with 2 not a triangular number.
MATHEMATICA
TQ[n_]:=IntegerQ[Sqrt[8n+1]]
t[k_]:=TQ[Mod[Prime[k], k]]
a[n_]:=Sum[Boole[t[i]&&t[j]&&t[n-i-j]], {i, 1, n/3}, {j, i, (n-i)/2}]
Table[a[n], {n, 1, 80}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, May 28 2014
STATUS
approved