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-2 of 2 results.

A085271 Difference between n-th composite number and its smallest prime divisor.

Original entry on oeis.org

2, 4, 6, 6, 8, 10, 12, 12, 14, 16, 18, 18, 20, 22, 20, 24, 24, 26, 28, 30, 30, 32, 30, 34, 36, 36, 38, 40, 42, 42, 44, 46, 42, 48, 48, 50, 52, 50, 54, 54, 56, 58, 60, 60, 62, 60, 64, 66, 66, 68, 70, 72, 72, 74, 70, 76, 78, 78, 80, 82, 80, 84, 84, 86, 88, 84, 90, 90, 92, 90, 94
Offset: 1

Views

Author

Cino Hilliard, Aug 12 2003

Keywords

Examples

			For composite number 91 we have 91-7 = 84.
		

Crossrefs

Programs

  • Mathematica
    #-FactorInteger[#][[1,1]]&/@Complement[Range[2,200],Prime[Range[PrimePi[200]]]] (* Harvey P. Dale, Dec 11 2010 *)
    #-Divisors[#][[2]]&/@Select[Range[4,200],!PrimeQ[#]&] (* Zak Seidov, Apr 09 2011 *)
  • PARI
    cminusp(n) = { for(x=2,n, forprime(p=2,floor(sqrt(x)), if(x%p==0,print1(x-p,","); break); ) ) }
    
  • PARI
    {n=200;for(x=4,n,if(isprime(x),,print1(x-divisors(x)[2], ", ")))} \\ Zak Seidov, Apr 09 2011

Extensions

Typo in data corrected by Zak Seidov, Apr 09 2011

A085275 Sum of n-th composite number and its largest prime divisor.

Original entry on oeis.org

6, 9, 10, 12, 15, 15, 21, 20, 18, 21, 25, 28, 33, 27, 30, 39, 30, 35, 35, 34, 44, 51, 42, 39, 57, 52, 45, 49, 55, 50, 69, 51, 56, 55, 68, 65, 57, 66, 63, 76, 87, 65, 93, 70, 66, 78, 77, 85, 92, 77, 75, 111, 80, 95, 88, 91, 85, 84, 123, 91, 102, 129, 116, 99, 95, 104, 115, 124
Offset: 4

Views

Author

Cino Hilliard, Aug 12 2003

Keywords

Examples

			For 91=7*13 we have 91+13 = 104; for 92=2*2*23 we have 92+23 = 115.
		

Crossrefs

Programs

  • PARI
    cminusp3(n) = { for(x=2,n, forstep(p=x,2,-1, if(isprime(p) & x%p==0 & isprime(x)==0, print1(x+p,","); break); ) ) }
Showing 1-2 of 2 results.