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.

A275985 Least k such that n divides phi(k!) (k > 0).

This page as a plain text file.
%I A275985 #15 May 22 2018 17:35:58
%S A275985 1,3,6,4,10,6,14,4,7,10,22,6,26,14,10,5,34,7,38,10,14,22,46,6,11,26,9,
%T A275985 14,58,10,62,5,22,34,14,7,74,38,26,10,82,14,86,22,10,46,94,6,21,11,34,
%U A275985 26,106,9,22,14,38,58,118,10,122,62,14,6,26,22,134,34,46,14,142,7,146
%N A275985 Least k such that n divides phi(k!) (k > 0).
%H A275985 Robert Israel, <a href="/A275985/b275985.txt">Table of n, a(n) for n = 1..10000</a>
%F A275985 From _Robert Israel_, Aug 15 2016: (Start)
%F A275985 If m and n are coprime then a(m*n) = max(a(m),a(n)).
%F A275985 a(n) <= 2n, with equality iff n is an odd prime.
%F A275985 Suppose p is an odd prime.  Then
%F A275985   a(p) = 2p
%F A275985   If 2p+1 is prime then a(p^2) = 2p+1 and a(p^3) = 3p.
%F A275985   Otherwise a(p^2) = 3p and a(p^3) = 4p. (End)
%e A275985 a(4) = 4 because 4 divides phi(4!) = 8.
%p A275985 A:= proc(n) option remember;
%p A275985     local F,p,e,t,k;
%p A275985     F:= ifactors(n)[2];
%p A275985     if nops(F)=1 then
%p A275985       p:= F[1][1];
%p A275985       e:= F[1][2];
%p A275985       if p = 2 then
%p A275985          t:= 1; if e=1 then return 3 fi;
%p A275985       else
%p A275985          t:= 0
%p A275985       fi;
%p A275985       for k from 2*p by p do
%p A275985         t:= t + padic:-ordp(k,p);
%p A275985         if t >= e then return k fi;
%p A275985         if isprime(k+1) then
%p A275985           t:= t+padic:-ordp(k,p);
%p A275985           if t >= e then return(k+1) fi;
%p A275985         fi;
%p A275985       od
%p A275985     else
%p A275985       max(seq(procname(t[1]^t[2]), t=F))
%p A275985     fi
%p A275985 end proc:
%p A275985 A(1):= 1:
%p A275985 map(A, [$1..100]); # _Robert Israel_, Aug 15 2016
%t A275985 With[{ep=Table[{EulerPhi[k!],k},{k,200}]},Table[SelectFirst[ep,Divisible[#[[1]],n]&],{n,80}]][[All,2]] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, May 22 2018 *)
%o A275985 (PARI) a(n) = {my(k = 1); while(eulerphi(k!) % n, k++); k; }
%Y A275985 Cf. A048855.
%K A275985 nonn,look
%O A275985 1,2
%A A275985 _Altug Alkan_, Aug 15 2016