login
Difference between largest prime power factor of n and the smallest number S(n) with S(n)! a multiple of n [taking a(1)=0].
4

%I #9 Jul 22 2018 08:48:12

%S 0,0,0,0,0,0,0,4,3,0,0,0,0,0,0,10,0,3,0,0,0,0,0,4,15,0,18,0,0,0,0,24,

%T 0,0,0,3,0,0,0,3,0,0,0,0,3,0,0,10,35,15,0,0,0,18,0,1,0,0,0,0,0,0,2,56,

%U 0,0,0,0,0,0,0,3,0,0,15,0,0,0,0,10,72,0,0,0,0,0,0,0,0,3,0,0,0,0,0,24,0,35,0,15,0,0,0,0,0

%N Difference between largest prime power factor of n and the smallest number S(n) with S(n)! a multiple of n [taking a(1)=0].

%H Antti Karttunen, <a href="/A057110/b057110.txt">Table of n, a(n) for n = 1..65537</a>

%F a(n) = A034699(n) - A002034(n).

%e a(18) = 3 since 18 is a factor of 6!, 9 is the largest prime power factor of 18 and 9-6=3.

%o (PARI)

%o A002034(n) = if(1==n,n,my(s=factor(n)[, 1], k=s[#s], f=Mod(k!, n)); while(f, f*=k++); (k)); \\ After code in A002034.

%o A034699(n) = if(1==n,n,my(f=factor(n)); vecmax(vector(#f[, 1], i, f[i, 1]^f[i, 2]))); \\ After code in A034699.

%o A057110(n) = (A034699(n) - A002034(n)); \\ _Antti Karttunen_, Jul 22 2018

%Y Cf. A002034, A034699, A057108, A057111.

%K easy,nonn

%O 1,8

%A _Henry Bottomley_, Aug 08 2000

%E More terms added and term a(90) corrected from 4 to 3 by _Antti Karttunen_, Jul 22 2018