OFFSET
0,3
COMMENTS
LINKS
Rémy Sigrist, Table of n, a(n) for n = 0..10000
A. F. Horadam, Maximal representations of positive integers by Pell numbers, The Fibonacci Quarterly, Vol. 32, No. 3 (1994), pp. 240-244.
EXAMPLE
PROG
(PARI) a(n) = { my (v=0, t=0, d); for (k=0, oo, if (n, d=n%3; n\=3; if (d==2, t++); if (d, v+=d*([2, 1; 1, 0]^(k+1+t))[2, 1]), return (v))) }
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Mar 15 2022
STATUS
approved