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

A298366 Even numbers n such that n-5 and n-3 are both composite.

Original entry on oeis.org

30, 38, 54, 60, 68, 80, 90, 96, 98, 120, 122, 124, 126, 128, 138, 146, 148, 150, 158, 164, 174, 180, 188, 190, 192, 206, 208, 210, 212, 218, 220, 222, 224, 240, 248, 250, 252, 258, 264, 270, 278, 290, 292, 294, 300, 302, 304, 306, 308, 324, 326, 328, 330, 332, 338, 344, 346, 348, 360, 366, 368, 374, 380
Offset: 1

Views

Author

David James Sycamore, Jan 17 2018

Keywords

Comments

The sequence displays runs of consecutive even integers, whose frequency and length are related to gaps between successive primes local to these numbers. Where primes are rare (large gaps), the runs of consecutive even integers are longer (run length proportional to gap size). Let p < q be consecutive primes such that g = q-p >= 6. A string of r consecutive terms differing by 2 will start at p+7, and continue to q+1, where r = (g-4)/2. Thus at prime gap 8 a string of 2 consecutive terms differing by 2 will occur, at gap 10 there will be 3, and at gap 30 there will be 13; and so on. As the gap size increases by 2 so the run length of consecutive even terms increases by 1. The first occurrence of run length m occurs at the term corresponding to 7 + A000230(m/2).
The terms in this sequence, combined with those in A297925 and A298252 form a partition of A005843(n); n >= 3; (nonnegative even numbers >= 6). This is because any even integer n >= 6 satisfies either: (i). n-3 is prime, (ii). n-5 is prime and n-3 is composite, or (iii). both n-5 and n-3 are composite.
For any n >= 1, A056240(a(n)) = A298615(n).

Examples

			30 is included because 30-5 = 25, and 30-3 = 27; both composite, and 30 is the smallest even number with this property, hence a(1)=30. Also, A056240(a(1)) = A056240(30) = 161 = A298615(1). 24 is not included because although 24 - 3 = 21, composite; 24 - 5 = 19, prime. 210 is in this sequence, since 205 and 207 are both composite. 113 is the first prime to have a gap 14 ahead of it. Therefore we would expect a run of (14 - 4)/2 = 5 consecutive terms to start at 7 + A000230(7) = 113 + 7 = 120; thus: 120,122,124,126,128. Likewise the first occurrence of run length 7 occurs at gap m = 2*7 + 4 = 18, namely the term corresponding to 7 + A000230(9) = 523 + 7 = 530; thus: 530,532,534,536,538,540,542.
		

Crossrefs

