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!)
A064502 Smallest m such that sum of distinct primes dividing m equals n, or 0 if no such number exists (as at n=1,4,6). 5
1, 0, 2, 3, 0, 5, 0, 7, 15, 14, 21, 11, 35, 13, 33, 26, 39, 17, 65, 19, 51, 38, 57, 23, 95, 46, 69, 285, 115, 29, 161, 31, 87, 62, 93, 741, 155, 37, 217, 74, 111, 41, 185, 43, 123, 86, 129, 47, 215, 94, 141, 645, 235, 53, 329, 106, 159, 987, 265, 59, 371, 61, 177, 122 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
a(n) = first occurrence of n in A008472 (sum of prime factors of n without repetition).
Note that for all primes p, p = a(p); if n is composite then a(n) must be a composite and the only zeros are 1, 4 and 6.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..20000 (terms n=1..1000 from Harry J. Smith)
FORMULA
a(n) = Min{x : A008472[x]=n}.
EXAMPLE
n = 217 = 3*17*197: sum = 3 + 17 + 197 = 217 = n.
MATHEMATICA
t = Table[0, {100} ]; Do[a = Apply[Plus, Transpose[ FactorInteger[n]] [[1]]]; If[ a < 101 && t[[a]] == 0, t[[a]] = n], {n, 2, 10^5} ]; Append[t, 0]
PROG
(PARI) sopf(n)= { local(f, s=0); f=factor(n); for(i=1, matsize(f)[1], s+=f[i, 1]); return(s) } { for (n=1, 1000, if (n==1 || n==4 || n==6, m=0, if (isprime(n), m=n, m=1; while(sopf(m) != n, m++))); write("b064502.txt", n, " ", m) ) } \\ Harry J. Smith, Sep 16 2009
CROSSREFS
Sequence in context: A344369 A175880 A071376 * A082809 A070245 A243868
KEYWORD
easy,nonn
AUTHOR
Robert G. Wilson v, Oct 05 2001
EXTENSIONS
a(0)=1 prepended by Alois P. Heinz, May 24 2023
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 April 24 09:42 EDT 2024. Contains 371935 sequences. (Running on oeis4.)