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

A354030
a(n) = 1 if n is either 1 or a prime power of the form 4m+1, otherwise 0.
3
1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1
OFFSET
1
FORMULA
For n > 1, a(n) = A174275(n) - A354028(n).
a(n) >= A354031(n).
EXAMPLE
5, being a Pythagorean prime (A002144), when raised to any power, will always give a number of the form 4m+1, therefore a(1) = a(5) = a(25) = a(125) = 1.
7, although itself a prime of the form 4m+3 (A002145), when raised to an even power will always give a number of the form 4m+1, therefore a(49) = a(2401) = 1.
PROG
(PARI) A354030(n) = ((1==n)||((1==(n%4)) && isprimepower(n)));
CROSSREFS
Characteristic function of A085759.
Sequence in context: A014129 A121505 A014289 * A015297 A015073 A014961
KEYWORD
nonn
AUTHOR
Antti Karttunen, May 15 2022
STATUS
approved