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.

A162685 Positive integers that are not prime powers and are not divisible by any consecutive primes.

This page as a plain text file.
%I A162685 #15 Apr 10 2021 05:51:29
%S A162685 10,14,20,21,22,26,28,33,34,38,39,40,44,46,50,51,52,55,56,57,58,62,63,
%T A162685 65,68,69,74,76,80,82,85,86,87,88,91,92,93,94,95,98,99,100,104,106,
%U A162685 110,111,112,115,116,117,118,119,122,123,124,129,130,133,134,136,141,142
%N A162685 Positive integers that are not prime powers and are not divisible by any consecutive primes.
%H A162685 Amiram Eldar, <a href="/A162685/b162685.txt">Table of n, a(n) for n = 1..10000</a>
%e A162685 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.
%p A162685 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
%t A162685 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 *)
%Y A162685 Cf. A073492, A073493.
%Y A162685 Cf. A000961, A319630.
%K A162685 nonn
%O A162685 1,1
%A A162685 _Leroy Quet_, Jul 10 2009
%E A162685 More terms from _R. J. Mathar_, Jul 13 2009