login
A302777
a(n) = 1 if n is of the form p^(2^k) where p is prime and k >= 0, otherwise 0.
26
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, 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, 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
OFFSET
1
COMMENTS
Characteristic function of "Fermi-Dirac primes", A050376.
FORMULA
a(n) = A209229(A100995(n)).
MATHEMATICA
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 *)
PROG
(PARI)
A209229(n) = (n && !bitand(n, n-1));
A302777(n) = A209229(isprimepower(n));
for(n=1, 121, print1(A302777(n), ", "));
CROSSREFS
Cf. A010051, A069513, A050376, A100995, A209229, A302778 (partial sums).
Sequence in context: A285274 A189081 A296084 * A324828 A332823 A354817
KEYWORD
nonn
AUTHOR
Antti Karttunen, Apr 16 2018
STATUS
approved