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.

A355617 a(1) = 1; a(2) = 2; for n > 2, a(n) = R(a(n-1)) if a(n-1) != R(a(n-2)) and R(a(n-1)) has not yet been used, where R is the digit reversal function A004086, otherwise a(n) is the smallest positive integer > a(n-1) that has not yet been used.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 21, 22, 23, 32, 33, 34, 43, 44, 45, 54, 55, 56, 65, 66, 67, 76, 77, 78, 87, 88, 89, 98, 99, 100, 101, 102, 201, 202, 203, 302, 303, 304, 403, 404, 405, 504, 505, 506, 605, 606, 607, 706, 707, 708, 807, 808, 809, 908, 909
Offset: 1

Views

Author

Sylvia Zevi Abrams, Jul 09 2022

Keywords

Comments

A regular pattern of rectangles, each 10 times larger than the last, appears on the scatter plot of this sequence. However, there are moments where the sequence deviates from its current rectangle to drop down to lower orders of magnitude or jump up to higher ones. Additionally, chaotic behavior can be observed at values of n in the approximate intervals [60000, 63000], [68000, 82000], and [85000, 100000].
Not all integers appear in this sequence. The smallest number that will never occur is 130, as the only way to achieve the number is through 129, which had already been used to jump to 921.

Examples

			a(11) = 11 because R(a(10)) = 1, which was already used as a(1).
a(13) = 21 because R(a(12)) = 21, which had not yet been used, and a(11) =! R(a(12)).
a(64) = 20 because although R(a(63)) = 91 and 91 has not yet been used, a(63) = R(a(62)).
		

Crossrefs

Cf. A004086.

Programs

  • PARI
    R(n) = fromdigits(Vecrev(digits(n))); \\ A004086
    leastunused(va, m) = my(k=va[m]+1); while (#select(x->(x==k), va), k++); k;
    lista(nn) = my(va = vector(nn)); va[1] = 1; va[2] = 2; for (n=3, nn, if ((va[n-1] != R(va[n-2])) && !#select(x->(x==R(va[n-1])), va), va[n] = R(va[n-1]), va[n] = leastunused(va, n-1));); va; \\ Michel Marcus, Jul 12 2022