OFFSET
1,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
EXAMPLE
220 is factored as 2^2 * 5 * 11. Since both 2 and 5 are not consecutive primes, and 5 and 11 are not consecutive primes (2 and 5 are separated by 3, and 5 and 11 are separated by 7), then 220 is in the sequence.
MAPLE
isA162685 := proc(n) local pfs, i; pfs := numtheory[factorset](n) ; if nops(pfs) <= 1 then RETURN(false) ; else pfs := sort(convert(pfs, list)) ; for i from 2 to nops(pfs) do if op(i, pfs) = nextprime(op(i-1, pfs)) then RETURN(false): fi; od: RETURN(true) ; fi; end: A162685 := proc(n) local a; if n = 1 then 10; else for a from procname(n-1)+1 do if isA162685(a) then RETURN(a) ; fi; od: fi; end: seq(A162685(n), n=1..100) ; # R. J. Mathar, Jul 13 2009
MATHEMATICA
q[n_] := Module[{f = FactorInteger[n]}, Length[f] > 1 && SequenceCount[f[[;; , 1]], {p1_, p2_} /; p2 == NextPrime[p1]] == 0]; Select[Range[150], q] (* Amiram Eldar, Apr 10 2021 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Jul 10 2009
EXTENSIONS
More terms from R. J. Mathar, Jul 13 2009
STATUS
approved