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

 

Logo

Please make a donation to keep the OEIS running. We are now in our 55th year. In the past year we added 12000 new sequences and reached 8000 citations (which often say "discovered thanks to the OEIS"). We need to raise money to hire someone to manage submissions, which would reduce the load on our editors and speed up editing.
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A088686 Positions of the records in the sum-of-primes function sopfr(n) if sopfr(prime) is taken to be 0. 3
1, 4, 6, 8, 10, 14, 21, 22, 26, 34, 38, 46, 58, 62, 74, 82, 86, 94, 106, 118, 122, 134, 142, 146, 158, 166, 178, 194, 202, 206, 214, 218, 226, 254, 262, 274, 278, 298, 302, 314, 326, 334, 346, 358, 362, 382, 386, 394, 398, 422, 446, 454, 458, 466, 478, 482 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

Indranil Ghosh, Table of n, a(n) for n = 1..2765 (terms < 50000)

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

MATHEMATICA

Function[s, Map[FirstPosition[s, #][[1]] &, Union@ FoldList[Max, s]] ]@ Table[Total@ Flatten@ Map[ConstantArray[#1, #2] /. 1 -> 0 & @@ # &, FactorInteger@ n] - n Boole[PrimeQ@ n], {n, 500}] (* 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(n, ", ")); ); ); } \\ 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+=[n, ]

print l # Indranil Ghosh, Jun 29 2017

CROSSREFS

Cf. A001414, A088685.

Sequence in context: A328144 A103800 A022449 * A161344 A127792 A288814

Adjacent sequences:  A088683 A088684 A088685 * A088687 A088688 A088689

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
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 5 10:45 EST 2019. Contains 329751 sequences. (Running on oeis4.)