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.

A360600 Inverse permutation to A360599.

This page as a plain text file.
%I A360600 #7 Feb 14 2023 12:55:06
%S A360600 1,2,3,5,6,4,8,9,11,12,14,15,17,18,20,21,23,24,26,7,27,29,30,32,33,35,
%T A360600 36,38,39,41,42,44,45,47,48,50,51,53,54,56,57,59,60,62,63,65,66,68,69,
%U A360600 71,72,74,75,77,78,10,80,81,83,84,86,87,89,90,92,93,95
%N A360600 Inverse permutation to A360599.
%H A360600 Rémy Sigrist, <a href="/A360600/a360600.gp.txt">PARI program</a>
%H A360600 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%e A360600 A360599(59) = 42, so a(42) = 59.
%o A360600 (PARI) See Links section.
%o A360600 (Python)
%o A360600 from itertools import islice
%o A360600 def agen(): # generator of terms
%o A360600     an, ratios, inv, n = 1, set(), dict(), 1
%o A360600     while True:
%o A360600         k = 1
%o A360600         q, r = divmod(max(k, an), min(k, an))
%o A360600         while r != 0 or q in ratios:
%o A360600             k += 1
%o A360600             q, r = divmod(max(k, an), min(k, an))
%o A360600         an = k
%o A360600         ratios.add(q)
%o A360600         inv[q] = len(ratios)
%o A360600         while n in inv:
%o A360600             yield inv[n]
%o A360600             n += 1
%o A360600 print(list(islice(agen(), 67))) # _Michael S. Branicky_, Feb 13 2023
%Y A360600 Cf. A360599.
%K A360600 nonn
%O A360600 1,2
%A A360600 _Rémy Sigrist_, Feb 13 2023