OFFSET
1,25
REFERENCES
David A. Cox, "Primes of the Form x^2 + n y^2", Wiley, 1989, p. 61.
LINKS
T. D. Noe, Table of n, a(n) for n = 1..10000
FORMULA
Totally additive with a(2) = 0, a(p) = 1 if p == 1 (mod 4), and a(p) = 0 if p == 3 (mod 4). - Amiram Eldar, Jun 17 2024
MAPLE
A083025 := proc(n)
a := 0 ;
for f in ifactors(n)[2] do
if op(1, f) mod 4 = 1 then
a := a+op(2, f) ;
end if;
end do:
a ;
end proc: # R. J. Mathar, Dec 16 2011
MATHEMATICA
f[n_]:=Plus@@Last/@Select[If[n==1, {}, FactorInteger[n]], Mod[#[[1]], 4]==1&]; Table[f[n], {n, 100}] (* Ray Chandler, Dec 18 2011 *)
PROG
(Haskell)
a083025 1 = 0
a083025 n = length [x | x <- a027746_row n, mod x 4 == 1]
-- Reinhard Zumkeller, Jan 10 2012
(PARI) A083025(n)=sum(i=1, #n=factor(n)~, if(n[1, i]%4==1, n[2, i])) \\ M. F. Hasler, Apr 16 2012
CROSSREFS
KEYWORD
nonn,easy,nice
AUTHOR
Reinhard Zumkeller, Oct 29 2001
STATUS
approved