login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A079505
The last number for which a determinant of base-n numbers is nonzero.
1
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,1
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.
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)
EXAMPLE
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.
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 *)
PROG
(Magma) [14] cat [n^3-n+1: n in [3..50]]; // Vincenzo Librandi, Dec 01 2018
(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
(GAP) Concatenation([14], List([3..50], n -> n^3-n+1)); # G. C. Greubel, Jan 18 2019
CROSSREFS
Cf. A061600.
Sequence in context: A164403 A164398 A174519 * A039604 A199405 A256573
KEYWORD
base,nonn,easy
AUTHOR
Carlos Alves, Jan 21 2003
EXTENSIONS
Edited by T. D. Noe, Jun 24 2009
STATUS
approved