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 14 results. Next

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

A171696 Nonnegative numbers k such that neither of 6*k +- 1 is prime.

Original entry on oeis.org

0, 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
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Dec 15 2009

Keywords

Comments

A060461 is the main sequence for this entry.

Crossrefs

Cf. A001477.
The same as A060461, except for the initial 0.

Programs

  • Maple
    isA171696 := proc(n) not isprime(6*n+1) and not isprime(6*n-1) ; end proc: for n from 0 to 300 do if isA171696(n) then printf("%d,",n) ; end if; end do: # R. J. Mathar, Mar 18 2010
  • Mathematica
    Select[Range[0, 225], !Or @@ PrimeQ[6# + {-1, 1}] &] (* Amiram Eldar, Jan 21 2020 *)
  • PARI
    is(n)=!isprime(6*n-1) && !isprime(6*n+1) \\ Charles R Greathouse IV, Feb 17 2017

Formula

a(n+1) = A060461(n).
a(n) = n + O(n/log n). - Charles R Greathouse IV, Feb 17 2017

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

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

A171697 1 together with pairs of composites of the form (6n-1, 6n+1).

Original entry on oeis.org

1, 119, 121, 143, 145, 185, 187, 203, 205, 215, 217, 245, 247, 287, 289, 299, 301, 323, 325, 341, 343, 413, 415, 425, 427, 473, 475, 515, 517, 527, 529, 533, 535, 551, 553, 581, 583, 623, 625, 635, 637, 665, 667, 695, 697, 713, 715, 779, 781, 791, 793, 803
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Dec 15 2009

Keywords

Crossrefs

A157966 Number of 3's in A157733(n).

Original entry on oeis.org

0, 1, 1, 1, 3, 3, 5, 5, 7, 9, 9, 11, 13, 13, 15, 17, 19, 19, 21, 23, 23, 25, 27, 29, 31, 33, 33, 35, 35, 37, 41, 43, 45, 45, 49, 49, 51, 53, 55, 57, 59, 59, 63, 63, 65, 65, 69, 73, 75, 75, 77, 79, 79, 83, 85, 87, 89, 89, 91, 93, 93, 97, 101, 103, 103, 105, 109, 111, 115, 115, 117
Offset: 0

Views

Author

Paul Curtz, Mar 10 2009

Keywords

Comments

Odd numbers missing in the sequence: 39, 47, 61, 67, 71, 81, 95, 99, 107, 113, 137, 141 etc.
The numbers above are essentially 2*A060461(n) - 1. - Mikhail Kurkov, Dec 18 2021

Crossrefs

Programs

  • PARI
    a(n) = if(n==2,1, (prime(n)-2)\3); \\ Kevin Ryde, Apr 25 2024

Formula

a(n) = floor((prime(n)-2)/3) for n != 2. - Kevin Ryde, Apr 25 2024

Extensions

Edited and extended by R. J. Mathar, Mar 15 2009

A259826 Numbers n such that n is a multiple of 6 and both n-1 and n+1 are composite.

Original entry on oeis.org

120, 144, 186, 204, 216, 246, 288, 300, 324, 342, 414, 426, 474, 516, 528, 534, 552, 582, 624, 636, 666, 696, 714, 780, 792, 804, 816, 834, 846, 870, 894, 900, 924, 960, 1002, 1026, 1044, 1056, 1074, 1080, 1134, 1140, 1146, 1158, 1176, 1206, 1242, 1254, 1266, 1272, 1314, 1332, 1338, 1344, 1350
Offset: 1

Views

Author

Antonio Gimenez, Jul 05 2015

Keywords

Comments

From Brian Almond, Jun 23 2020: (Start)
For every prime gap g, there is a run of consecutive a(n) of length max{[(g+2)/6]-1,0}.
Gaps between successive a(n) correspond to clusters of primes all within +- 8 of each other. The number of primes within a gap G = a(n+1) - a(n) ranges from (G/6 - 1) to (G/6 - 1) plus the number of twin primes within the gap.
Record gaps in a(n) are 24 at a(1)=120, 42 at a(2)=144, 72 at a(10)=342 and 84 at a(1003)=14706 (the next gaps of 84 occur at a(43136164)=369008652 and a(643519601)=5244999552). No larger record gaps exist below 10^10 (n <= 1239026836).
(End)
Define a "small-gap k-tuple" to be an admissible k-tuple with all of its gaps in {2,4,6,8}. Every gap G = a(n+1) - a(n) >= 18 contains a small-gap k-tuple with k >= G/6 - 1 and diameter G-14, G-12 or G-10. For example, at n=40 the gap between 1080 and 1134 contains the 9-tuple p+{0,4,6,10,16,22,30,36,42} for p=1087. - Brian Almond, Jul 25 2020

Examples

			For n=120, 120 is a multiple of 6, and both 119 and 121 are composite.
		

Crossrefs

Intersection of A008588 and A099047. - Michel Marcus, Jul 06 2015
Cf. A060461.

Programs

  • Magma
    [n: n in [6..2000 by 6] | not IsPrime(n-1) and not IsPrime(n+1)]; // Vincenzo Librandi, Jul 08 2015
  • Mathematica
    Select[6*Range[500], AllTrue[# + {1, -1}, CompositeQ] &] (* Harvey P. Dale, May 21 2017 *)
  • PARI
    select(x->!isprime(x-1)&&!isprime(x+1), vector(10^3,j,6*j) ) \\ Joerg Arndt, Jul 06 2015
    

Formula

a(n) = 6 * A060461(n). - Brian Almond, Jun 22 2020

A384102 Least x in absolute value, such that there exists y, |x| >= |y| > 0, such that n = |6xy + x + y|, or 0 if no such x exists. Choose x > 0 if x and -x are both possible.

Original entry on oeis.org

0, 0, 0, -1, 0, 1, 0, 1, -2, 0, 2, 0, -2, -3, 2, 3, 0, 0, -4, -2, 4, 3, 0, 2, 0, 5, -4, 2, 4, 0, -3, 0, 0, -5, 3, 5, -3, 0, -8, 0, 3, -4, 6, -9, 0, 4, 0, -3, -10, -4, 10, 0, -5, 3, -8, 11, 5, 0, -12, 3, 12, -9, -5, -6, -4, 13, 5, 6, -10, 0, 4, 0, -4, -15, -7, -6, 0, 11, 4, 6, 16, -5, -12, -17, 12, -8, 0, -4, -7, 8, 18, -5, 7, -19, 0, 4, -9, 5, -6
Offset: 1

Views

Author

M. F. Hasler, Jun 20 2025

Keywords

Comments

(6n-1, 6n+1) are twin primes iff a(n) = 0, that is, if there are no nonzero integers x, y such that n = |6xy + x + y|. (These n are listed in A002822, the complement is A067611.)
a(n) <= (6*n-1)/5, with equality if 6*n+1 is prime and 6*n-1 is 5 times a prime. - Robert Israel, Jul 21 2025

Examples

			For n = 1, 2 and 3, there are no nonzero x,y such that n = |6xy + x + y|, and (6n-1, 6n+1) = (5, 7), (11, 13) and (17, 19) are indeed twin primes.
For n = 4 we have x = y = -1 such that |6xy + x + y| = |6 - 1 - 1| = 4 and (23, 25) is indeed not a twin prime pair.
		

Crossrefs

Cf. A384103 (the corresponding y-values).
Cf. A002822 (indices of zeros: n such that 6n-1 and 6n+1 are twin primes).
Cf. A077800 (list of twin primes), A060461, A171696 (none among 6n+-1 is prime), A067611 (n = 6xy +- x +- y: 6n-1 or 6n+1 is composite).

Programs

  • Maple
    f:= proc(n) local V, C, t, m,v, r;
           V:= numtheory:-divisors(6*n+1) minus {1,6*n+1};
           C:= map(u -> `if`(u mod 6 = 1,  [(u-1)/6, ((6*n+1)/u - 1)/6], [(-u-1)/6, (-(6*n+1)/u - 1)/6]), V);
           V:= numtheory:-divisors(6*n-1) minus {1,6*n-1};
           C:= C union map(u -> `if`(u mod 6 = 1, [(u-1)/6, ((-6*n+1)/u - 1)/6], [(-u-1)/6, ((-6*n+1)/u - 1)/6]), V);
           C:= select(t -> abs(t[1]) >= abs(t[2]), C)[..,1];
           if C = {} then return 0 fi;
           m:= infinity;
           for t in C do
             if abs(t) < m then m:= abs(t); r:= t;
             elif abs(t) = m and t > 0 then r:= t
             fi
           od;
           r
     end proc:
    map(f, [$1..100]); # Robert Israel, Jul 21 2025
  • PARI
    {A384102(n)=for(x=1,n\/5, my(p=6*x+1, q=6*x-1, r=if((n-x)%p==0, (n-x)\p, (n+x)%p==0, (n+x)\p, (n-x)%q==0, (x-n)\q, (n+x)%q==0,-(n+x)\q)); r && abs(r) <= x && return(sign(r)*x))}

A384103 a(n) = y with minimum |x| >= |y| > 0, such that n = |6xy + x + y|, or 0 if no such x, y exist. If x and -x are solutions, choose x > 0 > y = -x.

Original entry on oeis.org

0, 0, 0, -1, 0, -1, 0, 1, -1, 0, -1, 0, 1, -1, 1, -1, 0, 0, -1, -2, -1, 1, 0, -2, 0, -1, 1, 2, 1, 0, -2, 0, 0, 1, -2, 1, 2, 0, -1, 0, 2, -2, 1, -1, 0, -2, 0, -3, -1, 2, -1, 0, -2, -3, 1, -1, -2, 0, -1, 3, -1, 1, 2, -2, -3, -1, 2, -2, 1, 0, -3, 0, 3, -1, -2, 2, 0, 1, 3, 2, -1, -3, 1, -1, 1, -2, 0, -4, 2, -2
Offset: 1

Views

Author

M. F. Hasler, Jun 20 2025

Keywords

Comments

(6n-1, 6n+1) are twin primes iff a(n) = 0, that is, if there are no nonzero integers x, y such that n = |6xy + x + y|. These n are listed in A002822, the complement is A067611.
The corresponding x-values are listed in A384102.

Examples

			For n = 1, 2 and 3, there are no nonzero x,y such that n = |6xy + x + y|, and (6n-1, 6n+1) = (5, 7), (11, 13) and (17, 19) are indeed twin primes.
For n = 4 we have x = y = -1 such that |6xy + x + y| = |6 - 1 - 1| = 4 and (23, 25) is indeed not a twin prime pair.
		

Crossrefs

Cf. A384102 (the corresponding x-values).
Cf. A002822 (indices of zeros: n such that 6n-1 and 6n+1 are twin primes).
Cf. A077800 (list of twin primes), A060461, A171696 (none among 6n+-1 is prime), A067611 (n = 6xy +- x +- y: 6n-1 or 6n+1 is composite).

Programs

  • Maple
    f:= proc(n) local V, C, t, m, v, r;
           V:= numtheory:-divisors(6*n+1) minus {1, 6*n+1};
           C:= map(u -> `if`(u mod 6 = 1,  [(u-1)/6, ((6*n+1)/u - 1)/6], [(-u-1)/6, (-(6*n+1)/u - 1)/6]), V);
           V:= numtheory:-divisors(6*n-1) minus {1, 6*n-1};
           C:= C union map(u -> `if`(u mod 6 = 1, [(u-1)/6, ((-6*n+1)/u - 1)/6], [(-u-1)/6, ((6*n-1)/u - 1)/6]), V);
           C:= select(t -> abs(t[1]) >= abs(t[2]), C);
           if C = {} then return 0 fi;
           m:= infinity;
           for t in C do
             if abs(t[1]) < m then m:= abs(t[1]); r:= t[2];
             elif abs(t[1]) = m and t[1] > 0 then r:= t[2]
             fi
           od;
           r
     end proc:
    map(f, [$1..100]); # Robert Israel, Jul 21 2025
  • PARI
    apply( {A384103(n)=for(x=1,n\/5, my(p=6*x+1, q=6*x-1, y=if((n-x)%p==0, (n-x)\p, (n+x)%p==0, -(n+x)\p, (n-x)%q==0, (n-x)\q, (n+x)%q==0,-(n+x)\q)); y && abs(y) <= x && return(y))}, [1..90])

A120382 Even numbers k such that 3*k-1 and 3*k+1 are not prime.

Original entry on oeis.org

40, 48, 62, 68, 72, 82, 96, 100, 108, 114, 138, 142, 158, 172, 176, 178, 184, 194, 208, 212, 222, 232, 238, 260, 264, 268, 272, 278, 282, 290, 298, 300, 308, 320, 334, 342, 348, 352, 358, 360, 378, 380, 382, 386, 392, 402, 414, 418, 422, 424, 438, 444, 446, 448, 450
Offset: 1

Views

Author

Pierre CAMI, Jun 29 2006

Keywords

Crossrefs

Cf. A060461.

Programs

  • Maple
    remove(k -> isprime(3*k-1) or isprime(3*k+1), [seq(k,k=2..1000,2)]); # Robert Israel, Sep 30 2024
  • Mathematica
    Select[Range[2,450,2],!PrimeQ[3#-1]&&!PrimeQ[3#+1]&] (* James C. McMahon, Sep 30 2024 *)
    Select[2*Range[300],NoneTrue[3#+{1,-1},PrimeQ]&] (* Harvey P. Dale, May 27 2025 *)
  • PARI
    isok(n) = !(n%2) && !isprime(3*n-1) && !isprime(3*n+1); \\ Michel Marcus, Sep 15 2019

Formula

a(n) = 2*A060461(n). - Michel Marcus, Sep 15 2019

Extensions

More terms from Michel Marcus, Sep 15 2019
Showing 1-10 of 14 results. Next