A060461 Numbers k such that 6*k-1 and 6*k+1 are twin composites.
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
Keywords
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).
Links
- Zak Seidov, Table of n, a(n) for n = 1..5000
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(ctr
Bill 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
Comments