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.

A177894 Determinant of the square matrix whose rows are the cyclic permutations of the digits of n.

This page as a plain text file.
%I A177894 #25 Mar 11 2024 04:13:00
%S A177894 0,1,2,3,4,5,6,7,8,9,1,0,-3,-8,-15,-24,-35,-48,-63,-80,4,3,0,-5,-12,
%T A177894 -21,-32,-45,-60,-77,9,8,5,0,-7,-16,-27,-40,-55,-72,16,15,12,7,0,-9,
%U A177894 -20,-33,-48,-65,25,24,21,16,9,0,-11,-24,-39,-56,36,35,32,27,20,11,0,-13,-28,-45,49,48,45,40,33,24,13,0,-15,-32,64,63,60,55,48,39,28,15,0,-17,81,80,77,72,65,56,45,32
%N A177894 Determinant of the square matrix whose rows are the cyclic permutations of the digits of n.
%H A177894 David A. Corneth, <a href="/A177894/b177894.txt">Table of n, a(n) for n = 0..9999</a>
%F A177894 For n = a, det(M) = a;
%F A177894 for n = ab, det(M) = a^2 - b^2;
%F A177894 for n = abc, det(M) = 3abc - a^3 - b^3 - c^3; ...
%e A177894 for n=104, the (3 X 3) matrix M is
%e A177894   [1 0 4]
%e A177894   [0 4 1]
%e A177894   [4 1 0]
%e A177894 and a(104) = det(M) = -65.
%t A177894 A177894[n_] := If[n < 10, n, Det[NestList[RotateLeft, IntegerDigits[n], IntegerLength[n]-1]]]; Array[A177894, 100, 0] (* _Paolo Xausa_, Mar 11 2024 *)
%o A177894 (Sage)
%o A177894 def A177894(n):
%o A177894     d = n.digits()[::-1] if n > 0 else [0]
%o A177894     M = Matrix(lambda i,j: d[(i+j) % len(d)], nrows=len(d))
%o A177894     return M.determinant() # _D. S. McNeil_, Dec 16 2010
%o A177894 (PARI) a(n) = {if(n<10, return(n)); my(d = digits(n), m, s); d = concat(d, d); s = #d/2; m = matrix(s, s, i, j, d[i+j-1]); matdet(m)} \\ _David A. Corneth_, Jun 12 2017
%Y A177894 Coincides with A257587 for the first 100 terms, but differs thereafter.
%K A177894 sign,base,easy,look
%O A177894 0,3
%A A177894 _Michel Lagneau_, Dec 15 2010