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 10 results.

A024899 Numbers k such that 6*k + 1 is prime.

Original entry on oeis.org

1, 2, 3, 5, 6, 7, 10, 11, 12, 13, 16, 17, 18, 21, 23, 25, 26, 27, 30, 32, 33, 35, 37, 38, 40, 45, 46, 47, 51, 52, 55, 56, 58, 61, 62, 63, 66, 68, 70, 72, 73, 76, 77, 81, 83, 87, 90, 91, 95, 96, 100, 101, 102, 103, 105, 107, 110, 112, 115, 118, 121, 122, 123, 125, 126, 128, 131, 135, 137
Offset: 1

Views

Author

Keywords

Comments

For all elements of this sequence there are no (x,y) positive integers such that a(n)=6*x*y+x+y or a(n)=6*x*y-x-y. - Pedro Caceres, Apr 19 2019

Crossrefs

A002476 gives primes, A091178 gives prime index.
Complement of A046954 relative to A000027.

Programs

  • Magma
    [n: n in [0..200]| IsPrime(6*n+1)] // Vincenzo Librandi, Nov 20 2010
    
  • Maple
    a := [ ]: for n from 0 to 400 do if isprime(6*n+1) then a := [ op(a), n ]; fi; od: A002476 := n->a[n];
  • Mathematica
    Select[Range@ 140, PrimeQ[6 # + 1] &] (* Michael De Vlieger, Jan 23 2018 *)
  • PARI
    select(n->n%6==1,primes(100))\6 \\ Charles R Greathouse IV, Apr 28 2015

Formula

a(n) = A024892(n)/2 = (A034936(n)+1)/2. - Ray Chandler, Dec 26 2003
a(n) = (A002476(n)-1)/6. - Zak Seidov, Aug 31 2016

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

A046953 Numbers k such that 6*k - 1 is composite.

Original entry on oeis.org

6, 11, 13, 16, 20, 21, 24, 26, 27, 31, 34, 35, 36, 37, 41, 46, 48, 50, 51, 54, 55, 56, 57, 61, 62, 63, 66, 68, 69, 71, 73, 76, 79, 81, 83, 86, 88, 89, 90, 91, 92, 96, 97, 101, 102, 104, 105, 106, 111, 112, 115, 116, 118, 119, 121, 122, 123, 125, 126, 128
Offset: 1

Views

Author

Keywords

Comments

These numbers can be written as 6*x*y + x - y for x > 0, y > 0. - Ron R Spencer, Aug 01 2016

Examples

			a(1)=6 because 6*6 - 1 = 35, which is composite.
		

Crossrefs

Cf. A046954, A008588, A016969, subsequence of A067611.
Cf. A024898 (complement).

Programs

  • GAP
    Filtered([1..200], k-> not IsPrime(6*k-1)) # G. C. Greubel, Feb 21 2019
  • Haskell
    a046953 n = a046953_list !! (n-1)
    a046953_list = map (`div` 6) $
       filter ((== 0) . a010051' . subtract 1) [6,12..]
    -- Reinhard Zumkeller, Jul 13 2014
    
  • Magma
    [n: n in [1..200] | not IsPrime(6*n-1)]; // G. C. Greubel, Feb 21 2019
    
  • Maple
    remove(k-> isprime(6*k-1), [$1..130])[]; # Muniru A Asiru, Feb 22 2019
  • Mathematica
    Select[Range[200],!PrimeQ[6#-1]&] (* Vladimir Joseph Stephan Orlovsky, Feb 25 2011 *)
  • PARI
    is(n)=!isprime(6*n-1) \\ Charles R Greathouse IV, Aug 01 2016
    
  • Sage
    [n for n in (1..200) if not is_prime(6*n-1)] # G. C. Greubel, Feb 21 2019
    

Formula

a(n) ~ n. - Charles R Greathouse IV, Aug 01 2016

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

Original entry on oeis.org

4, 8, 9, 14, 15, 19, 22, 28, 29, 39, 42, 43, 44, 49, 53, 59, 60, 64, 65, 67, 74, 75, 78, 80, 82, 84, 85, 93, 94, 98, 99, 108, 109, 113, 114, 117, 120, 124, 127, 129, 133, 140, 144, 148, 152, 155, 157, 158, 159, 162, 163, 164, 169, 183, 184, 185, 194, 197, 198, 199
Offset: 1

Views

Author

Lekraj Beedassy, Aug 20 2006

Keywords

Comments

Entries of A024898 which are not in A002822 or equivalently, entries of A046954 which are not in A060461.

Crossrefs

Programs

  • GAP
    Filtered([1..250], k-> IsPrime(6*k-1) and not IsPrime(6*k+1)); # G. C. Greubel, Feb 20 2019
  • Magma
    [n: n in [1..250] | IsPrime(6*n-1) and not IsPrime(6*n+1)]; // G. C. Greubel, Feb 20 2019
    
  • Mathematica
    Select[Range[200], 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 is_prime(6*n-1) and not is_prime(6*n+1)] # G. C. Greubel, Feb 20 2019
    

Extensions

Extended by Ray Chandler, Aug 22 2006

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

A153219 Numbers n such that 6*n + 7 is not prime.

Original entry on oeis.org

3, 7, 8, 13, 14, 18, 19, 21, 23, 27, 28, 30, 33, 35, 38, 40, 41, 42, 43, 47, 48, 49, 52, 53, 56, 58, 59, 63, 64, 66, 68, 70, 73, 74, 77, 78, 79, 81, 83, 84, 85, 87, 88, 91, 92, 93
Offset: 1

Views

Author

Vincenzo Librandi, Dec 21 2008

Keywords

Comments

One less than the associated entry in A046954. - R. J. Mathar, Jan 05 2011

Examples

			Distribution of the terms in the following triangular array:
*;
*,3;
*,*,7;
*,*,*,*;
*,8,*,*,19;
*,*,14,*,*,27;
*,*, *,*,*, *,*;
*,13,*,*,30,*,*,47;
*,*,21,*,*,40,*,*,59;
*,*,*, *,*, *,*,*, *,*;
*,18,*,*,41,*,*,64,*,*,87;
*,*,28,*,*,53,*,*,78,*,*,103; etc.
where * marks the non-integer values of (2*h*K + k + h - 3)/3 with h >= k >= 1. - _Vincenzo Librandi_, Jan 15 2013
		

Crossrefs

Cf. A153218.

Programs

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

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

A173231 a(n) is the n-th number m such that 6*m-1 is composite plus the n-th number k such that 6*k+1 is composite.

Original entry on oeis.org

10, 19, 22, 30, 35, 40, 44, 48, 51, 59, 63, 66, 70, 73, 80, 87, 90, 93, 95, 102, 104, 106, 110, 115, 119, 122, 126, 132, 134, 138, 142, 147, 153, 156, 161, 165, 168, 171, 174, 176, 178, 184, 186, 193, 195, 198, 202, 204, 210, 216, 221, 224, 227, 230, 234, 236
Offset: 1

Views

Author

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

Keywords

Comments

Examples

			a(1) = 6 + 4 = 10;
a(2) = 11 + 8 = 19;
a(3) = 13 + 9 = 22.
		

Crossrefs

Programs

  • GAP
    A046953:=Filtered([1..250], k-> not IsPrime(6*k-1));;
    A046954:=Filtered([0..250], n-> not IsPrime(6*n+1));;
    Print(List([1..80], j->A046953[j]+A046954[j+1])); # G. C. Greubel, Feb 21 2019
  • Magma
    A046953:=[n: n in [1..250] | not IsPrime(6*n-1)];
    A046954:=[n: n in [0..250] | not IsPrime(6*n+1)];
    [A046953[n] + A046954[n+1]: n in [1..80]]; // G. C. Greubel, Feb 21 2019
    
  • 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:
    A173231 := proc(n) A046953(n)+A046954(n+1) ; end proc:
    seq(A173231(n),n=1..120) ; # R. J. Mathar, May 02 2010
  • Mathematica
    A046953:= Select[Range[250], !PrimeQ[6#-1] &];
    A046954:= Select[Range[0, 250], !PrimeQ[6#+1] &];
    Table[A046953[[n]] +A046954[[n+1]], {n,1,80}]
  • Sage
    A046953=[n for n in (1..250) if not is_prime(6*n-1)];
    A046954=[n for n in (0..250) if not is_prime(6*n+1)];
    [A046953[n] + A046954[n+1] for n in (0..80)] # G. C. Greubel, Feb 21 2019
    

Formula

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

Extensions

Entries checked by R. J. Mathar, May 02 2010
Showing 1-10 of 10 results.