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 either 1 or a prime power of the form 4m+1, otherwise 0.
3

%I #12 May 16 2022 10:04:34

%S 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,

%T 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,

%U 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

%N a(n) = 1 if n is either 1 or a prime power of the form 4m+1, otherwise 0.

%H Antti Karttunen, <a href="/A354030/b354030.txt">Table of n, a(n) for n = 1..65539</a>

%H <a href="/index/Ch#char_fns">Index entries for characteristic functions</a>

%F For n > 1, a(n) = A174275(n) - A354028(n).

%F a(n) >= A354031(n).

%e 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.

%e 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.

%o (PARI) A354030(n) = ((1==n)||((1==(n%4)) && isprimepower(n)));

%Y Characteristic function of A085759.

%Y Cf. also A010055, A174275, A354028, A354031.

%K nonn

%O 1

%A _Antti Karttunen_, May 15 2022