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!)
A068860 a(1) = 1; a(n+1) is the smallest number > a(n) which differs from it at every digit. 4
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 21, 30, 41, 50, 61, 70, 81, 90, 101, 210, 301, 410, 501, 610, 701, 810, 901, 1010, 2101, 3010, 4101, 5010, 6101, 7010, 8101, 9010, 10101, 21010, 30101, 41010, 50101, 61010, 70101, 81010, 90101, 101010, 210101, 301010, 410101, 501010 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
a(9001) has 1001 digits. - Michael S. Branicky, Mar 19 2024
LINKS
FORMULA
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
EXAMPLE
After 90 the next member is 101 which differs at each digit position.
PROG
(Python)
def a(n):
q, r = divmod(n-1, 9)
d, f = q+1, r+1
return int((str(f) + "0"*(f%2) + "10"*(d//2))[:d])
print([a(n) for n in range(1, 51)]) # Michael S. Branicky, Mar 19 2024
CROSSREFS
Cf. A068861.
Sequence in context: A256079 A216556 A331975 * A158699 A247107 A061511
KEYWORD
nonn,base
AUTHOR
Amarnath Murthy, Mar 13 2002
EXTENSIONS
a(48) and beyond from Michael S. Branicky, Mar 19 2024
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 April 25 07:07 EDT 2024. Contains 371964 sequences. (Running on oeis4.)