login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A352416 A permutation related to minimal Pell representations: append a 0 after each 2 in the ternary expansion of n, and then replace each place value, say 3^k with k >= 0, by A000129(k+1). 2
0, 1, 4, 2, 3, 9, 10, 11, 28, 5, 6, 16, 7, 8, 21, 22, 23, 57, 24, 25, 62, 26, 27, 67, 68, 69, 168, 12, 13, 33, 14, 15, 38, 39, 40, 98, 17, 18, 45, 19, 20, 50, 51, 52, 127, 53, 54, 132, 55, 56, 137, 138, 139, 337, 58, 59, 144, 60, 61, 149, 150, 151, 366, 63, 64 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
This sequence is to Pell numbers what A048680 is to Fibonacci numbers.
This sequence is a permutation of the nonnegative integers, with inverse A352417.
LINKS
A. F. Horadam, Maximal representations of positive integers by Pell numbers, The Fibonacci Quarterly, Vol. 32, No. 3 (1994), pp. 240-244.
EXAMPLE
For n = 7:
- the ternary expansion of 7 is "21",
- after appending 0's, we obtain "201",
- so a(7) = 2*A000129(2+1) + 0*A000129(1+1) + 1*A000129(0+1) = 2*5 + 1*1 = 11.
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
Cf. A000129, A048680, A317204, A352417 (inverse).
Sequence in context: A297022 A282888 A278101 * A120240 A179394 A347265
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Mar 15 2022
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 15 12:56 EDT 2024. Contains 374332 sequences. (Running on oeis4.)