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”).

A365807
a(n) = 1 if A163511(n) is a square, 0 otherwise.
3
1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 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, 0, 0, 0, 0, 0, 1
OFFSET
0
FORMULA
a(0) = 1, a(1) = 0, a(2) = 1; for n > 2, if n is odd, then a(n) = a((n-1)/2), and if n is a multiple of 4, then a(n) = a(n/4), otherwise a(n) = 0.
a(n) = A010052(A163511(n)).
a(n) = A059841(A365805(n)).
PROG
(PARI)
A163511(n) = if(!n, 1, my(p=2, t=1); while(n>1, if(!(n%2), (t*=p), p=nextprime(1+p)); n >>= 1); (t*p));
A365807(n) = issquare(A163511(n));
(PARI) A365807(n) = if(n<=2, !(n%2), if(n%2, A365807((n-1)/2), if(n%4, 0, A365807(n/4))));
CROSSREFS
Characteristic function of A365808.
Sequence in context: A243148 A089495 A345703 * A173857 A114482 A371844
KEYWORD
nonn
AUTHOR
Antti Karttunen, Oct 01 2023
STATUS
approved