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.

A317204 Expansion of n in the p-system based on convergents to sqrt(2).

Original entry on oeis.org

0, 1, 10, 11, 20, 100, 101, 110, 111, 120, 200, 201, 1000, 1001, 1010, 1011, 1020, 1100, 1101, 1110, 1111, 1120, 1200, 1201, 2000, 2001, 2010, 2011, 2020, 10000, 10001, 10010, 10011, 10020, 10100, 10101, 10110, 10111, 10120, 10200, 10201, 11000, 11001, 11010, 11011
Offset: 0

Views

Author

N. J. A. Sloane, Aug 07 2018

Keywords

Comments

This is the minimal (or greedy) representation of nonnegative numbers in terms of the positive Pell numbers (A000129). - Amiram Eldar, Mar 12 2022

References

  • A. F. Horadam, Zeckendorf representations of positive and negative integers by Pell numbers, Applications of Fibonacci Numbers, Springer, Dordrecht, 1993, pp. 305-316.

Crossrefs

Similar to, but different from, A014418.
Similar sequences: A014417, A130310, A278038.

Programs

  • Mathematica
    pell[1] = 1; pell[2] = 2; pell[n_] := pell[n] = 2*pell[n - 1] + pell[n - 2]; pellp[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]; FromDigits @ IntegerDigits[Total[3^(s - 1)], 3]]; Array[pellp, 50, 0] (* Amiram Eldar, Mar 12 2022 *)
  • PARI
    a(n) = { my (p=[1,2]); for (k=2, oo, if (n<=p[k], my (v=0, d); while (n, v+=10^k*d=n\p[k]; n-=d*p[k]; k--); return (v/10), p = concat(p, 2*p[k]+p[k-1]))) } \\ Rémy Sigrist, Mar 12 2022

Extensions

More terms from Amiram Eldar, Mar 12 2022