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-6 of 6 results.

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

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

A121762 Single (or isolated or non-twin) primes of form 6n-1.

Original entry on oeis.org

23, 47, 53, 83, 89, 113, 131, 167, 173, 233, 251, 257, 263, 293, 317, 353, 359, 383, 389, 401, 443, 449, 467, 479, 491, 503, 509, 557, 563, 587, 593, 647, 653, 677, 683, 701, 719, 743, 761, 773, 797, 839, 863, 887, 911, 929, 941, 947, 953, 971, 977, 983, 1013
Offset: 1

Views

Author

Lekraj Beedassy, Aug 20 2006

Keywords

Comments

Subsequence of A007528. - Michel Marcus, Apr 26 2015

Crossrefs

Programs

  • Magma
    [n: n in [1..1050] | (n mod 6 eq 5) and not IsPrime(n+2) and  IsPrime(n)]; // G. C. Greubel, Feb 26 2019
    
  • Mathematica
    Select[Table[6n - 1, {n, 200}], PrimeQ[ # ] && ! PrimeQ[ # + 2] &] (* Ray Chandler, Aug 22 2006 *)
  • PARI
    is(n)=n%6==5 && isprime(n) && !isprime(n+2) \\ Charles R Greathouse IV, Apr 04 2016
    
  • Sage
    [n for n in (1..1050) if mod(n,6)==5 and not is_prime(n+2) and  is_prime(n)] # G. C. Greubel, Feb 26 2019

Extensions

Extended by Ray Chandler, Aug 22 2006

A172054 n-th number k such that 6*k-1 is composite while 6*k+1 is prime minus n-th number m such that 6*m-1 is prime while 6*m+1 is composite.

Original entry on oeis.org

2, 3, 4, 2, 6, 7, 5, 7, 8, 7, 9, 12, 12, 12, 9, 4, 6, 4, 8, 9, 7, 8, 12, 11, 14, 17, 17, 12, 18, 17, 19, 13, 13, 10, 11, 9, 8, 7, 15, 17, 18, 13, 12, 13, 13, 11, 11, 15, 19, 19, 23, 23, 19, 12, 16, 17, 12, 11, 18, 22, 27, 29, 27, 27, 25, 18, 27, 28, 23, 22, 23, 17, 21, 24, 23, 23, 30
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jan 24 2010

Keywords

Comments

Are there negative terms?
The entries are positive for at least the first 250000 terms. - R. J. Mathar, May 22 2010

Examples

			The number 6 is the first integer k such that 6*k-1 is composite while 6*k+1 is prime, the number 4 is the first integer m such that 6*m -1 is prime while 6*m+1 is composite, so, 2 = 6 - 4 is the first term a(1) of this sequence. - _Bernard Schott_, Feb 18 2019
		

Crossrefs

Programs

  • GAP
    L:=500;;
    K:=Filtered([1..L],k-> not IsPrime(6*k-1) and IsPrime(6*k+1));;
    M:=Filtered([1..L],m-> not IsPrime(6*m+1) and IsPrime(6*m-1));;
    a:=List([1..Length(K)],i->K[i]-M[i]);; Print(a); # Muniru A Asiru, Feb 19 2019
    
  • Magma
    A121765:=[n: n in [1..350] | not IsPrime(6*n-1) and  IsPrime(6*n+1)];
    A121763:=[n: n in [1..350] | IsPrime(6*n-1) and not IsPrime(6*n+1)];
    [A121765[n] - A121763[n]: n in [1..80]]; // G. C. Greubel, Feb 20 2019
    
  • Maple
    A121765 := proc(n) option remember; if n = 1 then 6; else for a from procname(n-1)+1 do if 6*a-1 >=4 and not isprime(6*a-1) and isprime(6*a+1) then return a; end if; end do; end if; end proc:
    A121763 := proc(n) option remember; if n = 1 then 4; else for a from procname(n-1)+1 do if 6*a+1 >=4 and not isprime(6*a+1) and isprime(6*a-1) then return a; end if; end do; end if; end proc:
    A172054 := proc(n) A121765(n)-A121763(n) ; end proc:
    seq(A172054(n),n=1..120) ; # R. J. Mathar, May 22 2010
  • Mathematica
    A121765:= Select[Range[350], !PrimeQ[6#-1] && PrimeQ[6#+1] &];
    A121763:= Select[Range[350], PrimeQ[6#-1] && !PrimeQ[6#+1] &];
    Table[A121765[[n]] - A121763[[n]], {n, 1, 80}] (* G. C. Greubel, Feb 20 2019 *)
  • Sage
    A121765=[n for n in (1..350) if not is_prime(6*n-1) and is_prime(6*n+1)];
    A121763=[n for n in (1..350) if is_prime(6*n-1) and not is_prime(6*n+1)];
    [A121765[n] - A121763[n] for n in (0..80)] # G. C. Greubel, Feb 20 2019

Formula

a(n) = A121765(n) - A121763(n).

Extensions

Entries checked by R. J. Mathar, May 22 2010

A172055 n-th number k such that 6*k-1 is composite while 6*k+1 is prime plus n-th number m such that 6*m-1 is prime while 6*m+1 is composite.

Original entry on oeis.org

10, 19, 22, 30, 36, 45, 49, 63, 66, 85, 93, 98, 100, 110, 115, 122, 126, 132, 138, 143, 155, 158, 168, 171, 178, 185, 187, 198, 206, 213, 217, 229, 231, 236, 239, 243, 248, 255, 269, 275, 284, 293, 300, 309, 317, 321, 325, 331, 337, 343, 349, 351, 357, 378
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jan 24 2010

Keywords

Crossrefs

Programs

  • GAP
    A121765:=Filtered([1..350],k-> not IsPrime(6*k-1) and IsPrime(6*k+1));;
    A121763:=Filtered([1..350],n-> not IsPrime(6*n+1) and IsPrime(6*n-1));;
    Print(List([1..80],j->A121765[j]+A121763[j])); # G. C. Greubel, Feb 20 2019
  • Magma
    A121765:=[n: n in [1..350] | not IsPrime(6*n-1) and  IsPrime(6*n+1)];
    A121763:=[n: n in [1..350] | IsPrime(6*n-1) and not IsPrime(6*n+1)];
    [A121765[n] + A121763[n]: n in [1..80]]; // G. C. Greubel, Feb 20 2019
    
  • Maple
    A121765:=select(k->not isprime(6*k-1) and isprime(6*k+1),[$1..350]):
    A121763:=select(n->not isprime(6*n+1) and isprime(6*n-1),[$1..350]):
    seq(A121765[m]+A121763[m],m=1..60); # Muniru A Asiru, Feb 21 2019
  • Mathematica
    A121765:= Select[Range[350], !PrimeQ[6#-1] && PrimeQ[6#+1] &];
    A121763:= Select[Range[350], PrimeQ[6#-1] && !PrimeQ[6#+1] &];
    Table[A121765[[n]] + A121763[[n]], {n, 1, 80}] (* G. C. Greubel, Feb 20 2019 *)
  • Sage
    A121765=[n for n in (1..350) if not is_prime(6*n-1) and is_prime(6*n+1)];
    A121763=[n for n in (1..350) if is_prime(6*n-1) and not is_prime(6*n+1)];
    [A121765[n] + A121763[n] for n in (0..80)] # G. C. Greubel, Feb 20 2019
    

Formula

a(n) = A121765(n) + A121763(n).

Extensions

Entries checked by R. J. Mathar, May 22 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-6 of 6 results.