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.

A079505 The last number for which a determinant of base-n numbers is nonzero.

Original entry on oeis.org

14, 25, 61, 121, 211, 337, 505, 721, 991, 1321, 1717, 2185, 2731, 3361, 4081, 4897, 5815, 6841, 7981, 9241, 10627, 12145, 13801, 15601, 17551, 19657, 21925, 24361, 26971, 29761, 32737, 35905, 39271, 42841, 46621, 50617, 54835, 59281, 63961, 68881
Offset: 2

Views

Author

Carlos Alves, Jan 21 2003

Keywords

Comments

Suppose the number k written in base b requires N digits. We build A_k, a square N X N matrix with the digits of k, k-1,...,k-N+1 in base b. The number Det[A_k] is 0 for k greater than b^3-b+1 (except if b=2).
|Det[A_k]| is at most (b-1)^2. The last nonzero value is 1-b, which occurs for k = b^3-b+1 (cf. A061600) except for b=2, though I did not prove it.

Examples

			a(3)=25 because the determinant sequence in base 3 is 1, 2, 2, -1, -1, 4, -2, -2, -2, 2, 0, 1, -1, 0, 1, -1, 0, -4, 4, 0, 2, -2, 0, 2, -2, 0, 0, 0, 0, 0, 0, 0, .... and Det[A_k]=0 for k > 25.
		

Crossrefs

Cf. A061600.

Programs

  • GAP
    Concatenation([14], List([3..50], n -> n^3-n+1)); # G. C. Greubel, Jan 18 2019
  • Magma
    [14] cat [n^3-n+1: n in [3..50]]; // Vincenzo Librandi, Dec 01 2018
    
  • Maple
    seq(coeff(series(x^2*(7*x^4-29*x^3+45*x^2-31*x+14)/(x-1)^4,x,n+1), x, n), n = 2 .. 35); # Muniru A Asiru, Nov 30 2018
  • Mathematica
    Table[ls = {}; Do[nt = Length[IntegerDigits[k, b]]; Ak = Table[IntegerDigits[k - i, b, nt], {i, 0, nt - 1}]; AppendTo[ls, Det[Ak]], {k, 1, b^4}]; Position[ls, _?(#!=0&)][[ -1, 1]], {b, 2, 10}]
    CoefficientList[Series[(7x^4 -29x^3 +45x^2 -31x +14)/(x-1)^4, {x, 0, 50}], x] (* Vincenzo Librandi, Dec 01 2018 *)
    LinearRecurrence[{4,-6,4,-1},{14,25,61,121,211},40] (* Harvey P. Dale, Feb 12 2023 *)
  • PARI
    vector(50, n, n++; if(n==2, 14, n^3-n+1)) \\ G. C. Greubel, Jan 18 2019
    
  • Sage
    [14] + [n^3-n+1 for n in (3..50)] # G. C. Greubel, Jan 18 2019
    

Formula

a(n) = n^3 - n + 1 (except for n=2, a(2)=14).
From Chai Wah Wu, Nov 30 2018: (Start)
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4) for n > 6.
G.f.: x^2*(7*x^4 - 29*x^3 + 45*x^2 - 31*x + 14)/(x - 1)^4. (End)

Extensions

Edited by T. D. Noe, Jun 24 2009