login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

a(n) = 1 if n is of the form p^(2^k) where p is prime and k >= 0, otherwise 0.
26

%I #11 Nov 27 2020 04:51:24

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

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

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

%N a(n) = 1 if n is of the form p^(2^k) where p is prime and k >= 0, otherwise 0.

%C Characteristic function of "Fermi-Dirac primes", A050376.

%H Antti Karttunen, <a href="/A302777/b302777.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) = A209229(A100995(n)).

%t a[n_] := Boole[n > 1 && Length[(f = FactorInteger[n])] == 1 && (e = f[[;; , 2]]) == 2^IntegerExponent[e, 2]]; Array[a, 100] (* _Amiram Eldar_, Nov 27 2020 *)

%o (PARI)

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

%o A302777(n) = A209229(isprimepower(n));

%o for(n=1,121,print1(A302777(n),","));

%Y Cf. A010051, A069513, A050376, A100995, A209229, A302778 (partial sums).

%K nonn

%O 1

%A _Antti Karttunen_, Apr 16 2018