A014076 Odd nonprimes.
1, 9, 15, 21, 25, 27, 33, 35, 39, 45, 49, 51, 55, 57, 63, 65, 69, 75, 77, 81, 85, 87, 91, 93, 95, 99, 105, 111, 115, 117, 119, 121, 123, 125, 129, 133, 135, 141, 143, 145, 147, 153, 155, 159, 161, 165, 169, 171, 175, 177, 183, 185, 187, 189, 195, 201, 203, 205, 207
Offset: 1
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
Programs
-
Haskell
a014076 n = a014076_list !! (n-1) a014076_list = filter ((== 0) . a010051) a005408_list -- Reinhard Zumkeller, Sep 30 2011
-
Maple
remove(isprime, [seq(i,i=1..1000,2)]); # Robert Israel, May 25 2016 for n from 0 to 120 do if irem(factorial(2*n), 2*n+1) = 0 then print(2*n+1) end if; end do: # Peter Bala, Jan 24 2017
-
Mathematica
Select[Range@210, !PrimeQ@ # && OddQ@ # &] (* Robert G. Wilson v, Sep 22 2008 *) Select[Range[1, 199, 2], PrimeOmega[#] != 1 &] (* Alonso del Arte, Nov 19 2012 *)
-
PARI
is(n)=n%2 && !isprime(n) \\ Charles R Greathouse IV, Nov 24 2012
-
Python
from sympy import primepi def A014076(n): if n == 1: return 1 m, k = n-1, primepi(n) + n - 1 + (n>>1) while m != k: m, k = k, primepi(k) + n - 1 + (k>>1) return m # Chai Wah Wu, Jul 31 2024
Formula
a(n) ~ 2n. - Charles R Greathouse IV, Jul 02 2013
(a(n+2)-1)/2 - pi(a(n+2)-1) = n. - Anthony Browne, May 25 2016. Proof from Robert Israel: This follows by induction on n. If f(n) = (a(n+2)-1)/2 - pi(a(n+2)-1), one can show f(n+1) - f(n) = 1 (there are three cases to consider, depending on primeness of a(n+2) + 2 and a(n+2) + 4).
Comments