cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A129321 Triangle where the n-th row is the smallest n positive integers which are coprime to the n-th triangular number (n(n+1)/2).

This page as a plain text file.
%I A129321 #17 Mar 20 2024 04:22:29
%S A129321 1,1,2,1,5,7,1,3,7,9,1,2,4,7,8,1,2,4,5,8,10,1,3,5,9,11,13,15,1,5,7,11,
%T A129321 13,17,19,23,1,2,4,7,8,11,13,14,16,1,2,3,4,6,7,8,9,12,13,1,5,7,13,17,
%U A129321 19,23,25,29,31,35,1,5,7,11,17,19,23,25,29,31,35,37,1,2,3,4,5,6,8,9,10,11
%N A129321 Triangle where the n-th row is the smallest n positive integers which are coprime to the n-th triangular number (n(n+1)/2).
%H A129321 John Tyler Rascoe, <a href="/A129321/b129321.txt">Rows n = 1..141, flattened</a>
%e A129321 The 6th triangular number is 21. So row 6 gives the six smallest positive integers which are coprime to 21: (1,2,4,5,8,10).
%e A129321 From _John Tyler Rascoe_, Mar 20 2024: (Start)
%e A129321 Triangle begins:
%e A129321   1;
%e A129321   1, 2;
%e A129321   1, 5, 7;
%e A129321   1, 3, 7, 9;
%e A129321   1, 2, 4, 7, 8;
%e A129321   1, 2, 4, 5, 8, 10;
%e A129321 (End)
%p A129321 A129321 := proc(nrow) local a,n; a := [] ; n := 1; while nops(a) < nrow do if gcd(n, nrow*(nrow+1)/2) = 1 then a := [op(a),n] ; fi ; n := n+1 ; od: RETURN(a) ; end: seq( op(A129321(n)),n=1..15);
%t A129321 A129321row[n_] := Block[{t = n*(n+1)/2, c = 0}, Table[While[!CoprimeQ[++c, t]]; c, n]]; Array[A129321row, 10] (* _Paolo Xausa_, Mar 20 2024 *)
%o A129321 (PARI)
%o A129321 A129321row_n(n) ={my(r = vector(n), x=1, i=1 ); while(i<n+1, if(gcd(x,n*(n+1)/2)==1, r[i] = x; i+=1,); x+=1); r} \\ _John Tyler Rascoe_, Mar 20 2024
%Y A129321 Cf. A124823.
%K A129321 nonn,tabl
%O A129321 1,3
%A A129321 _Leroy Quet_, May 26 2007