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.

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.

Original entry on oeis.org

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, 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, 1168, 2, 8, 16, 2, 8, 144, 2, 16, 8, 144, 2, 124, 2, 8, 16, 16, 8, 144
Offset: 1

Views

Author

Keywords

Crossrefs

See A173675 and A179926 for other versions.

Programs

  • Maple
    with(numtheory):
    q:= (i, j)-> is(i/j, integer) and isprime(i/j):
    b:= proc(s, l) option remember; `if`(s={}, 1, add(
         `if`(q(l, j) or q(j, l), b(s minus{j}, j), 0), j=s))
        end:
    a:= n-> ((s-> add(b(s minus {j}, j), j=s))(divisors(n))):
    seq(a(n), n=1..100);  # Alois P. Heinz, Nov 26 2017
  • Mathematica
    q[i_, j_] :=  PrimeQ[i/j];
    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}]];
    a[n_] := Function[s, Sum[b[s ~Complement~ {j}, j], {j, s}]][Divisors[n]];
    Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Jun 12 2018, after Alois P. Heinz *)