This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A372556 #14 May 10 2024 11:16:39 %S A372556 0,2,2,3,3,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6, %T A372556 6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,6,7,7,7,7, %U A372556 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,6,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8 %N A372556 a(n) = largest number k <= A130249(n) for which A372555(n-A001045(k)) = A372555(n)-1, where A372555(n) is the least number of Jacobsthal numbers that add up to n. %C A372556 An auxiliary sequence for computing A372555 with a mutually recursive algorithm. %C A372556 Differs from A130249 for the first time at n=63, 84, 191, 212, 255, etc. See A372558. %C A372556 Conjecture: For all n, either a(n) = A130249(n) or a(n) = A130249(n)-1. In other words, there is always a minimal solution (in number of summands) for representing n as a sum of Jacobsthal numbers that its largest summand is either A001045(A130249(n)) [same as obtained with a greedy algorithm A265745], or the next smaller Jacobsthal number. - _Antti Karttunen_, May 10 2024 %H A372556 Antti Karttunen, <a href="/A372556/b372556.txt">Table of n, a(n) for n = 0..87381</a> %o A372556 (PARI) %o A372556 up_to = 87381; \\ = A001045(18). %o A372556 A001045(n) = (2^n - (-1)^n) / 3; %o A372556 A130249(n) = (#binary(3*n+1)-1); %o A372556 A372555_or_556list(up_to_n,return_556_instead) = { my(v372555 = vector(up_to_n), v372556 = vector(up_to_n)); v372555[1] = 1; v372556[1] = 2; for(n=2,#v372556, my(m=-1,mk=-1,s=A130249(n)); if(A001045(s)==n, v372555[n] = 1; v372556[n] = s, forstep(k=s, 1, -1, my(c=v372555[n-A001045(k)]); if(m<0 || c<m, m=c; mk=k)); v372556[n] = mk; v372555[n] = 1+v372555[n-A001045(mk)])); if(return_556_instead,v372556,v372555); }; %o A372556 v372556 = A372555_or_556list(up_to,1); %o A372556 A372556(n) = if(!n,n,v372556[n]); %o A372556 (Scheme) ;; Use the program given in A372555. %Y A372556 Cf. A001045, A130249, A147612, A372556, A372558. %K A372556 nonn %O A372556 0,2 %A A372556 _Antti Karttunen_, May 07 2024