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.

A292024 a(n) is the smallest k such that n divides psi(k!) (k > 0).

This page as a plain text file.
%I A292024 #21 Oct 15 2020 19:26:45
%S A292024 1,3,2,3,10,3,13,4,5,10,22,3,26,13,10,4,34,5,37,10,13,22,46,4,15,26,6,
%T A292024 13,58,10,61,5,22,34,13,5,73,37,26,10,82,13,86,22,10,46,94,4,14,15,34,
%U A292024 26,106,6,22,13,37,58,118,10,122,61,13,6,26,22,134,34,46,13,142,5,146,73,15,37,22,26,157
%N A292024 a(n) is the smallest k such that n divides psi(k!) (k > 0).
%C A292024 From _Robert Israel_, Sep 14 2017: (Start)
%C A292024 If m and n are coprime then a(m*n) = max(a(m),a(n)).
%C A292024 a(n) <= 2n.
%C A292024 Suppose p is a prime >= 5.  Then
%C A292024   a(p) = 2p-1 if p is in A005382, otherwise 2p.
%C A292024   a(p^2) = 2p if p is in A005382, otherwise 3p.
%C A292024   a(p^3) = 3p if p is in A005382, 4p-1 if p is in A062737, otherwise 4p.
%C A292024 (End)
%H A292024 Robert Israel, <a href="/A292024/b292024.txt">Table of n, a(n) for n = 1..10000</a>
%e A292024 a(4) = 3 because 4 divides psi(3!) = 12 and 3 is the least number with this property.
%p A292024 A:= proc(n) option remember;
%p A292024     local F, p, e, t, k;
%p A292024     F:= ifactors(n)[2];
%p A292024     if nops(F)=1 then
%p A292024       p:= F[1][1];
%p A292024       e:= F[1][2];
%p A292024       if p = 3 then
%p A292024         t:= 1; if e =1 then return 2 fi
%p A292024       else t:= 0:
%p A292024       fi;
%p A292024       for k from 2*p by p do
%p A292024         if isprime(k-1) then
%p A292024           t:= t+padic:-ordp(k, p);
%p A292024           if t >= e then return(k-1) fi;
%p A292024         fi;
%p A292024         t:= t + padic:-ordp(k, p);
%p A292024         if t >= e then return k fi;
%p A292024       od
%p A292024     else
%p A292024       max(seq(procname(t[1]^t[2]), t=F))
%p A292024     fi
%p A292024 end proc:
%p A292024 A(1):= 1:
%p A292024 map(A, [$1..100]); # _Robert Israel_, Sep 14 2017
%t A292024 psi[n_] := Module[{p, e}, Product[{p, e} = pe; p^e + p^(e-1), {pe, FactorInteger[n]}]];
%t A292024 a[n_] := Module[{k = 1}, While[!Divisible[psi[k!], n], k++]; k]; a[2] = 3;
%t A292024 Array[a, 100] (* _Jean-François Alcover_, Oct 15 2020, after PARI *)
%o A292024 (PARI) a001615(n) = my(f=factor(n)); prod(i=1, #f~, f[i, 1]^f[i, 2] + f[i, 1]^(f[i, 2]-1));
%o A292024 a(n) = {my(k=1); while(a001615(k!) % n, k++); k; } \\ after _Charles R Greathouse IV_ at A001615
%Y A292024 Cf. A001615, A005382, A062737, A275985.
%K A292024 nonn,look
%O A292024 1,2
%A A292024 _Altug Alkan_, Sep 07 2017