OFFSET
0,3
COMMENTS
This sequence is the complement of A352323.
Although this is a list, it has offset 0 for mathematical reasons: indeed, so, the binary expansion of n encodes the positive Pell numbers summing to a(n).
Every nonnegative integer is the sum of two (not necessarily distinct) terms of this sequence.
LINKS
L. Carlitz, Richard Scoville, and V. E. Hoggatt, Jr., Pellian Representations, The Fibonacci Quarterly, Vol. 10, No. 5 (1972), pp. 449-488.
FORMULA
EXAMPLE
MATHEMATICA
With[{pell = LinearRecurrence[{2, 1}, {1, 2}, 7]}, Select[Union[Plus @@@ Subsets[pell]], # <= pell[[-1]] &]] (* Amiram Eldar, Mar 12 2022 *)
PROG
(PARI) a(n) = { my (v=0, k); while (n, n-=2^k=valuation(n, 2); v+=([2, 1; 1, 0]^(k+1))[2, 1]); return (v) }
CROSSREFS
KEYWORD
nonn,base,changed
AUTHOR
Rémy Sigrist, Mar 12 2022
STATUS
approved