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.

A104278 Numbers m such that 2m+1 and 2m-1 are not primes.

Original entry on oeis.org

13, 17, 25, 28, 32, 38, 43, 46, 47, 58, 59, 60, 61, 62, 67, 71, 72, 73, 77, 80, 85, 88, 92, 93, 94, 101, 102, 103, 104, 107, 108, 109, 110, 118, 122, 123, 124, 127, 130, 133, 137, 143, 144, 145, 148, 149, 150, 151, 152, 160, 161, 162, 163, 164, 167, 170, 171, 172
Offset: 1

Views

Author

Alexandre Wajnberg, Apr 17 2005

Keywords

Comments

Complement of A147820. - Omar E. Pol, Nov 17 2008
m is in the sequence iff A177961(m)Vladimir Shevelev, May 16 2010

Examples

			a(1)=13 is the first number satisfying simultaneously the two rules.
		

Crossrefs

Intersection of A047845 and A104275.

Programs

  • Haskell
    a104278 n = a104278_list !! (n-1)
    a104278_list = [m | m <- [1..],
                        a010051' (2 * m - 1) == 0 && a010051' (2 * m + 1) == 0]
    -- Reinhard Zumkeller, Aug 04 2015
    
  • Mathematica
    Select[ Range[300], !PrimeQ[2# + 1] && !PrimeQ[2# - 1] &] (* Robert G. Wilson v, Apr 18 2005 *)
    Select[Range[300],NoneTrue[2#+{1,-1},PrimeQ]&] (* The program uses the NoneTrue function from Mathematica version 10 *)  (* Harvey P. Dale, Jul 07 2015 *)
  • PARI
    select( {is_A104278(n)=!isprime(2*n-1)&&!isprime(2*n+1)}, [1..222]) \\ M. F. Hasler, Apr 29 2024

Formula

a(n) = (A025583-1)/2. - Bill McEachen, Feb 05 2025

Extensions

More terms from Robert G. Wilson v, Apr 18 2005

A259826 Numbers n such that n is a multiple of 6 and both n-1 and n+1 are composite.

Original entry on oeis.org

120, 144, 186, 204, 216, 246, 288, 300, 324, 342, 414, 426, 474, 516, 528, 534, 552, 582, 624, 636, 666, 696, 714, 780, 792, 804, 816, 834, 846, 870, 894, 900, 924, 960, 1002, 1026, 1044, 1056, 1074, 1080, 1134, 1140, 1146, 1158, 1176, 1206, 1242, 1254, 1266, 1272, 1314, 1332, 1338, 1344, 1350
Offset: 1

Views

Author

Antonio Gimenez, Jul 05 2015

Keywords

Comments

From Brian Almond, Jun 23 2020: (Start)
For every prime gap g, there is a run of consecutive a(n) of length max{[(g+2)/6]-1,0}.
Gaps between successive a(n) correspond to clusters of primes all within +- 8 of each other. The number of primes within a gap G = a(n+1) - a(n) ranges from (G/6 - 1) to (G/6 - 1) plus the number of twin primes within the gap.
Record gaps in a(n) are 24 at a(1)=120, 42 at a(2)=144, 72 at a(10)=342 and 84 at a(1003)=14706 (the next gaps of 84 occur at a(43136164)=369008652 and a(643519601)=5244999552). No larger record gaps exist below 10^10 (n <= 1239026836).
(End)
Define a "small-gap k-tuple" to be an admissible k-tuple with all of its gaps in {2,4,6,8}. Every gap G = a(n+1) - a(n) >= 18 contains a small-gap k-tuple with k >= G/6 - 1 and diameter G-14, G-12 or G-10. For example, at n=40 the gap between 1080 and 1134 contains the 9-tuple p+{0,4,6,10,16,22,30,36,42} for p=1087. - Brian Almond, Jul 25 2020

Examples

			For n=120, 120 is a multiple of 6, and both 119 and 121 are composite.
		

Crossrefs

Intersection of A008588 and A099047. - Michel Marcus, Jul 06 2015
Cf. A060461.

Programs

  • Magma
    [n: n in [6..2000 by 6] | not IsPrime(n-1) and not IsPrime(n+1)]; // Vincenzo Librandi, Jul 08 2015
  • Mathematica
    Select[6*Range[500], AllTrue[# + {1, -1}, CompositeQ] &] (* Harvey P. Dale, May 21 2017 *)
  • PARI
    select(x->!isprime(x-1)&&!isprime(x+1), vector(10^3,j,6*j) ) \\ Joerg Arndt, Jul 06 2015
    

Formula

a(n) = 6 * A060461(n). - Brian Almond, Jun 22 2020

A285805 Prime numbers p such that 6*p-1 and 6*p+1 are composite numbers.

Original entry on oeis.org

31, 41, 71, 79, 89, 97, 139, 149, 167, 179, 191, 193, 211, 223, 251, 281, 307, 337, 349, 353, 401, 409, 419, 421, 431, 433, 479, 487, 491, 499, 509, 521, 541, 547, 563, 571, 587, 619, 631, 643, 659, 673, 677, 691, 701, 719, 739, 757, 769, 809
Offset: 1

Views

Author

Dimitris Valianatos, Apr 26 2017

Keywords

Crossrefs

Programs

  • Maple
    filter:= n -> isprime(n) and not isprime(6*n-1) and not isprime(6*n+1):
    select(filter, [seq(i,i=3..1000,2)]); # Robert Israel, Jan 05 2020
  • Mathematica
    Select[Prime@Range@150, ! PrimeQ[6 # - 1] && ! PrimeQ[6 # + 1] &] (* Robert G. Wilson v, Apr 27 2017 *)
    Select[Prime[Range[150]],NoneTrue[6#+{1,-1},PrimeQ]&] (* Harvey P. Dale, Jun 10 2022 *)
  • PARI
    {forprime(n=3, 1000, if(!isprime(6*n-1)&&!isprime(6*n+1), print1(n", ")))}

A174392 Neither n-1 nor n+1 is prime.

Original entry on oeis.org

0, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 26, 27, 29, 31, 33, 34, 35, 37, 39, 41, 43, 45, 47, 49, 50, 51, 53, 55, 56, 57, 59, 61, 63, 64, 65, 67, 69, 71, 73, 75, 76, 77, 79, 81, 83, 85, 86, 87, 89, 91, 92, 93, 94, 95, 97, 99, 101, 103, 105, 107, 109, 111, 113, 115, 116, 117, 118
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Mar 18 2010

Keywords

Comments

Union of {0} and A099047. [R. J. Mathar, Aug 09 2010]

Examples

			a(1)=0 because 0-1=-1 and 0+1=1 are nonprime; a(2)=5 because 5-1=4 and 5+1=6 are nonprime.
		

Crossrefs

Cf. A099047.

Programs

  • Mathematica
    Select[Range[0,150],!PrimeQ[#-1]&&!PrimeQ[#+1]&] (* Harvey P. Dale, Aug 15 2012 *)
    Join[{0},Mean/@SequencePosition[Table[If[PrimeQ[n],0,1],{n,200}],{1,x_,1}]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Nov 17 2019 *)

Extensions

Corrected by Charles R Greathouse IV, Mar 18 2010
Incorrect comment removed by Lambert Meertens, Sep 11 2024

A384876 Smallest number m such that both m-1 and m+1 are products of at least n (not necessarily distinct) primes.

Original entry on oeis.org

3, 5, 17, 55, 161, 1457, 2431, 13121, 101249, 153089, 2086399, 7991297, 65071999, 72630271, 2829746177, 2975006719, 68278476799, 75389157377, 159703334911, 1570258288639, 9714181341185, 91845775327231, 551785225781249, 2123044908695551, 4560483868737535, 4560483868737535, 424428773098651649
Offset: 1

Views

Author

Sinuhe Perea, Jun 12 2025

Keywords

Comments

The sequence is nondecreasing. - David A. Corneth, Jun 13 2025

Examples

			The smallest number surrounded by semiprime numbers is 5 (between 4 and 6).
And 17 lies between 16 = 2^4 and 18 = 2*3^2.
		

Crossrefs

Programs

  • Maple
    F:= proc(n) local pq,t,x,y,z,p,i,m;
      uses priqueue;
      initialize(pq);
          insert([-2^n, 2$n], pq);
      y:= -infinity; z:= -infinity;
        do
          t:= extract(pq);
          x:= -t[1];
          if x-y=2 or x-z=2 then return x-1 fi;
          z:= y; y:= x; m:= nops(t);
          if t[-1] = 2 then insert([2*t[1],2$m],pq) fi;
          p:= nextprime(t[-1]);
          for i from m to 2 by -1 while t[i] = t[-1] do
            insert([t[1]*(p/t[-1])^(m+1-i), op(t[2..i-1]), p$(m+1-i)], pq)
          od;
        od
    end proc:
    seq(F(i),i=1..20); # Robert Israel, Jun 12 2025
  • PARI
    a(n) = my(m=2); while((bigomega(m-1)Michel Marcus, Jun 13 2025

Extensions

a(10)-a(13) from Alois P. Heinz, Jun 12 2025
a(14)-a(20) from Robert Israel, Jun 12 2025
More terms from David A. Corneth, Jun 13 2025
Showing 1-5 of 5 results.