The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A258447 a(5) = 0; a(n) = 1 + min{a(k + m): n = k * m; k, m >= 0}. 1

%I #22 May 27 2016 07:32:39

%S 1,4,3,2,1,0,1,3,2,2,4,4,3,4,3,3,3,4,3,4,3,5,5,5,4,5,4,4,4,6,5,5,4,4,

%T 5,4,4,6,5,4,4,6,5,5,4,4,6,5,4,4,4,4,5,5,4,4,4,6,6,5,4,6,5,4,4,4,5,6,

%U 5,5,5,5,4,6,5,4,5,4,5,5,4,4,6,5,4,6,5,5,5,6,5,4,5,6,5,5,4,6,5,4,4,7,6,6,5,5,5,6,5

%N a(5) = 0; a(n) = 1 + min{a(k + m): n = k * m; k, m >= 0}.

%C All elements occur only finitely often.

%H David A. Corneth, <a href="/A258447/b258447.txt">Table of n, a(n) for n = 0..9999</a>

%e a(5) = 0 which gives a(1 * 4) = a(2 * 3) = 1 which give a(1 * 3) = 2 and a(2 * 4) = a(3 * 3) = 2.

%o (PARI) /* to get all elements up to n, have the program return v instead of v[n+1]; replace ";v[n+1]}" with ";v}". */

%o a(n) = {my(nn = max(6, n + isprime(n)), l1=listcreate(), l2 = listcreate(), v = vector(nn + 1, i ,-1)); v[1]=1; v[6]=0; q = 1; listput(l1,5);

%o while(#l1>0, for(i=1, #l1, u=min(l1[i] \ 2, ((l1[i] / 2) - sqrt(max(0, (l1[i] / 2) ^2 -nn))))\1; for(j=1, u, p=(l1[i] - j) * j; if(v[p+1] == -1, listput(l2, p); v[p + 1] = q))); l1 = l2;listsort(l1,1);l2=listcreate();q++);v[n+1]}

%K nonn

%O 0,2

%A _David A. Corneth_, May 30 2015

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.

Last modified April 13 06:32 EDT 2024. Contains 371638 sequences. (Running on oeis4.)