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.

A122414 Triangle T(n,k) for 1 <= k <= n read by rows, where T(n,k) = 1 if gcd(n,k) is prime, 0 otherwise.

This page as a plain text file.
%I A122414 #11 May 24 2025 02:44:05
%S A122414 0,0,1,0,0,1,0,1,0,0,0,0,0,0,1,0,1,1,1,0,0,0,0,0,0,0,0,1,0,1,0,0,0,1,
%T A122414 0,0,0,0,1,0,0,1,0,0,0,0,1,0,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,
%U A122414 1,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,1,1,0,1,0,1,0,0
%N A122414 Triangle T(n,k) for 1 <= k <= n read by rows, where T(n,k) = 1 if gcd(n,k) is prime, 0 otherwise.
%F A122414 T(n,n) = A010051(n).
%F A122414 T(n,1) = 0.
%e A122414 The triangle starts
%e A122414   0
%e A122414   0 1
%e A122414   0 0 1
%e A122414   0 1 0 0
%e A122414   0 0 0 0 1
%e A122414   0 1 1 1 0 0
%e A122414   0 0 0 0 0 0 1
%e A122414   0 1 0 0 0 1 0 0
%e A122414   0 0 1 0 0 1 0 0 0
%e A122414   0 1 0 1 1 1 0 1 0 0
%e A122414   0 0 0 0 0 0 0 0 0 0 1
%e A122414   0 1 1 0 0 0 0 0 1 1 0 0
%e A122414   0 0 0 0 0 0 0 0 0 0 0 0 1
%e A122414   0 1 0 1 0 1 1 1 0 1 0 1 0 0
%e A122414   0 0 1 0 1 1 0 0 1 1 0 1 0 0 0
%p A122414 A122414 := proc(n,k)
%p A122414     if isprime(igcd(n,k)) then
%p A122414         1;
%p A122414     else
%p A122414         0;
%p A122414     end if;
%p A122414 end proc: # _R. J. Mathar_, Apr 21 2021
%t A122414 row[n_] := Boole[PrimeQ[GCD[n, Range[n]]]]; Array[row, 14] // Flatten (* _Amiram Eldar_, May 23 2025 *)
%o A122414 (PARI) {m=14; v=vector(m,x,vector(x)); for(n=1,m,for(k=1,n,if(isprime(gcd(n,k)),v[n][k]=1))); for(n=1,m,for(k=1,n,print1(v[n][k],",")))}
%Y A122414 Cf. A010051 (diagonal), A122415 (sub-triangle).
%Y A122414 Row sums are in A117494. [From _Klaus Brockhaus_, May 29 2009]
%K A122414 nonn,tabl,easy
%O A122414 1,1
%A A122414 _Klaus Brockhaus_, Sep 03 2006