login
A302049
a(n) = 1 if n = prime(k)*prime(1+k) for some k, otherwise 0.
4
0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
OFFSET
1,1
COMMENTS
Characteristic function for products of 2 successive primes (A006094).
FORMULA
a(n) = A137794(n) * A280710(n).
a(n) = A185013(A246277(n)) = A185013(A078898(n)).
PROG
(PARI) A302049(n) = if(n<=1, 0, my(p=precprime(sqrtint(n))); p>1 && 0==(n%p) && isprime(n/p) && (nextprime(p+1)==n/p)); \\ After code in A006094
(PARI) first(n) = my(res = vector(n), p = 2); forprime(q = 3, , if(p * q > n, return(res)); res[p * q]++; p = q) \\ David A. Corneth, Apr 24 2018
KEYWORD
nonn
AUTHOR
Antti Karttunen, Apr 24 2018
STATUS
approved