login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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.
3
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, 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, 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
OFFSET
0,2
COMMENTS
An auxiliary sequence for computing A372555 with a mutually recursive algorithm.
Differs from A130249 for the first time at n=63, 84, 191, 212, 255, etc. See A372558.
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
LINKS
PROG
(PARI)
up_to = 87381; \\ = A001045(18).
A001045(n) = (2^n - (-1)^n) / 3;
A130249(n) = (#binary(3*n+1)-1);
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); };
v372556 = A372555_or_556list(up_to, 1);
A372556(n) = if(!n, n, v372556[n]);
(Scheme) ;; Use the program given in A372555.
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, May 07 2024
STATUS
approved