login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons 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

Donovan Johnson, Table of n, a(n) for n = 2..1000

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

Cf. A082729, A001222.

Sequence in context: A243731 A273825 A082299 * A059806 A332425 A286594

Adjacent sequences:  A081803 A081804 A081805 * A081807 A081808 A081809

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified February 24 03:22 EST 2020. Contains 332195 sequences. (Running on oeis4.)