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.
%I A297403 #10 Dec 30 2017 09:40:22 %S A297403 1,2,4,3,6,8,10,5,7,12,14,16,18,20,22,9,24,26,28,36,30,32,34,40,11,38, %T A297403 13,50,42,44,46,15,48,52,54,19,56,58,60,62,64,66,68,76,78,70,72,74,21, %U A297403 80,82,98,84,86,88,92,90,94,96,100,102,104,122,17,106,108 %N A297403 Inverse to A297075. %H A297403 Rémy Sigrist, <a href="/A297403/b297403.txt">Table of n, a(n) for n = 1..2500</a> %H A297403 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a> %e A297403 A297075(42) = 29, hence a(29) = 42. %t A297403 Take[#, LengthWhile[Differences@ #[[All, 1]], # == 1 &]][[All, -1]] &@ Sort@ MapIndexed[{#1, First@ #2} &, Nest[Append[#, Block[{k = 3, m = FactorInteger[#[[-1]] ][[All, -1]]}, While[Nand[FreeQ[#, k], ! IntersectingQ[m, FactorInteger[k][[All, -1]]]], k++]; k]] &, {1, 2}, 120]] (* _Michael De Vlieger_, Dec 29 2017 *) %Y A297403 Cf. A297075. %K A297403 nonn %O A297403 1,2 %A A297403 _Rémy Sigrist_, Dec 29 2017