Programs

  • Magma
    [2*n: n in [8..200] | not IsPrime(2*n-5) and not IsPrime(2*n-3)]; // Vincenzo Librandi, Nov 16 2018
    
  • Maple
    N:=300:
    for n from 8 to N by 2 do
    if not isprime(n-5) and not isprime(n-3) then print(n);
    end if
    end do
  • Mathematica
    Rest[2 Select[Range[250], !PrimeQ[2 # - 5] && !PrimeQ[2 # - 3] &]] (* Vincenzo Librandi, Nov 16 2018 *)
    Select[Range[2,400,2],AllTrue[#-{3,5},CompositeQ]&] (* Harvey P. Dale, Jul 01 2025 *)
  • PARI
    select( is_A298366(n)=!(isprime(n-5)||isprime(n-3)||bitand(n,1)||n<9), [5..200]*2) \\ Last 2 conditions aren't needed if n > 4 and even. - M. F. Hasler, Nov 19 2018 and Apr 07 2020 after edit by Michel Marcus, Apr 04 2020

Formula

a(n) = A061673(n) + 4 = A269345(n) + 5. - M. F. Hasler, Nov 19 2018

A269345 Smaller of two consecutive odd numbers that are composites.

Original entry on oeis.org

25, 33, 49, 55, 63, 75, 85, 91, 93, 115, 117, 119, 121, 123, 133, 141, 143, 145, 153, 159, 169, 175, 183, 185, 187, 201, 203, 205, 207, 213, 215, 217, 219, 235, 243, 245, 247, 253, 259, 265, 273, 285, 287, 289, 295, 297, 299, 301, 303, 319, 321, 323, 325, 327, 333
Offset: 1

Views

Author

Waldemar Puszkarz, Feb 24 2016

Keywords

Comments

Analogous to A001359 for odd composite numbers (A071904).
Consists of numbers that cannot be the difference of two primes: an odd number m can be the difference of two primes only if m+2 is prime, which cannot be the case for any a(n) as a(n)+2 is composite.
Some terms form subsequences of perfect powers, e.g., A106564 (for squares) and A269346 (for cubes).
Any composite of the form 6k+1 (A016921) is a term: (6k+1)+2 = 3(2k+1) is both odd and composite as a product of two odd numbers, thus 6k+1, being odd, is a term if it is composite.

Examples

			25 belongs to this sequence because 27=25+2 is the next odd composite.
		

Crossrefs

Cf. A071904 (odd composites), A001359 (similar sequence for primes).
Cf. A061673.

Programs

  • Magma
    [n: n in [1..350]| not IsPrime(n) and not IsPrime(n+2) and n mod 2 eq 1]; // Vincenzo Librandi, Feb 28 2016
  • Mathematica
    Select[Range[450], OddQ[#]&& !PrimeQ[#]&&!PrimeQ[#+2]&]
  • PARI
    for(n=1, 450, n%2==1&&!isprime(n)&&!isprime(n+2)&&print1(n, ", "))
    

Formula

a(n) = A061673(n) - 1. - M. F. Hasler, Nov 18 2018

Extensions

Name edited by Michel Marcus, Jul 27 2023

A129820 List of pairs of consecutive nonprime odd numbers {m-1,m+1}.

Original entry on oeis.org

25, 27, 33, 35, 49, 51, 55, 57, 63, 65, 75, 77, 85, 87, 91, 93, 93, 95, 115, 117, 117, 119, 119, 121, 121, 123, 123, 125, 133, 135, 141, 143, 143, 145, 145, 147, 153, 155, 159, 161, 169, 171, 175, 177, 183, 185, 185, 187, 187, 189
Offset: 1

Views

Author

Roger L. Bagula, May 20 2007

Keywords

Crossrefs

Programs

  • Mathematica
    Flatten[Table[If[OddQ[n - 1] && PrimeQ[n - 1] == False && PrimeQ[n + 1] == False, {{n - 1}, {n + 1}}, {}], {n, 2, 200}]]
    Select[Partition[Range[1,201,2],2,1],NoneTrue[#,PrimeQ]&]//Flatten (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Apr 09 2019 *)

A355485 Primes p such that neither g-1 nor g+1 is prime, where g is the gap from p to the next prime.

Original entry on oeis.org

1327, 2477, 3137, 5531, 8467, 9973, 11213, 11743, 12011, 12163, 12347, 14897, 16007, 16493, 16703, 17257, 19087, 20297, 20443, 21433, 24443, 26267, 26513, 29033, 29501, 29683, 31193, 31907, 32653, 32843, 34549, 34781, 35543, 35771, 36161, 36497, 36947, 37061, 37747, 38993, 39581, 40361, 40433
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Jul 04 2022

Keywords

Comments

Primes prime(i) where A001223(i) is in A061673.

Examples

			a(3) = 3137 is a term because 3137 is prime, the next prime is 3163 = 3137+26, and neither 26-1 = 25 nor 26+1 = 27 is prime.
		

Crossrefs

Programs

  • Maple
    q:= 2:
    count:= 0:
    R:= NULL:
    while count < 100 do
      p:= q;
      q:= nextprime(q);
      g:= q-p;
      if not(isprime(g-1) or isprime(g+1)) then
         count:= count+1;
         R:= R, p
      fi
    od:
    R;
  • PARI
    isok(p) = if (isprime(p), my(g=nextprime(p+1)-p); !isprime(g-1) && !isprime(g+1)); \\ Michel Marcus, Jul 05 2022
Showing 1-4 of 4 results.