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 A126025 #15 Aug 13 2015 08:24:19 %S A126025 1,3,9,26,106,191,954,2427,8404,15945,111952,141117,1176623,2270566, %T A126025 4477947,10345290,104257447,145407966,1633452518,2517488363, %U A126025 5024167821,9148333241,120260250853 %N A126025 Number of mappings f:{1,2,3,...,n} -> {1,2,3,...,n} such that gcd(f(x),f(y)) = f(gcd(x,y)) for all x,y in {1,2,3,...,n}. %C A126025 The greatest common divisor condition was suggested by A061446. %H A126025 Manfred Scheucher, <a href="/A126025/a126025.sage.txt">Sage Script</a> %H A126025 Manfred Scheucher, <a href="/A126025/a126025.c.txt">C Code</a> %o A126025 (Haskell) %o A126025 a126025 n = h n1s 0 where %o A126025 h us c = if us == nns then c + 1 else h (succ us) (c + g) where %o A126025 g = if and [f x `gcd` f y == f (x `gcd` y) | %o A126025 x <- [1 .. n - 1], y <- [x + 1 .. n]] then 1 else 0 %o A126025 f = (us !!) . subtract 1 %o A126025 succ (z:zs) = if z < n then (z + 1) : zs else 1 : succ zs %o A126025 n1s = take n [1, 1 ..]; nns = take n [n, n ..] %o A126025 -- _Reinhard Zumkeller_, May 04 2014 %Y A126025 Cf. A061446. %Y A126025 Cf. A000312. %K A126025 nonn,more,nice %O A126025 1,2 %A A126025 _John W. Layman_, Feb 27 2007 %E A126025 a(10)-a(22) from _Manfred Scheucher_, Jun 06 2015 %E A126025 a(23) from _Manfred Scheucher_, Aug 13 2015