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.

This page as a plain text file.
%I A355617 #37 Oct 18 2023 10:06:16
%S A355617 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,
%T A355617 67,76,77,78,87,88,89,98,99,100,101,102,201,202,203,302,303,304,403,
%U A355617 404,405,504,505,506,605,606,607,706,707,708,807,808,809,908,909
%N 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.
%C A355617 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].
%C A355617 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.
%H A355617 Sylvia Zevi Abrams, <a href="/A355617/b355617.txt">Table of n, a(n) for n = 1..10000</a> [Corrected to remove leading 0's by _Sean A. Irvine_]
%H A355617 Sylvia Zevi Abrams, <a href="https://i.imgur.com/BBZBUpe.png">Scatter Plot, for n < 100000</a>
%e A355617 a(11) = 11 because R(a(10)) = 1, which was already used as a(1).
%e A355617 a(13) = 21 because R(a(12)) = 21, which had not yet been used, and a(11) =! R(a(12)).
%e A355617 a(64) = 20 because although R(a(63)) = 91 and 91 has not yet been used, a(63) = R(a(62)).
%o A355617 (PARI) R(n) = fromdigits(Vecrev(digits(n))); \\ A004086
%o A355617 leastunused(va, m) = my(k=va[m]+1); while (#select(x->(x==k), va), k++); k;
%o A355617 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
%Y A355617 Cf. A004086.
%K A355617 base,easy,look,nonn
%O A355617 1,2
%A A355617 _Sylvia Zevi Abrams_, Jul 09 2022