A046954 Numbers k such that 6*k + 1 is nonprime.
0, 4, 8, 9, 14, 15, 19, 20, 22, 24, 28, 29, 31, 34, 36, 39, 41, 42, 43, 44, 48, 49, 50, 53, 54, 57, 59, 60, 64, 65, 67, 69, 71, 74, 75, 78, 79, 80, 82, 84, 85, 86, 88, 89, 92, 93, 94, 97, 98, 99, 104, 106, 108, 109, 111, 113, 114, 116, 117, 119, 120, 124, 127, 129, 130, 132, 133, 134, 136, 139, 140
Offset: 1
Keywords
Examples
a(2)=8 because 6*8 + 1 = 49, which is composite.
Links
- Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Crossrefs
Programs
-
GAP
Filtered([0..250], k-> not IsPrime(6*k+1)) # G. C. Greubel, Feb 21 2019
-
Haskell
a046954 n = a046954_list !! (n-1) a046954_list = map (`div` 6) $ filter ((== 0) . a010051' . (+ 1)) [0,6..] -- Reinhard Zumkeller, Jul 13 2014
-
Magma
[n: n in [0..250] | not IsPrime(6*n+1)]; // G. C. Greubel, Feb 21 2019
-
Maple
remove(k-> isprime(6*k+1), [$0..140])[]; # Muniru A Asiru, Feb 22 2019
-
Mathematica
a = Flatten[Table[If[PrimeQ[6*n + 1] == False, n, {}], {n, 0, 50}]] (* Roger L. Bagula, May 17 2007 *) Select[Range[0, 200], !PrimeQ[6 # + 1] &] (* Vincenzo Librandi, Sep 27 2013 *)
-
PARI
is(n)=!isprime(6*n+1) \\ Charles R Greathouse IV, Aug 01 2016
-
Sage
[n for n in (0..250) if not is_prime(6*n+1)] # G. C. Greubel, Feb 21 2019
Extensions
Edited by N. J. A. Sloane, Aug 08 2008 at the suggestion of R. J. Mathar
Corrected by Juri-Stepan Gerasimov, Feb 13 2010, Feb 15 2010
Corrected by Vincenzo Librandi, Sep 27 2013
Comments