OFFSET
1,1
COMMENTS
Subsequence of A104210 and first differs from at an n = 15: A104210(15) = 70 = 2 * 5 * 7 is not a term of this sequence.
All the positive multiples of 6 (A008588 \ {0}) are terms.
The asymptotic density of this sequence is Sum_{k>=1} (Product_{j=1..k-1} (1-1/prime(j)))/(prime(k)*prime(k+1)) = 0.2178590011934... .
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
EXAMPLE
12 = 2^2 * 3 is a term since 2 and 3 are consecutive primes.
70 = 2 * 5 * 7 is not a term since 2 and 5 are not consecutive primes.
165 = 3 * 5 * 11 is a term since 3 and 5 are consecutive primes.
MATHEMATICA
q[k_] := Module[{p = FactorInteger[k][[;; , 1]]}, Length[p] > 1 && p[[2]] == NextPrime[p[[1]]]]; Select[Range[300], q]
PROG
(PARI) is(k) = if(k == 1, 0, my(p = factor(k)[, 1]); #p > 1 && p[2] == nextprime(p[1]+1));
CROSSREFS
KEYWORD
nonn,easy,new
AUTHOR
Amiram Eldar, Dec 09 2024
STATUS
approved