cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A005069 Sum of odd primes dividing n.

Original entry on oeis.org

0, 0, 3, 0, 5, 3, 7, 0, 3, 5, 11, 3, 13, 7, 8, 0, 17, 3, 19, 5, 10, 11, 23, 3, 5, 13, 3, 7, 29, 8, 31, 0, 14, 17, 12, 3, 37, 19, 16, 5, 41, 10, 43, 11, 8, 23, 47, 3, 7, 5, 20, 13, 53, 3, 16, 7, 22, 29, 59, 8, 61, 31, 10, 0, 18, 14, 67, 17, 26, 12, 71, 3, 73, 37, 8, 19, 18, 16, 79
Offset: 1

Views

Author

Keywords

Comments

Primes counted without multiplicity. - Harvey P. Dale, Aug 28 2019

Crossrefs

Programs

  • Mathematica
    a = {0, 0}; For[n = 3, n < 80, n++, su = 0; b = FactorInteger[n]; For[i = 1, i < Length[b] + 1, i++, If[OddQ[b[[i, 1]]], su = su + b[[i, 1]]]]; AppendTo[a, su]]; a (* Stefan Steinerberger, Jun 02 2007 *)
    Array[DivisorSum[#, # &, And[PrimeQ@ #, OddQ@ #] &] &, 79] (* Michael De Vlieger, Jul 11 2017 *)
    Join[{0},Table[Total[FactorInteger[n][[All,1]]/.(2->0)],{n,2,100}]] (* Harvey P. Dale, Aug 28 2019 *)
  • PARI
    a(n) = my(f=factor(n)); sum(k=1, #f~, if (((p=f[k,1])%2) == 1, p)); \\ Michel Marcus, Jul 11 2017
  • Scheme
    (define (A005069 n) (cond ((= 1 n) 0) ((even? n) (A005069 (/ n 2))) (else (+ (A020639 n) (A005069 (A028234 n)))))) ;; Antti Karttunen, Jul 10 2017
    

Formula

Additive with a(p^e) = 0 if p = 2, p otherwise.
G.f.: Sum_{k>=2} prime(k)*x^prime(k)/(1 - x^prime(k)). - Ilya Gutkovskiy, Dec 24 2016
From Antti Karttunen, Jul 10 & 11 2017: (Start)
a(1) = 0; after which, for even n: a(n) = a(n/2), for odd n: a(n) = A020639(n) + a(A028234(n)).
a(n) = A008472(A000265(n)) = A008472(n) - 2*A059841(n).
a(n) = A005078(n) + A005082(n).
(End)

Extensions

More terms from Stefan Steinerberger, Jun 02 2007