login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A071322 Alternating sum of all prime factors of n; primes nonincreasing, starting with the largest prime factor: A006530(n). 26
0, 2, 3, 0, 5, 1, 7, 2, 0, 3, 11, 3, 13, 5, 2, 0, 17, 2, 19, 5, 4, 9, 23, 1, 0, 11, 3, 7, 29, 4, 31, 2, 8, 15, 2, 0, 37, 17, 10, 3, 41, 6, 43, 11, 5, 21, 47, 3, 0, 2, 14, 13, 53, 1, 6, 5, 16, 27, 59, 2, 61, 29, 7, 0, 8, 10, 67, 17, 20, 4, 71, 2, 73, 35 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
a(n) = 0 iff n square, a(A000290(n)) = 0;
a(n) = n iff n prime, a(A000040(n)) = A000040(n).
LINKS
EXAMPLE
72 = 2*2*2*3*3, therefore a(72) = 3 - 3 + 2 - 2 + 2 = 2;
90 = 2*3*3*5, therefore a(90) = 5 - 3 + 3 - 2 = 3.
MATHEMATICA
aspf[n_]:=Total[Times@@@Partition[Riffle[Reverse[Flatten[Table[#[[1]], {#[[2]]}]&/@FactorInteger[n]]], {1, -1}, {2, -1, 2}], 2]]; Join[{0}, Array[ aspf, 80, 2]] (* Harvey P. Dale, Apr 19 2015 *)
CROSSREFS
Cf. A001414, A071324, a(n) = abs(A071321(n)).
Sequence in context: A335940 A339767 A071321 * A072594 A353051 A272591
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, May 18 2002
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 29 11:45 EDT 2024. Contains 371278 sequences. (Running on oeis4.)