login
a(n) = 1 if n has no other prime factors than 2 and/or Mersenne primes, otherwise 0.
3

%I #15 Jul 16 2023 16:24:24

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

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

%U 0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,1,0,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1

%N a(n) = 1 if n has no other prime factors than 2 and/or Mersenne primes, otherwise 0.

%H Antti Karttunen, <a href="/A364252/b364252.txt">Table of n, a(n) for n = 1..100000</a>

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

%F Fully multiplicative with a(p^e) = [p==2] + A036987(p), where [ ] is the Iverson bracket.

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

%F a(n) >= A336923(n) >= A364251(n).

%o (PARI)

%o A209229(n) = (n && !bitand(n,n-1));

%o A364252(n) = { my(f=factor(n)); prod(k=1, #f~, (2==f[k, 1] || A209229(f[k, 1]+1))); };

%Y Cf. A036987, A209229, A336467, A336923, A364251.

%Y Characteristic function of A219174.

%K nonn,mult

%O 1

%A _Antti Karttunen_, Jul 16 2023