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.

A068860 a(1) = 1; a(n+1) is the smallest number > a(n) which differs from it at every digit.

This page as a plain text file.
%I A068860 #16 Mar 20 2024 09:22:42
%S A068860 1,2,3,4,5,6,7,8,9,10,21,30,41,50,61,70,81,90,101,210,301,410,501,610,
%T A068860 701,810,901,1010,2101,3010,4101,5010,6101,7010,8101,9010,10101,21010,
%U A068860 30101,41010,50101,61010,70101,81010,90101,101010,210101,301010,410101,501010
%N A068860 a(1) = 1; a(n+1) is the smallest number > a(n) which differs from it at every digit.
%C A068860 a(9001) has 1001 digits. - _Michael S. Branicky_, Mar 19 2024
%H A068860 Michael S. Branicky, <a href="/A068860/b068860.txt">Table of n, a(n) for n = 1..9000</a>
%F A068860 a(n) = fabab... where f = ((n-1) mod 9) + 1 and ab = 01 if f is odd else 10 and has floor((n-1)/9)+1 digits. - _Michael S. Branicky_, Mar 19 2024
%e A068860 After 90 the next member is 101 which differs at each digit position.
%o A068860 (Python)
%o A068860 def a(n):
%o A068860     q, r = divmod(n-1, 9)
%o A068860     d, f = q+1, r+1
%o A068860     return int((str(f) + "0"*(f%2) + "10"*(d//2))[:d])
%o A068860 print([a(n) for n in range(1, 51)]) # _Michael S. Branicky_, Mar 19 2024
%Y A068860 Cf. A068861.
%K A068860 nonn,base
%O A068860 1,2
%A A068860 _Amarnath Murthy_, Mar 13 2002
%E A068860 a(48) and beyond from _Michael S. Branicky_, Mar 19 2024