login
a(n) = 1 if n is of the form q*(2^k), where q is one of the Mersenne primes (A000668) and k >= 0, otherwise a(n) = 0.
4

%I #12 Jul 16 2023 13:15:18

%S 0,0,1,0,0,1,1,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,1,0,0,0,

%T 0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,

%U 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,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0

%N a(n) = 1 if n is of the form q*(2^k), where q is one of the Mersenne primes (A000668) and k >= 0, otherwise a(n) = 0.

%H Antti Karttunen, <a href="/A364251/b364251.txt">Table of n, a(n) for n = 1..65537</a>

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

%F a(n) = [A331410(n) == 1], where [ ] is the Iverson bracket.

%F a(n) = [A364260(n) == 1].

%F a(n) <= A336923(n) <= A364252(n).

%o (PARI)

%o isA000668(n) = (isprime(n)&&!bitand(n,1+n));

%o A364251(n) = isA000668(n>>valuation(n,2));

%Y Characteristic function of A335431.

%Y Cf. A000668, A331410, A364260.

%Y Cf. also A336923, A364252.

%K nonn

%O 1

%A _Antti Karttunen_, Jul 16 2023