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!)
A081806 Least positive number that can be written using prime factors of n (with repetition) and the operations add and subtract. 2
2, 3, 4, 5, 1, 7, 2, 6, 3, 11, 1, 13, 5, 2, 4, 17, 2, 19, 1, 4, 9, 23, 1, 10, 11, 3, 3, 29, 4, 31, 2, 8, 15, 2, 2, 37, 17, 10, 1, 41, 2, 43, 7, 1, 21, 47, 1, 14, 2, 14, 9, 53, 1, 6, 1, 16, 27, 59, 2, 61, 29, 1, 4, 8, 6, 67, 13, 20, 4, 71, 2, 73, 35, 3, 15, 4, 8, 79, 1, 6, 39, 83, 4, 12, 41, 26, 5 (list; graph; refs; listen; history; text; internal format)
OFFSET
2,1
COMMENTS
a(n) <= A001414(n); a(n)=A001414(n)=n iff n is prime.
LINKS
EXAMPLE
24=2*2*2*3 -> a(24) = 2-2-2+3 = 1;
30=2*3*5 -> a(30) = 2-3+5 = 4, as -2-3-5<1, -2-3+5<1, -2+3-5<1, -2+3+5>4, 2-3-5<1, 2+3-5<1 and 2+3+5>4.
PROG
(PARI) v=vector(9); for(n=2, 1000, c=0; f=factorint(n); for(j=1, omega(n), for(h=1, f[j, 2], c++; v[c]=f[j, 1])); nn=997; for(j=0, 2^c-1, s=0; for(h=0, c-1, if(bittest(j, h)==0, s=s-v[h+1], s=s+v[h+1])); if(s>0, if(s<nn, nn=s))); write("b081806.txt", n " " nn)) /* Donovan Johnson, Sep 14 2013 */
CROSSREFS
Sequence in context: A334945 A273825 A082299 * A059806 A332425 A286594
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Apr 10 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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 20:05 EDT 2024. Contains 371254 sequences. (Running on oeis4.)