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.

A072211 a(n) = p-1 if n=p, p if n=p^e and e<>1, 1 otherwise; p a prime.

This page as a plain text file.
%I A072211 #22 Aug 25 2015 17:23:51
%S A072211 1,1,2,2,4,1,6,2,3,1,10,1,12,1,1,2,16,1,18,1,1,1,22,1,5,1,3,1,28,1,30,
%T A072211 2,1,1,1,1,36,1,1,1,40,1,42,1,1,1,46,1,7,1,1,1,52,1,1,1,1,1,58,1,60,1,
%U A072211 1,2,1,1,66,1,1,1,70,1,72,1,1,1,1,1,78,1,3,1,82,1,1,1,1,1,88,1,1,1,1,1
%N A072211 a(n) = p-1 if n=p, p if n=p^e and e<>1, 1 otherwise; p a prime.
%C A072211 Product_{d divides n} a(d) = phi(n).
%H A072211 Reinhard Zumkeller, <a href="/A072211/b072211.txt">Table of n, a(n) for n = 1..1000</a>
%F A072211 a(n) = Product_{d divides n} phi(n/d)^mu(d). - _Vladeta Jovovic_, Mar 08 2004
%F A072211 a(n) = A217863(n)/A217863(n-1) for n > 1. - _Eric Desbiaux_, Nov 23 2012; corrected by _Thomas Ordowski_, Aug 25 2015
%F A072211 D.g.f.: zeta(s) + Sum_{p prime} (p-2+p^(-s))/(p^s-1), - _Robert Israel_, Aug 25 2015
%p A072211 f:= proc(n)
%p A072211   local P;
%p A072211   P:= numtheory:-factorset(n);
%p A072211   if nops(P) > 1 then 1
%p A072211   elif n = P[1] then P[1]-1
%p A072211   else P[1]
%p A072211   fi
%p A072211 end proc:
%p A072211 1, seq(f(n),n=2..100); # _Robert Israel_, Aug 25 2015
%t A072211 Table[Which[PrimeQ@ n, n - 1, ! PrimeQ@ n && PrimePowerQ@ n,
%t A072211 First @@ FactorInteger@ n, True, 1], {n, 88}] (* _Michael De Vlieger_, Aug 25 2015 *)
%o A072211 (Haskell)
%o A072211 a072211 n = a072211_list !! (n-1)
%o A072211 a072211_list = 1 : zipWith div (tail a217863_list) a217863_list
%o A072211 -- _Reinhard Zumkeller_, Nov 24 2012
%o A072211 (PARI) a(n) = pp = isprimepower(n, &p); if (pp==1, n-1, if (pp, p, 1)); \\ _Michel Marcus_, Aug 25 2015
%Y A072211 Cf. A000010.
%K A072211 nonn
%O A072211 1,3
%A A072211 _Vladeta Jovovic_, Jul 03 2002