cp's OEIS Frontend

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.

A265744 a(n) is the number of Pell numbers (A000129) needed to sum to n using the greedy algorithm (A317204).

This page as a plain text file.
%I A265744 #19 Jan 05 2025 19:51:40
%S A265744 0,1,1,2,2,1,2,2,3,3,2,3,1,2,2,3,3,2,3,3,4,4,3,4,2,3,3,4,4,1,2,2,3,3,
%T A265744 2,3,3,4,4,3,4,2,3,3,4,4,3,4,4,5,5,4,5,3,4,4,5,5,2,3,3,4,4,3,4,4,5,5,
%U A265744 4,5,1,2,2,3,3,2,3,3,4,4,3,4,2,3,3,4,4,3,4,4,5,5,4,5,3,4,4,5,5,2,3,3,4,4,3,4,4,5,5,4,5,3
%N A265744 a(n) is the number of Pell numbers (A000129) needed to sum to n using the greedy algorithm (A317204).
%C A265744 a(0) = 0, because no numbers are needed to form an empty sum, which is zero.
%C A265744 It would be nice to know for sure whether this sequence also gives the least number of Pell numbers that add to n, i.e., that there cannot be even better nongreedy solutions.
%D A265744 A. F. Horadam, Zeckendorf representations of positive and negative integers by Pell numbers, Applications of Fibonacci Numbers, Springer, Dordrecht, 1993, pp. 305-316.
%H A265744 Antti Karttunen, <a href="/A265744/b265744.txt">Table of n, a(n) for n = 0..13860</a>
%H A265744 L. Carlitz, Richard Scoville, and V. E. Hoggatt, Jr., <a href="https://web.archive.org/web/2024*/https://www.fq.math.ca/Scanned/10-5/carlitz1.pdf">Pellian Representations</a>, The Fibonacci Quarterly, Vol. 10, No. 5 (1972), pp. 449-488.
%F A265744 a(n) = A007953(A317204(n)). - _Amiram Eldar_, Mar 12 2022
%t A265744 pell[1] = 1; pell[2] = 2; pell[n_] := pell[n] = 2*pell[n - 1] + pell[n - 2]; a[n_] := Module[{s = {}, m = n, k}, While[m > 0, k = 1; While[pell[k] <= m, k++]; k--; AppendTo[s, k]; m -= pell[k]; k = 1]; Plus @@ IntegerDigits[Total[3^(s - 1)], 3]]; Array[a, 100, 0] (* _Amiram Eldar_, Mar 12 2022 *)
%Y A265744 Cf. A000129, A007953, A317204.
%Y A265744 Cf. also A014420, A053610, A265404, A265743, A265745.
%Y A265744 Similar sequences: A007895, A116543, A278043.
%K A265744 nonn,base
%O A265744 0,4
%A A265744 _Antti Karttunen_, Dec 17 2015