OFFSET
1
COMMENTS
a(1) = 0, since we have an empty set of numbers more than 0 and less than 1.
If A(x) is the counting function of a(n)=1, n<=x, then A(x)~2*x/log(x) as x tends to infinity.
Characteristic function of A033948 (apart from the initial term). - Antti Karttunen, Aug 22 2017
LINKS
FORMULA
a(n) = 1 iff n = 2, 4, p^k, 2*p^k, where p is an odd prime.
A001783(n) ≡ (-1)^a(n) mod n.
From Antti Karttunen, Aug 22 2017: (Start)
For n > 1, if A034380(n) = 1, a(n) = 1, otherwise a(n) = 0.
A103131(n) = (-1)^a(n) for n > 2.
(End)
PROG
(PARI) A211487(n) = if(n%2, !!isprimepower(n), (n==2 || n==4 || (isprimepower(n/2, &n) && n>2))); \\ Antti Karttunen, Aug 22 2017, after Charles R Greathouse IV's code for A033948.
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Shevelev, May 13 2012
EXTENSIONS
More terms from Antti Karttunen, Aug 22 2017
STATUS
approved