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.

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

This page as a plain text file.
%I A057108 #14 Jul 02 2025 16:02:00
%S A057108 0,0,0,2,0,0,0,2,3,0,0,1,0,0,0,4,0,3,0,0,0,0,0,1,5,0,6,0,0,0,0,6,0,0,
%T A057108 0,3,0,0,0,0,0,0,0,0,1,0,0,3,7,5,0,0,0,6,0,0,0,0,0,0,0,0,0,6,0,0,0,0,
%U A057108 0,0,0,3,0,0,5,0,0,0,0,1,6,0,0,0,0,0,0,0,0,1,0,0,0,0,0,5,0,7,0,5,0,0,0,0,0
%N A057108 Difference between the smallest number S(n) with S(n)! a multiple of n and the largest prime factor of n [taking a(1)=0].
%D A057108 Steven R. Finch, Mathematical Constants, Cambridge, 2003, pp. 284-292.
%H A057108 Antti Karttunen, <a href="/A057108/b057108.txt">Table of n, a(n) for n = 1..65537</a>
%H A057108 Steven R. Finch, <a href="http://www.people.fas.harvard.edu/~sfinch/constant/golomb/smarand/smarand1.html">The Average Value of the Smarandache Function</a> [Broken link]
%H A057108 Steven R. Finch, <a href="http://fs.unm.edu/SF/TheAverageValue.pdf">The Average Value of the Smarandache Function</a>
%F A057108 a(n) = A002034(n) - A006530(n).
%e A057108 a(12)=1 since 12 is a factor of 4!, 3 is the largest prime factor of 12 and 4-3=1
%o A057108 (PARI)
%o A057108 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 A057108 A006530(n) = if(n>1, vecmax(factor(n)[, 1]), 1); \\ From A006530.
%o A057108 A057108(n) = (A002034(n) - A006530(n)); \\ _Antti Karttunen_, Jul 22 2018
%Y A057108 Cf. A002034, A006530, A057109, A057110.
%K A057108 easy,nonn
%O A057108 1,4
%A A057108 _Henry Bottomley_, Aug 08 2000
%E A057108 More terms from _James Sellers_, Aug 22 2000