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.

Showing 1-5 of 5 results.

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

Original entry on oeis.org

1, 4, 5, 8, 10, 7, 10, 9, 14, 16, 15, 14, 18, 13, 20, 28, 15, 30, 18, 21, 32, 26, 19, 36, 30, 21, 30, 28, 27, 26, 42, 25, 40, 54, 35, 38, 30, 45, 52, 36, 42, 31, 42, 33, 54, 64, 60, 39, 38, 50, 45, 60, 39, 70, 42, 78, 45, 56, 90, 43, 54, 76, 45, 62, 52, 63, 90
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+2)*(2-1) = 4*1 = 4.
3rd nonprime = 6 = (p(max)=3)*(p(min)=2); a(3) = (3+2)*(2-1) = 5*1 = 5.
4th nonprime = 8 = (p(max)=2)*(p=2)*(p(min)=2); a(4) = (2+2)*2*(2-1) = 4*2*1 = 8.
		

Programs

  • Maple
    A006530 := proc(n) if n = 1 then 1; else max(op(numtheory[factorset](n))) ; end if; end proc:
    A020639 := proc(n) if n = 1 then 1; else min(op(numtheory[factorset](n))) ; end if; end proc:
    A002808 := proc(n) if n = 1 then 4; else for a from procname(n-1)+1 do if not isprime(a) then return a; end if; end do; end if; end proc:
    A052369 := proc(n) A006530(A002808(n)) ; end proc: A056608 := proc(n) A020639(A002808(n)) ; end proc:
    A141220 := proc(n) if n = 0 then 1; else c := A002808(n) ; hi := A052369(n) ; lo := A056608(n) ; c*(hi+2)*(lo-1)/lo/hi ; end if; end proc:
    printf("1,") ; for n from 1 to 400 do a := A141220(n) ; if not isprime(a) then printf("%d,",a) ; end if; end do: # R. J. Mathar, Mar 29 2010
  • Mathematica
    nonp[1]=1;i=1;Do[If[n-PrimePi[n]>i,nonp[i+1]=n;i++],{n,2,lim}];f[k_]:=k*(FactorInteger[k][[1,1]]-1)/FactorInteger[k][[1,1]]*(FactorInteger[k][[-1,1]]+2)/FactorInteger[k][[-1,1]];Join[{1},f/@Array[nonp,66,2]] (* James C. McMahon, Jul 18 2025 *)

Extensions

Entry revised by Jon E. Schoenfield, Mar 09 2014, following revision of A141218 by N. J. A. Sloane

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

A141554 Transformed nonprime products of prime factors of the composites, the largest prime decremented by 2 and the smallest prime incremented by 2.

Original entry on oeis.org

0, 4, 0, 12, 8, 20, 15, 0, 12, 24, 25, 36, 16, 21, 44, 15, 40, 36, 0, 45, 60, 35, 24, 68, 55, 48, 60, 72, 45, 84, 32, 45, 60, 75, 88, 36, 63, 80, 85, 108, 72, 116, 75, 0, 77, 108, 120, 105, 100, 48, 140, 75, 136, 81, 132, 96, 45, 156, 120, 105, 164, 135, 144, 108, 99, 168
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Aug 14 2008

Keywords

Comments

In the prime number decomposition of k=A002808(i), i=1,2,3,.., one instance of the largest prime, pmax=A052369(i), is replaced by pmax-2 and one instance of the smallest prime, pmin=A056608(i), is replaced by pmin+2. If the product of this modified list of factors, k*(pmax-2)*(pmin+2)/(pmin*pmax), is nonprime, it is added to the sequence.

Examples

			k(1)=4=(p(max)=2)*(p(min)=2), transformed (2-2)*(2+2)=0*4=0=a(1).
k(2)=6=(p(max)=3)*(p(min)=2), transformed (3-2)*(2+2)=1*4=4=a(2).
k(3)=8=(p(max)=2)*(p=2)*(p(min)=2), transformed (2-2)*2*(2+2)=0*2*4=0=a(3).
k(4)=9=(p(max)=3)*(p(min)=3), transformed (3-2)*(3+2)=1*5=5 (prime, skipped).
k(5)=10=(p(max)=5)*(p(min)=2), transformed (5-2)*(2+2)=3*4=12=a(4).
		

Crossrefs

Extensions

Edited and corrected by R. J. Mathar, Aug 18 2008

A141553 Transformed nonprime products of prime factors of the composites, the largest prime decremented by 2 and the smallest prime incremented by 1.

Original entry on oeis.org

0, 0, 4, 9, 6, 15, 12, 0, 9, 18, 20, 27, 12, 18, 33, 12, 30, 27, 0, 36, 45, 30, 18, 51, 44, 36, 45, 54, 36, 63, 24, 40, 45, 60, 66, 27, 54, 60, 68, 81, 54, 87, 60, 0, 66, 81, 90, 84, 75, 36, 105, 60, 102, 72, 99, 72, 36, 117, 90, 90, 123, 108, 108, 81, 88, 126, 116, 135, 102, 48
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Aug 14 2008

Keywords

Comments

In the prime number decomposition of k=A002808(i), i=1,2,3,.., one instance of the largest prime, pmax=A052369(i), is replaced by pmax-2 and one instance of the smallest prime, pmin=A056608(i), is replaced by pmin+1. If the product of this modified list of factors, k*(pmax-2)*(pmin+1)/(pmin*pmax), is nonprime, it is added to the sequence.

Examples

			k(1)=(p(max)=2)*(p(min)=2), transformed (2-2)*(2+1)=0*3=0=a(1).
k(2)=(p(max)=3)*(p(min)=2), transformed (3-2)*(2+1)=1*3=3 (prime, skipped).
k(3)=(p(max)=2)*(p=2)*(p(min)=2), transformed (2-2)*2*(2+1)=0*2*3=0=a(2), etc.
		

Crossrefs

Extensions

Edited and corrected by R. J. Mathar, Aug 18 2008

A141552 Transformed products of prime factors of the composites, the largest prime and smallest prime incremented by 1.

Original entry on oeis.org

9, 12, 18, 16, 18, 24, 24, 24, 36, 36, 36, 32, 36, 48, 36, 42, 48, 48, 54, 72, 48, 54, 48, 72, 60, 56, 72, 72, 72, 72, 72, 96, 64, 90, 72, 84, 108, 72, 96, 80, 90, 108, 96, 96, 144, 84, 108, 108, 96, 120, 144, 114, 120, 120, 96, 126, 144, 144, 126, 144, 108, 132, 120, 144
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Aug 14 2008

Keywords

Comments

In the prime number decomposition of k=A002808(i), i=1,2,3,.., one instance of the largest prime, pmax=A052369(i), is replaced by pmax+1 and one instance of the smallest prime, pmin=A056608(i), is replaced by pmin+1. The product of this modified list of factors, k*(pmax+1)*(pmin+1)/(pmin*pmax), is added to the sequence.

Examples

			k(1)=4=(p(max)=2)*(p(min)=2), transformed (2+1)*(2+1)=3*3=9=a(1).
k(2)=6=(p(max)=3)*(p(min)=2), transformed (3+1)*(2+1)=4*3=12=a(2).
k(6)=12=(p(max)=3)*(p=2)*(p(min)=2), transformed (3+1)*2*(2+1)=4*2*3=24=a(6), etc.
		

Crossrefs

Extensions

Edited and corrected by R. J. Mathar, Aug 18 2008
Showing 1-5 of 5 results.