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.
%I A141218 #31 Jul 18 2025 14:45:47 %S A141218 1,3,6,6,8,12,12,18,16,12,18,24,24,30,24,24,36,24,36,36,24,40,48,36, %T A141218 36,54,48,48,54,60,48,66,48,48,60,64,72,54,60,72,72,84,72,90,72,48,72, %U A141218 90,96,88,90,72,108,80,108,80,108,96,72,120,108,96,126,112,120,108,96,132,120 %N A141218 Write the n-th nonprime (A018252(n)) as a product of primes; decrease one copy of the largest prime by 1 and increase one copy of the smallest prime by 1, multiply the resulting numbers. %H A141218 Robert Israel, <a href="/A141218/b141218.txt">Table of n, a(n) for n = 1..10000</a> %e A141218 1st nonprime = 1 (has no prime factors); a(1) = empty product = 1. %e A141218 2nd nonprime = 4 = (p(max)=2)*(p(min)=2); a(2) = (2-1)*(2+1) = 1*3 = 3. %e A141218 3rd nonprime = 6 = (p(max)=3)*(p(min)=2); a(3) = (3-1)*(2+1) = 2*3 = 6. %e A141218 4th nonprime = 8 = (p(max)=2)*(p=2)*(p(min)=2); a(4) = (2-1)*2*(2+1) = 1*2*3 = 6. %p A141218 f:= proc(m) local F,p1,p2; %p A141218 if isprime(m) then return NULL fi; %p A141218 F:= numtheory:-factorset(m); %p A141218 p1:= min(F); p2:= max(F); %p A141218 m*(p1+1)/p1*(p2-1)/p2; %p A141218 end proc: %p A141218 1, seq(f(i),i=2..200); # _Robert Israel_, Oct 08 2018 %t A141218 npr={};Do[If[!PrimeQ[i],AppendTo[npr,i]],{i,2,93}];f[k_]:=k*(FactorInteger[k][[1,1]]+1)/FactorInteger[k][[1,1]]*(FactorInteger[k][[-1,1]]-1)/FactorInteger[k][[-1,1]];Join[{1},f/@npr] (* _James C. McMahon_, Jul 18 2025 *) %Y A141218 Cf. A018252, A141553, A141554. %K A141218 nonn,look %O A141218 1,2 %A A141218 _Juri-Stepan Gerasimov_, Aug 07 2008 %E A141218 Three terms corrected by _R. J. Mathar_, Aug 18 2008 %E A141218 Entry revised by _N. J. A. Sloane_, Mar 07 2014 %E A141218 Examples revised by _Jon E. Schoenfield_, Mar 08 2014