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-10 of 12 results. Next

A024898 Positive integers k such that 6*k - 1 is prime.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 8, 9, 10, 12, 14, 15, 17, 18, 19, 22, 23, 25, 28, 29, 30, 32, 33, 38, 39, 40, 42, 43, 44, 45, 47, 49, 52, 53, 58, 59, 60, 64, 65, 67, 70, 72, 74, 75, 77, 78, 80, 82, 84, 85, 87, 93, 94, 95, 98, 99, 100, 103, 107, 108, 109, 110, 113, 114, 117, 120, 124, 127, 129, 133
Offset: 1

Views

Author

Keywords

Comments

Actual primes are A007528.
Number of terms less than 10^r, r=1,2,3,...: 8, 56, 397, 3040, 24571, 206502, 1781237, ... - Muniru A Asiru, Jan 26 2018

Crossrefs

Cf. A007528, A046953 (complement).

Programs

  • GAP
    Filtered([1..1000], k->IsPrime(6*k-1)); # Muniru A Asiru, Jan 26 2018
  • Magma
    [n: n in [0..1000]| IsPrime(6*n-1)]; // Vincenzo Librandi, Nov 20 2010
    
  • Maple
    select(k -> isprime(6*k-1), [$1..10^3]); # Muniru A Asiru, Jan 26 2018
  • Mathematica
    Select[Range[150], PrimeQ[6 # - 1] &] (* Bruno Berselli, Jul 14 2014 *)

A067611 Numbers of the form 6xy +- x +- y, where x, y are positive integers.

Original entry on oeis.org

4, 6, 8, 9, 11, 13, 14, 15, 16, 19, 20, 21, 22, 24, 26, 27, 28, 29, 31, 34, 35, 36, 37, 39, 41, 42, 43, 44, 46, 48, 49, 50, 51, 53, 54, 55, 56, 57, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 71, 73, 74, 75, 76, 78, 79, 80, 81, 82, 83, 84, 85, 86, 88, 89, 90, 91, 92, 93, 94
Offset: 1

Views

Author

Jon Perry, Feb 01 2002

Keywords

Comments

Equivalently, numbers n such that either 6n-1 or 6n+1 is composite (or both are).
Numbers k such that 36*k^2 - 1 is not a product of twin primes. - Artur Jasinski, Dec 12 2007
Apart from initial zero, union of A046953 and A046954. - Reinhard Zumkeller, Jul 13 2014
From Bob Selcoe, Nov 18 2014: (Start)
Complementary sequence to A002822.
For all k >= 1, a(n) are the only positive numbers congruent to the following residue classes:
f == k (mod 6k+-1);
g == (5k-1) (mod 6k-1);
h == (5k+1) (mod 6k+1).
All numbers in classes g and h will be in this sequence; for class f, the quotient must be >= 1.
When determining which numbers are contained in this sequence, it is only necessary to evaluate f, g and h when the moduli are prime and the dividends are >= 2*k*(3*k - 1) (i.e., A033579(k)).
(End)
From Jason Kimberley, Oct 14 2015: (Start)
Numbers n such that A001222(A136017(n)) > 2.
The disjoint union of A060461, A121763, and A121765.
(End)
From Ralf Steiner, Aug 08 2018 (Start)
Conjecture 1: With u(k) = floor(k(k + 1)/4) one has A071538(a(u(k))*6) = a(u(k)) - u(k) + 1, for k >= 2 (u > 1).
Conjecture 2: In the interval [T(k-1)+1, T(k)], with T(k) = A000217(k), k >= 2, there exists at least one number that is not a member of the present sequence. (End)
Also: numbers of the form n*p +- round(p/6) with some positive integer n and prime p >= 5. [Proof available on demand.] - M. F. Hasler, Jun 25 2019

Examples

			4 = 6ab - a - b with a = 1, b = 1.
6 = 6ab + a - b or 6ab - a + b with a = 1, b = 1.
5 cannot be obtained by any values of a and b in 6ab - a - b, 6ab - a + b, 6ab + a - b or 6ab + a + b.
		

Crossrefs

Cf. A323674 (numbers 6xy +- x +- y including repetitions). - Sally Myers Moite, Jan 27 2019

Programs

  • GAP
    Filtered([1..120], k-> not IsPrime(6*k-1) or not IsPrime(6*k+1)) # G. C. Greubel, Feb 21 2019
  • Haskell
    a067611 n = a067611_list !! (n-1)
    a067611_list = map (`div` 6) $
       filter (\x -> a010051' (x-1) == 0 || a010051' (x+1) == 0) [6,12..]
    -- Reinhard Zumkeller, Jul 13 2014
    
  • Magma
    [n: n in [1..100] | not IsPrime(6*n-1) or not IsPrime(6*n+1)]; // Vincenzo Librandi, Nov 19 2014
    
  • Maple
    filter:= n -> not isprime(6*n+1) or not isprime(6*n-1):
    select(filter, [$1..1000]); # Robert Israel, Nov 18 2014
  • Mathematica
    Select[Range[100], !PrimeQ[6# - 1] || !PrimeQ[6# + 1] &]
    Select[Range[100],AnyTrue[6#+{1,-1},CompositeQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Oct 05 2019 *)
  • PARI
    for(n=1, 1e2, if(!isprime(6*n+1) || !isprime(6*n-1), print1(n", "))) \\ Altug Alkan, Nov 10 2015
    
  • Sage
    [n for n in (1..120) if not is_prime(6*n-1) or not is_prime(6*n+1)] # G. C. Greubel, Feb 21 2019
    

Extensions

Edited by Robert G. Wilson v, Feb 05 2002
Edited by Dean Hickerson, May 07 2002

A060461 Numbers k such that 6*k-1 and 6*k+1 are twin composites.

Original entry on oeis.org

20, 24, 31, 34, 36, 41, 48, 50, 54, 57, 69, 71, 79, 86, 88, 89, 92, 97, 104, 106, 111, 116, 119, 130, 132, 134, 136, 139, 141, 145, 149, 150, 154, 160, 167, 171, 174, 176, 179, 180, 189, 190, 191, 193, 196, 201, 207, 209, 211, 212, 219, 222, 223, 224, 225, 226
Offset: 1

Views

Author

Lekraj Beedassy, Apr 09 2001

Keywords

Comments

A counterpart to A002822, which generates twin primes.
Intersection of A046953 and A046954. - Michel Marcus, Sep 27 2013
All terms can be expressed as (6ab+a+b OR 6cd-c-d) AND (6xy+x-y) for a,b,c,d,x,y positive integers. Example: 20=6*2*2-2-2 AND 20=6*3*1+3-1. - Pedro Caceres, Apr 21 2019

Examples

			a(9) = 57: the 9th twin composites among the odds are { 6*57-1, 6*57+1 }, i.e., (341, 343) or (11*31, 7^3).
		

Crossrefs

Programs

  • MATLAB
    i=1:10000;
    Q1 = 6*i-1;
    Q2 = 6*i+1;
    Q = union(Q1,Q2);
    P = primes(max(Q));
    AT = setxor(Q,P);
    f = 0;
    for j=1:numel(AT);
        K = AT(j);
        K2 = K+2;
        z = ismember(K2,AT);
        if z == 1;
            f = f+1;
            ATR(f,:) = K + 1;
        end
    end
    m6 = ATR./6;
    % Jesse H. Crotts, Sep 05 2016
    
  • Maple
    iscomp := proc(n) if n=1 or isprime(n) then RETURN(0) else RETURN(1) fi: end: for n from 1 to 500 do if iscomp(6*n-1)=1 and iscomp(6*n+1)=1 then printf(`%d,`,n) fi: od: # James Sellers, Apr 11 2001
  • Mathematica
    Select[Range[200], !PrimeQ[6#-1]&&!PrimeQ[6#+1]&] (* Vladimir Joseph Stephan Orlovsky, Aug 07 2008 *)
    Select[Range[300],AllTrue[6#+{1,-1},CompositeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Feb 15 2015 *)
    Select[Range@ 300, Times @@ Boole@ Map[CompositeQ, 6 # + {1, -1}] > 0 &] (* Michael De Vlieger, Sep 14 2016 *)
  • PARI
    A060461()={my(maxx=5000); n=1; ctr=0; while(ctrBill McEachen, Apr 04 2015
    
  • Python
    from sympy import isprime; from sys import maxsize as oo
    is_A060461 = lambda n: not (isprime(n*6-1) or isprime(n*6+1))
    def A060461(n = None, first = oo, start = 1, end = oo):
        "Return the n-th term or a generator of up to 'first' terms less than 'end', starting at 'start'."
        if n: first = n
        seq = (m for m,_ in zip(filter(is_A060461, range(start,end)), range(first)))
        return max(seq) if n else seq
    list(A060461(first=20)) # M. F. Hasler, Jul 10 2025

Formula

a(n) ~ n. More specifically, there are x - x/log x + O(x/log^2 x) terms of the sequence up to x. - Charles R Greathouse IV, Mar 03 2020
a(n) = A259826(n)/6. - M. F. Hasler, Jul 10 2025

Extensions

More terms from James Sellers, Apr 11 2001

A046954 Numbers k such that 6*k + 1 is nonprime.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Equals A171696 U A121763; A121765 U A171696 = A046953; A121763 U A121765 = A067611 where A067611 U A002822 U A171696 = A001477. - Juri-Stepan Gerasimov, Feb 13 2010, Feb 15 2010
These numbers (except 0) can be written as 6xy +-(x+y) for x > 0, y > 0. - Ron R Spencer, Aug 01 2016

Examples

			a(2)=8 because 6*8 + 1 = 49, which is composite.
		

Crossrefs

Cf. A047845 (2n+1), A045751 (4n+1), A127260 (8n+1).
Cf. A046953, A008588, A016921, subsequence of A067611, complement of A024899.

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

A121765 Numbers n such that 6*n-1 is composite while 6*n+1 is prime.

Original entry on oeis.org

6, 11, 13, 16, 21, 26, 27, 35, 37, 46, 51, 55, 56, 61, 62, 63, 66, 68, 73, 76, 81, 83, 90, 91, 96, 101, 102, 105, 112, 115, 118, 121, 122, 123, 125, 126, 128, 131, 142, 146, 151, 153, 156, 161, 165, 166, 168, 173, 178, 181, 186, 187, 188, 195, 200, 202, 206, 208, 216
Offset: 1

Views

Author

Lekraj Beedassy, Aug 20 2006

Keywords

Comments

Entries in A046953 which are not in A060461 or equivalently, entries in A024899 which are not in A002822.

Crossrefs

Cf. A121764.

Programs

  • GAP
    Filtered([1..250], k-> not IsPrime(6*k-1) and IsPrime(6*k+1)); # G. C. Greubel, Feb 20 2019
  • Magma
    [n: n in [1..250] | not IsPrime(6*n-1) and  IsPrime(6*n+1)]; // G. C. Greubel, Feb 20 2019
    
  • Mathematica
    Select[Range[250], ! PrimeQ[6# - 1] && PrimeQ[6# + 1] &] (* Ray Chandler, Aug 22 2006 *)
  • PARI
    for(n=1, 250, if(!isprime(6*n-1) && isprime(6*n+1), print1(n", "))) \\ G. C. Greubel, Feb 20 2019
    
  • Sage
    [n for n in (1..250) if not is_prime(6*n-1) and  is_prime(6*n+1)] # G. C. Greubel, Feb 20 2019
    

Extensions

Extended by Ray Chandler, Aug 22 2006

A059324 Numbers n such that 6n + 5 is composite.

Original entry on oeis.org

5, 10, 12, 15, 19, 20, 23, 25, 26, 30, 33, 34, 35, 36, 40, 45, 47, 49, 50, 53, 54, 55, 56, 60, 61, 62, 65, 67, 68, 70, 72, 75, 78, 80, 82, 85, 87, 88, 89, 90, 91, 95, 96, 100, 101, 103, 104, 105, 110, 111, 114, 115, 117, 118, 120, 121, 122, 124, 125, 127, 129, 130
Offset: 1

Views

Author

Anton Joha, Jan 26 2001

Keywords

Comments

Conjecture: There exists no pair of primes (p, q > p^2) such that q - p^2 = 6*n - 4 (see A138479). - Philippe LALLOUET (philip.lallouet(AT)orange.fr), Mar 20 2008

Examples

			a(3) = 12 because 6*12 + 5 = 77 is composite.
		

Crossrefs

Complement of A059325.
Cf. A138479.

Programs

  • Mathematica
    Select[Range[200],!PrimeQ[6#+5]&]  (* Harvey P. Dale, Mar 13 2011 *)
  • PARI
    isok(n) = ! isprime(6*n+5); \\ Michel Marcus, Jan 06 2017

Formula

a(n) = A046953(n-1) - 1.

Extensions

More terms from Henry Bottomley, Jan 29 2001

A070043 Numbers of the form 6*j*k+j+k for positive integers j and k.

Original entry on oeis.org

8, 15, 22, 28, 29, 36, 41, 43, 50, 54, 57, 60, 64, 67, 71, 78, 79, 80, 85, 92, 93, 98, 99, 104, 106, 113, 117, 119, 120, 127, 129, 132, 134, 136, 141, 145, 148, 154, 155, 158, 160, 162, 169, 171, 174, 176, 179, 183, 184, 190, 191, 193, 197, 204, 210, 211, 212
Offset: 1

Views

Author

Jon Perry, May 05 2002

Keywords

Comments

Equivalently, numbers r such that 6*r+1 has a nontrivial factor == 1 (mod 6).
These numbers, together with numbers of the form 6*j*k-j-k (A070799) are the numbers s for which 6*s+1 is composite (A046954). If we also add in the numbers of the form 6*j*k+j-k (A046953), we get the numbers t such that 6*t-1 and 6*t+1 do not form a pair of twin primes (A067611).
If N is the set of natural numbers, then the set N-{A070043 U A070799} are the numbers k that make 6*k+1 prime. - Pedro Caceres, Jan 22 2018

Examples

			41 = 6*2*3 + 2 + 3. Equivalently, 6*41+1 = (6*2+1)*(6*3+1).
		

Crossrefs

Programs

  • Mathematica
    Select[Range[250], MemberQ[Mod[Take[Divisors[6#+1], {2, -2}], 6], 1]&]

Extensions

Edited by Dean Hickerson and Vladeta Jovovic, May 07 2002

A153245 Numbers n>1 such that 6*n-7 is not prime.

Original entry on oeis.org

7, 12, 14, 17, 21, 22, 25, 27, 28, 32, 35, 36, 37, 38, 42, 47, 49, 51, 52, 55, 56, 57, 58, 62, 63, 64, 67, 69, 70, 72, 74, 77, 80, 82, 84, 87, 89, 90, 91, 92, 93, 97, 98, 102, 103, 105, 106, 107, 112, 113, 116, 117, 119, 120, 122, 123, 124, 126, 127, 129, 131, 132, 133
Offset: 1

Views

Author

Vincenzo Librandi, Dec 21 2008

Keywords

Comments

One more than the associated value in A046953. - R. J. Mathar, Jan 05 2011

Examples

			Distribution of the terms in the following triangular array:
*;
*,*;
*,7,*;
*,*,*,*;
*,*,14,*,*;
*,12,*,*,25,*;
*, *,*,*,*, *,*;
*,*,21,*,*,38,*,*;
*,17,*,*,36,*,*,55,*;
*,*, *,*,*, *,*,*, *,*;
*,*,28,*,*,51,*,*,74,*,*;
*,22,*,*,47,*,*,72,*,*,97,*; etc.
where * marks the non-integer values of (2*h*k + k + h + 4)/3 with h >= k >= 1. - _Vincenzo Librandi_, Jan 17 2013
		

Crossrefs

Programs

  • Magma
    [n: n in [2..150] | not IsPrime(6*n - 7)]; // Vincenzo Librandi, Jan 12 2013
  • Mathematica
    Select[Range[2, 200], !PrimeQ[6 # - 7] &] (* Vincenzo Librandi, Jan 12 2013 *)

Extensions

More terms from Vladimir Joseph Stephan Orlovsky, Dec 23 2008

A070799 Numbers of the form 6jk-j-k.

Original entry on oeis.org

4, 9, 14, 19, 20, 24, 29, 31, 34, 39, 42, 44, 48, 49, 53, 54, 59, 64, 65, 69, 74, 75, 79, 82, 84, 86, 88, 89, 94, 97, 99, 104, 108, 109, 111, 114, 116, 119, 124, 129, 130, 133, 134, 139, 140, 141, 144, 149, 150, 152, 154, 157, 159, 163, 164, 167, 169, 174, 179, 180
Offset: 1

Views

Author

Jon Perry, May 05 2002

Keywords

Comments

Equivalently, numbers n such that 6n+1 has a factor == 5 (mod 6).
These numbers, together with numbers of the form 6jk+j+k (A070043) are the numbers n for which 6n+1 is composite (A046954). If we also add in the numbers of the form 6jk+j-k (A046953), we get the numbers n such that 6n-1 and 6n+1 do not form a pair of twin primes (A067611).

Examples

			31 = 6*2*3 - 2 - 3. Equivalently, 6*31+1 = (6*2-1)*(6*3-1).
		

Crossrefs

Programs

  • Mathematica
    Select[Range[250], MemberQ[Mod[Take[Divisors[6#+1], {2, -2}], 6], 5]&]

Extensions

Edited by Dean Hickerson, May 07 2002

A173229 a(n) is the n-th number m such that 6m-1 is composite minus the n-th number k such that 6k+1 is composite.

Original entry on oeis.org

2, 3, 4, 2, 5, 2, 4, 4, 3, 3, 5, 4, 2, 1, 2, 5, 6, 7, 7, 6, 6, 6, 4, 7, 5, 4, 6, 4, 4, 4, 4, 5, 5, 6, 5, 7, 8, 7, 6, 6, 6, 8, 8, 9, 9, 10, 8, 8, 12, 8, 9, 8, 9, 8, 8, 8, 7, 8, 7, 8, 6, 4, 3, 4, 4, 6, 7, 6, 6, 6, 8, 6, 6, 5, 5, 6, 8, 7, 10, 9, 9, 9, 11, 11, 11, 12, 11, 10, 9, 7, 10, 8, 8, 6, 6, 6, 4, 5, 5, 7
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Feb 13 2010, Feb 14 2010

Keywords

Comments

A046953 U A046954(without zero) = A067611 where A067611 U A002822 U A171696 = A001477.

Examples

			a(1) = 6 - 4 = 2;
a(2) = 11 - 8 = 3;
a(3) = 13 - 9 = 4.
		

Crossrefs

Programs

  • Maple
    A046953 := proc(n) if n = 1 then 6 ; else for a from procname(n-1)+1 do if not isprime(6*a-1) then return a; end if; end do: end if; end proc:
    A046954 := proc(n) if n = 1 then 0 ; else for a from procname(n-1)+1 do if not isprime(6*a+1) then return a; end if; end do: end if; end proc:
    A173229 := proc(n) A046953(n)-A046954(n+1) ; end proc:
    seq(A173229(n),n=1..120) ; # R. J. Mathar, May 02 2010

Formula

a(n) = A046953(n) - A046954(n+1).

Extensions

Corrected from a(63) onwards by R. J. Mathar, May 02 2010
Showing 1-10 of 12 results. Next