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.

A141219 Write the n-th nonprime (A018252(n)) as a product of primes; increase one copy of the largest prime by 1 and decrease one copy of the smallest prime by 1, multiply the resulting numbers.

This page as a plain text file.
%I A141219 #26 Jul 18 2025 18:22:33
%S A141219 1,3,4,6,8,6,8,8,12,12,12,12,16,12,16,24,14,24,16,18,24,24,18,32,24,
%T A141219 20,28,24,24,24,36,24,32,48,30,36,28,36,48,32,40,30,36,32,48,48,56,36,
%U A141219 36,48,40,48,38,60,40,72,42,48,72,42,48,72,44,60,48,54,84
%N A141219 Write the n-th nonprime (A018252(n)) as a product of primes; increase one copy of the largest prime by 1 and decrease one copy of the smallest prime by 1, multiply the resulting numbers.
%e A141219 1st nonprime = 1 (has no prime factors); a(1) = empty product = 1.
%e A141219 2nd nonprime = 4 = (p(max)=2)*(p(min)=2); a(2) = (2+1)*(2-1) = 3*1 = 3.
%e A141219 3rd nonprime = 6 = (p(max)=3)*(p(min)=2); a(3) = (3+1)*(2-1) = 4*1 = 4.
%e A141219 4th nonprime = 8 = (p(max)=2)*(p=2)*(p(min)=2); a(4) = (2+1)*2*(2-1) = 3*2*1 = 6.
%t A141219 lim=66;i=n=1; Until[i==lim,If[n-PrimePi[n]>i, nonp[i+1]=n; i++;n++,n++]]; f[k_]:=k*(FactorInteger[k][[1, 1]]-1)/FactorInteger[k][[1, 1]]*(FactorInteger[k][[-1, 1]]+1)/FactorInteger[k][[-1, 1]]; Join[{1}, f/@Array[nonp, lim-1, 2]] (* _James C. McMahon_, Jul 18 2025 *)
%K A141219 nonn
%O A141219 1,2
%A A141219 _Juri-Stepan Gerasimov_, Aug 07 2008
%E A141219 Three terms corrected by _R. J. Mathar_, Aug 18 2008
%E A141219 Entry revised by _Jon E. Schoenfield_, Mar 09 2014, following revision of A141218 by _N. J. A. Sloane_