login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A091789
a(1) = 1, a(2) = 2, a(n) = reverse concatenation of two previous terms.
3
1, 2, 21, 122, 22112, 21122221, 1222211221122, 221122112222112222112, 2112222112222112211222211221122221, 1222211221122221122112222112222112211222211222211221122
OFFSET
1,2
COMMENTS
Concatenation of any three successive terms is a palindrome.
a(17) with 1597 digits is the first term > 10^1000. - Michael S. Branicky, Jul 01 2022
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..16
MAPLE
Rcat := proc(a, b) local resul, digs ; digs := convert(b, base, 10) ; resul := 0 ; for k in digs do resul := resul*10+k ; od ; digs := convert(a, base, 10) ; for k in digs do resul := resul*10+k ; od ; RETURN(resul) ; end: A091789 := proc(nmax) local a, anxt, n, i, j; a := [1, 2] ; for n from 3 to nmax do a := [op(a), Rcat(op(-2, a), op(-1, a))] ; od; RETURN(a) ; end: op(A091789(13)) ; # R. J. Mathar, Jul 26 2007
PROG
(Python)
from itertools import count, islice
def agen():
s, t = "1", "2"
yield from [1, 2]
while True:
s, t = t, (s+t)[::-1]
yield int(t)
print(list(islice(agen(), 11))) # Michael S. Branicky, Jul 01 2022
CROSSREFS
Cf. A091790.
Sequence in context: A068045 A188530 A178328 * A109789 A136588 A171009
KEYWORD
base,nonn
AUTHOR
Amarnath Murthy, Feb 18 2004
EXTENSIONS
More terms from R. J. Mathar, Jul 26 2007
STATUS
approved