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.

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