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.

Original entry on oeis.org

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, 20, 28, 24, 24, 24, 36, 24, 32, 48, 30, 36, 28, 36, 48, 32, 40, 30, 36, 32, 48, 48, 56, 36, 36, 48, 40, 48, 38, 60, 40, 72, 42, 48, 72, 42, 48, 72, 44, 60, 48, 54, 84
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Aug 07 2008

Keywords

Examples

			1st nonprime = 1 (has no prime factors); a(1) = empty product = 1.
2nd nonprime = 4 = (p(max)=2)*(p(min)=2); a(2) = (2+1)*(2-1) = 3*1 = 3.
3rd nonprime = 6 = (p(max)=3)*(p(min)=2); a(3) = (3+1)*(2-1) = 4*1 = 4.
4th nonprime = 8 = (p(max)=2)*(p=2)*(p(min)=2); a(4) = (2+1)*2*(2-1) = 3*2*1 = 6.
		

Programs

  • Mathematica
    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 *)

Extensions

Three terms corrected by R. J. Mathar, Aug 18 2008
Entry revised by Jon E. Schoenfield, Mar 09 2014, following revision of A141218 by N. J. A. Sloane