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.

A054522 Triangle T(n,k): T(n,k) = phi(k) if k divides n, T(n,k)=0 otherwise (n >= 1, 1<=k<=n). T(n,k) = number of elements of order k in cyclic group of order n.

This page as a plain text file.
%I A054522 #40 Apr 05 2025 09:37:00
%S A054522 1,1,1,1,0,2,1,1,0,2,1,0,0,0,4,1,1,2,0,0,2,1,0,0,0,0,0,6,1,1,0,2,0,0,
%T A054522 0,4,1,0,2,0,0,0,0,0,6,1,1,0,0,4,0,0,0,0,4,1,0,0,0,0,0,0,0,0,0,10,1,1,
%U A054522 2,2,0,2,0,0,0,0,0,4,1,0,0,0,0,0,0,0,0,0,0,0,12,1,1,0,0,0,0,6,0,0,0,0,0
%N A054522 Triangle T(n,k): T(n,k) = phi(k) if k divides n, T(n,k)=0 otherwise (n >= 1, 1<=k<=n). T(n,k) = number of elements of order k in cyclic group of order n.
%C A054522 T(n,1) = 1; T(n,n) = A000010(n).
%C A054522 This triangle is the transpose of the upper triangular array U in the LU decomposition of the square array A003989. - _Peter Bala_, Oct 15 2023
%H A054522 Reinhard Zumkeller, <a href="/A054522/b054522.txt">Rows n=1..100 of triangle, flattened</a>
%H A054522 R. J. Mathar, <a href="http://www.vixra.org/abs/1406.0183">Plots of cycle graphs of the finite groups up to order 36</a>, (2015)
%F A054522 Sum (T(n,k): k = 1 .. n) = n. - _Reinhard Zumkeller_, Oct 18 2011
%F A054522 T(n,k) = Sum_{d|k} mu(k/d)*gcd(n,d). - _Ridouane Oudra_, Apr 05 2025
%e A054522 1;
%e A054522 1, 1;
%e A054522 1, 0, 2;
%e A054522 1, 1, 0, 2;
%e A054522 1, 0, 0, 0, 4;
%e A054522 1, 1, 2, 0, 0, 2;
%e A054522 1, 0, 0, 0, 0, 0, 6;
%e A054522 1, 1, 0, 2, 0, 0, 0, 4;
%e A054522 1, 0, 2, 0, 0, 0, 0, 0, 6;
%p A054522 A054522 := proc(n,k)
%p A054522     if modp(n,k) = 0 then
%p A054522         numtheory[phi](k) ;
%p A054522     else
%p A054522         0;
%p A054522     end if;
%p A054522 end proc:
%p A054522 seq(seq(A054522(n,k),k=1..n),n=1..15) ; # _R. J. Mathar_, Aug 06 2016
%t A054522 t[n_, k_] /; Divisible[n, k] := EulerPhi[k]; t[_, _] = 0; Flatten[Table[t[n, k], {n, 1, 14}, {k, 1, n}]] (* _Jean-François Alcover_, Nov 25 2011 *)
%t A054522 Flatten[Table[If[Divisible[n,k],EulerPhi[k],0],{n,15},{k,n}]] (* _Harvey P. Dale_, Feb 27 2012 *)
%o A054522 (PARI) T(n,k)=if(k<1 || k>n,0,if(n%k,0,eulerphi(k)))
%o A054522 (Haskell)
%o A054522 a054522 n k = a054522_tabl !! (n-1) !! (k-1)
%o A054522 a054522_tabl = map a054522_row [1..]
%o A054522 a054522_row n = map (\k -> if n `mod` k == 0 then a000010 k else 0) [1..n]
%o A054522 -- _Reinhard Zumkeller_, Oct 18 2011
%Y A054522 Cf. A003989, A054521, A008683, A050873.
%K A054522 nonn,tabl,nice,easy
%O A054522 1,6
%A A054522 _N. J. A. Sloane_, Apr 09 2000