|
|
A065339
|
|
Number of primes congruent to 3 modulo 4 dividing n (with multiplicity).
|
|
24
|
|
|
0, 0, 1, 0, 0, 1, 1, 0, 2, 0, 1, 1, 0, 1, 1, 0, 0, 2, 1, 0, 2, 1, 1, 1, 0, 0, 3, 1, 0, 1, 1, 0, 2, 0, 1, 2, 0, 1, 1, 0, 0, 2, 1, 1, 2, 1, 1, 1, 2, 0, 1, 0, 0, 3, 1, 1, 2, 0, 1, 1, 0, 1, 3, 0, 0, 2, 1, 0, 2, 1, 1, 2, 0, 0, 1, 1, 2, 1, 1, 0, 4, 0, 1, 2, 0, 1, 1, 1, 0, 2, 1, 1, 2, 1, 1, 1, 0, 2, 3, 0, 0, 1, 1, 0, 2
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,9
|
|
COMMENTS
|
|
|
LINKS
|
|
|
FORMULA
|
a(1) = a(2) = 0; thereafter, if n is even, a(n) = a(n/2), otherwise a(n) = ((A020639(n) mod 4)-1)/2 + a(n/A020639(n)). [Where A020639(n) gives the smallest prime factor of n.]
Other identities and observations. For all n >= 1:
(End)
|
|
MAPLE
|
a := 0 ;
for f in ifactors(n)[2] do
if op(1, f) mod 4 = 3 then
a := a+op(2, f) ;
end if;
end do:
a ;
|
|
MATHEMATICA
|
f[n_]:=Plus@@Last/@Select[If[n==1, {}, FactorInteger[n]], Mod[#[[1]], 4]==3&]; Table[f[n], {n, 100}] (* Ray Chandler, Dec 18 2011 *)
|
|
PROG
|
(Haskell)
a065339 1 = 0
a065339 n = length [x | x <- a027746_row n, mod x 4 == 3]
(PARI) A065339(n)=sum(i=1, #n=factor(n)~, if(n[1, i]%4==3, n[2, i])) \\ M. F. Hasler, Apr 16 2012
(Scheme, two variants using memoization-macro definec)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|