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.

A306853 Positive integers equal to the permanent of the circulant matrix formed by their decimal digits.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 261, 370, 407, 52036, 724212, 223123410
Offset: 1

Views

Author

Paolo P. Lava, Mar 13 2019

Keywords

Comments

1, 2, 3, 4, 5, 6, 7, 8, 9, 370 and 407 are also equal to the determinant of the circulant matrix formed by their decimal digits.

Examples

			     | 2 6 1 |
perm | 1 2 6 | = 2*2*2 + 6*6*6 + 1*1*1 + 1*2*6 + 6*1*2 + 2*6*1 = 261.
     | 6 1 2 |
.
     | 2 2 3 1 2 3 4 1 0 |
     | 0 2 2 3 1 2 3 4 1 |
     | 1 0 2 2 3 1 2 3 4 |
     | 4 1 0 2 2 3 1 2 3 |
perm | 3 4 1 0 2 2 3 1 2 | = 223123410
     | 2 3 4 1 0 2 2 3 1 |
     | 1 2 3 4 1 0 2 2 3 |
     | 3 1 2 3 4 1 0 2 2 |
     | 2 3 1 2 3 4 1 0 2 |
		

Crossrefs

Up to n=110 the permanent of the circulant matrix of the digits of n is equal to A101337 but from n=111 on it can differ.

Programs

  • Maple
    with(linalg): P:=proc(q) local a, b, c, d, i, j, k, n, t;
    for n from 1 to q do d:=ilog10(n)+1; a:=convert(n, base, 10); c:=[];
    for k from 1 to nops(a) do c:=[op(c), a[-k]]; od; t:=[op([]), c];
    for k from 2 to d do b:=[op([]), c[nops(c)]];
    for j from 1 to nops(c)-1 do b:=[op(b), c[j]]; od;
    c:=b; t:=[op(t), c]; od; if n=permanent(t)
    then print(n); fi; od; end: P(10^7);
  • PARI
    mpd(n) = {my(d = digits(n)); matpermanent(matrix(#d, #d, i, j, d[1+lift(Mod(j-i, #d))]));}
    isok(n) = mpd(n) == n; \\ Michel Marcus, Mar 14 2019
    
  • Python
    from sympy import Matrix
    A306853_list = []
    for n in range(1,10**6):
        s = [int(d) for d in str(n)]
        m = len(s)
        if n == Matrix(m, m, lambda i, j: s[(i-j) % m]).per():
            A306853_list.append(n) # Chai Wah Wu, Oct 18 2021

Extensions

a(15) from Vaclav Kotesovec, Aug 19 2021