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 A295557 #17 Jun 12 2018 14:37:26 %S A295557 1,2,2,2,2,8,2,2,2,8,2,16,2,8,8,2,2,16,2,16,8,8,2,28,2,8,2,16,2,144,2, %T A295557 2,8,8,8,40,2,8,8,28,2,144,2,16,16,8,2,44,2,16,8,16,2,28,8,28,8,8,2, %U A295557 1168,2,8,16,2,8,144,2,16,8,144,2,124,2,8,16,16,8,144 %N A295557 Let d_1, d_2, d_3, ..., d_tau(n) be the divisors of n; a(n) = number of permutations p of d_1, d_2, d_3, ..., d_tau(n) such that p_(i+1)/p_i is a prime or 1/prime for i = 1,2,...,tau(n)-1. %H A295557 Alois P. Heinz, <a href="/A295557/b295557.txt">Table of n, a(n) for n = 1..359</a> %p A295557 with(numtheory): %p A295557 q:= (i, j)-> is(i/j, integer) and isprime(i/j): %p A295557 b:= proc(s, l) option remember; `if`(s={}, 1, add( %p A295557 `if`(q(l, j) or q(j, l), b(s minus{j}, j), 0), j=s)) %p A295557 end: %p A295557 a:= n-> ((s-> add(b(s minus {j}, j), j=s))(divisors(n))): %p A295557 seq(a(n), n=1..100); # _Alois P. Heinz_, Nov 26 2017 %t A295557 q[i_, j_] := PrimeQ[i/j]; %t A295557 b[s_, l_] := b[s, l] = If[s == {}, 1, Sum[If[q[l, j] || q[j, l], b[s ~Complement~ {j}, j], 0], {j, s}]]; %t A295557 a[n_] := Function[s, Sum[b[s ~Complement~ {j}, j], {j, s}]][Divisors[n]]; %t A295557 Table[a[n], {n, 1, 100}] (* _Jean-François Alcover_, Jun 12 2018, after _Alois P. Heinz_ *) %Y A295557 See A173675 and A179926 for other versions. %K A295557 nonn %O A295557 1,2 %A A295557 _David A. Corneth_ and _N. J. A. Sloane_, Nov 26 2017