login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A088685 Records for the sum-of-primes function sopfr(n) if sopfr(prime) is taken to be 0. 5
0, 4, 5, 6, 7, 9, 10, 13, 15, 19, 21, 25, 31, 33, 39, 43, 45, 49, 55, 61, 63, 69, 73, 75, 81, 85, 91, 99, 103, 105, 109, 111, 115, 129, 133, 139, 141, 151, 153, 159, 165, 169, 175, 181, 183, 193, 195, 199, 201, 213, 225, 229, 231, 235, 241, 243, 253, 259, 265, 271 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

A048974, A052147 and A067187 are very similar after dropping terms less than 13. - Eric W. Weisstein, Oct 10 2003

LINKS

Table of n, a(n) for n=1..60.

Eric Weisstein's World of Mathematics, Sum of Prime Factors

MATHEMATICA

Union@ FoldList[Max, Table[Total@ Flatten@ Map[ConstantArray[#1, #2] /. 1 -> 0 & @@ # &, FactorInteger@ n] - n Boole[PrimeQ@ n], {n, 540}]] (* Michael De Vlieger, Jun 29 2017 *)

PROG

(PARI) sopfr(k) = my(f=factor(k)); sum(j=1, #f~, f[j, 1]*f[j, 2]);

lista(nn) = {my(record = -1); for (n=1, nn, if (! isprime(n), if ((x=sopfr(n)) > record, record = x; print1(record, ", ")); ); ); } \\ Michel Marcus, Jun 29 2017

(Python)

from sympy import factorint, isprime

def sopfr(n):

    f=factorint(n)

    return sum([i*f[i] for i in f])

l=[]

record=-1

for n in xrange(1, 501):

    if not isprime(n):

        x=sopfr(n)

        if x>record:

            record=x

            l+=[record, ]

print l # Indranil Ghosh, Jun 29 2017

CROSSREFS

Cf. A001414, A048974, A052147, A067187, A088686.

Sequence in context: A079445 A120173 A075862 * A022299 A099049 A217128

Adjacent sequences:  A088682 A088683 A088684 * A088686 A088687 A088688

KEYWORD

nonn

AUTHOR

Eric W. Weisstein, Oct 05 2003

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy .

Last modified July 21 14:38 EDT 2017. Contains 289642 sequences.