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.

A060554 String together the first n numbers in an order which maximizes the result.

This page as a plain text file.
%I A060554 #11 Nov 30 2022 10:03:35
%S A060554 1,21,321,4321,54321,654321,7654321,87654321,987654321,98765432110,
%T A060554 9876543211110,987654321211110,98765432131211110,9876543214131211110,
%U A060554 987654321514131211110,98765432161514131211110
%N A060554 String together the first n numbers in an order which maximizes the result.
%H A060554 Sean A. Irvine, <a href="https://github.com/archmageirvine/joeis/blob/master/src/irvine/oeis/a060/A060554.java">Java program</a> (github)
%o A060554 (Python)
%o A060554 from itertools import count, islice
%o A060554 def agen(): # generator of terms
%o A060554     slst = []
%o A060554     for n in count(1):
%o A060554         s, greatest, argreatest = str(n), "/", None
%o A060554         for i in range(len(slst)+1):
%o A060554             t = "".join(slst[:i]) + s + "".join(slst[i:])
%o A060554             if t > greatest: greatest, argreatest = t, i
%o A060554         slst.insert(argreatest, s)
%o A060554         yield int("".join(slst))
%o A060554 print(list(islice(agen(), 16))) # _Michael S. Branicky_, Nov 30 2022
%Y A060554 Cf. A000422, A060555.
%K A060554 base,easy,nonn
%O A060554 1,2
%A A060554 _Henry Bottomley_, Apr 02 2001
%E A060554 Incorrect comment removed by _Sean A. Irvine_, Nov 30 2022