login
a(n) = 1 if n = prime(k)*prime(1+k) for some k, otherwise 0.
4

%I #14 Dec 26 2018 02:36:43

%S 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,

%T 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,

%U 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

%N a(n) = 1 if n = prime(k)*prime(1+k) for some k, otherwise 0.

%C Characteristic function for products of 2 successive primes (A006094).

%H Antti Karttunen, <a href="/A302049/b302049.txt">Table of n, a(n) for n = 1..67591</a>

%H <a href="/index/Ch#char_fns">Index entries for characteristic functions</a>

%H <a href="/index/Pri#prime_indices">Index entries for sequences computed from indices in prime factorization</a>

%F a(n) = A137794(n) * A280710(n).

%F a(n) = A185013(A246277(n)) = A185013(A078898(n)).

%o (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

%o (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

%Y Cf. A006094, A078898, A137794, A246277, A280710, A302047, A302048.

%K nonn

%O 1,1

%A _Antti Karttunen_, Apr 24 2018