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.

A155875 Smallest positive composite number such that a(n) - n is also composite.

Original entry on oeis.org

4, 9, 6, 9, 8, 9, 10, 15, 12, 15, 14, 15, 16, 21, 18, 21, 20, 21, 22, 25, 24, 25, 26, 27, 28, 33, 30, 33, 32, 33, 34, 35, 36, 39, 38, 39, 40, 45, 42, 45, 44, 45, 46, 49, 48, 49, 50, 51, 52, 55, 54, 55, 56, 57, 58, 63, 60, 63, 62, 63, 64, 65, 66, 69, 68, 69, 70
Offset: 0

Views

Author

Eric Angelini, Jan 29 2009

Keywords

Comments

a(0) = 4. Subtracting n = 0 from a(0) gives 4-0 = 4, which is a composite number; subtracting n = 1 from a(1) gives 9-1 = 8 which is composite; subtracting n = 2 from a(2) gives 6-2 = 4 which is composite; subtracting n = 3 from a(3) gives 9-3 = 6 which is composite; etc.

Crossrefs

Programs

  • Python
    from sympy import isprime
    def composite(n): return n >= 4 and not isprime(n)
    def a(n):
      an = n + 4
      while not (composite(an) and composite(an-n)): an += 1
      return an
    print([a(n) for n in range(67)]) # Michael S. Branicky, Apr 09 2021

Extensions

More terms from Michael S. Branicky, Apr 09 2021

A155878 a(0)=4; for n > 0, a(n) is the smallest composite number c > a(n-1) such that c + n is also composite.

Original entry on oeis.org

4, 8, 10, 12, 14, 15, 16, 18, 20, 21, 22, 24, 26, 27, 28, 30, 32, 33, 34, 35, 36, 39, 40, 42, 44, 45, 46, 48, 49, 51, 52, 54, 55, 57, 58, 60, 62, 63, 64, 65, 66, 69, 70, 72, 74, 75, 76, 77, 78, 80, 82, 84, 86, 87, 88, 90, 91, 93, 94, 95, 96, 98, 99, 102, 104, 105, 106, 108
Offset: 0

Views

Author

Eric Angelini, Jan 29 2009

Keywords

Examples

			a(0)=4. Adding a(0) to n=0 gives 4+0=4, which is a composite number; adding a(1) to n=1 gives 8+1=9 which is composite; adding a(2) to n=2 gives 10+2=12 which is composite; adding a(3) to n=3 gives 12+3=15 which is composite; etc.
		

Crossrefs

Cf. A155874.

Programs

  • Maple
    isA002808 := proc(n) option remember; RETURN(n>= 4 and not isprime(n)) ; end: A155878:= proc(n) option remember; local a; if n = 0 then 4; else for a from procname(n-1)+1 do if isA002808(a) and isA002808(a+n) then RETURN(a) ; fi; od: fi; end: seq(A155878(n),n=0..100) ; # R. J. Mathar, Jan 31 2009

Extensions

Extended by R. J. Mathar, Jan 31 2009
Name edited by Jon E. Schoenfield, Jan 20 2019
Showing 1-2 of 2 results.