OFFSET
1,4
EXAMPLE
T(10) = 10*11/2 = 55. The six triangular numbers which are coprime to 55 and are <= 55 are T(1)=1, T(2)=3, T(3)=6, T(6)=21, T(7)=28 and T(8)=36. So a(10) = 6.
MAPLE
a:=proc(n) local ct, i: ct:=0: for i from 1 to n do if gcd(i*(i+1)/2, n*(n+1)/2)=1 then ct:=ct+1 else ct:=ct fi: od: ct: end: seq(a(n), n=1..100); # Emeric Deutsch, Mar 24 2007
PROG
(PARI) a(n) = sum(k=1, n, gcd(n*(n+1)/2, k*(k+1)/2) == 1); \\ Michel Marcus, Feb 01 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Mar 08 2007
EXTENSIONS
More terms from Emeric Deutsch, Mar 24 2007
STATUS
approved