login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A126247
a(n) is the number of triangular numbers, from among (T(1), T(2), T(3), ..., T(n)), which are coprime to T(n), where T(n) = n(n+1)/2 is the n-th triangular number.
0
1, 1, 1, 2, 1, 2, 3, 1, 2, 6, 1, 2, 9, 1, 2, 8, 5, 6, 5, 1, 4, 18, 3, 3, 13, 7, 4, 10, 5, 6, 15, 3, 8, 12, 2, 6, 33, 9, 3, 12, 9, 10, 17, 3, 8, 42, 7, 6, 21, 9, 6, 22, 17, 9, 9, 5, 16, 54, 5, 6, 57, 13, 8, 17, 9, 18, 29, 8, 9, 30, 11, 12, 69, 13, 7, 17, 12, 22, 23, 8, 26, 78, 9, 8, 43, 25, 12, 36
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
Cf. A000217.
Sequence in context: A263683 A087730 A263736 * A213999 A374411 A249026
KEYWORD
nonn
AUTHOR
Leroy Quet, Mar 08 2007
EXTENSIONS
More terms from Emeric Deutsch, Mar 24 2007
STATUS
approved