proposed
approved
proposed
approved
editing
proposed
Antti Karttunen, <a href="/A353813/b353813.txt">Table of n, a(n) for n = 1..100000</a>
approved
editing
proposed
approved
editing
proposed
<a href="/index/Ch#char_fns">Index entries for characteristic functions</a>
a(n) <= A353814(n).
allocated for Antti Karttunena(n) = 1 if n has exactly one prime factor of form 4*k+1 (when counted with multiplicity) and no prime factor 4*k+3 with odd multiplicity, otherwise 0.
0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0
1
a(n) = [A004018(n) == 8], where [ ] is the Iverson bracket.
(PARI) A353813(n) = { my(f = factor(n), nb1 = 0, p, ep); for(i=1, #f~, p = f[i, 1]; ep = f[i, 2]; if(1==(p%4), nb1++; if((ep>1)||(nb1>1), return(0))); if((3==(p%4)) && (ep%2), return(0))); return(1==nb1); }; \\ After "isok" function in A230779
(PARI)
A004018(n) = if(n<1, n==0, 4 * sumdiv( n, d, (d%4==1) - (d%4==3))); \\ From A004018 by Michael Somos, Jul 19 2004
allocated
nonn
Antti Karttunen, May 14 2022
approved
editing