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.
%I A104039 #23 Jul 02 2025 16:02:02 %S A104039 1,2,8,12,40,48,128,108,220,336,240,432,640,504,1012,1248,1624,960, %T A104039 1320,1680,1728,1872,3280,3520,3072,4000,3264,5512,3888,5376,4536, %U A104039 6240,8704,6072,10656,6000,7488,8748,13612,14448,15664,8640,13680,12288,16464 %N A104039 Number of primitive roots modulo prime(n)^2, where prime(n) is n-th prime. %D A104039 I. Niven, H. S. Zuckerman & H. L. Montgomery, An Introduction to the Theory of Numbers, 5th Ed., p. 102, John Wiley, NY, 1991. %H A104039 Vincenzo Librandi, <a href="/A104039/b104039.txt">Table of n, a(n) for n = 1..1000</a> %F A104039 a(n) = (prime(n) - 1)*phi((prime(n) - 1)) = A006093(n)*A000010(A006093(n)) = A006093(n)*A008330(n). %p A104039 with(numtheory): for p from 1 to 100 do printf(`%d,`,(ithprime(p)-1)*phi(ithprime(p)-1)) od: # _James Sellers_, Apr 10 2005 %t A104039 Table[(Prime[n] - 1) EulerPhi[(Prime[n] - 1)], {n, 50}] (* _Vincenzo Librandi_, Aug 18 2017 *) %o A104039 (Magma) [(NthPrime(n)-1)*EulerPhi((NthPrime(n)-1)): n in [1..50]]; // _Vincenzo Librandi_, Aug 18 2017 %K A104039 nonn %O A104039 1,2 %A A104039 _Lekraj Beedassy_, Mar 31 2005 %E A104039 More terms from _James Sellers_, Apr 10 2005