A059995 Drop the final digit of n.
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10
Offset: 0
Links
- Harry J. Smith, Table of n, a(n) for n = 0..1000
- Index entries for sequences related to final digits of numbers
- Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,0,0,0,0,0,1,-1).
Programs
-
Mathematica
Table[FromDigits[Most[IntegerDigits[n]]],{n,0,110}] (* Harvey P. Dale, Sep 09 2016 *)
-
PARI
a(n)=n\10+(n<0 && n%10) \\ Corrected by M. F. Hasler, May 19 2021
-
PARI
a(n) = sign(n)*(abs(n)\10) \\ David A. Corneth, May 20 2021
-
Python
def A059995(n): return n//10 # Chai Wah Wu, Jan 20 2023
Formula
a(n) = a(n-10) + 1.
a(n) = floor(n/10).
a(n) = (n - A010879(n))/10.
G.f.: x^10/((1-x)(1-x^10)).
Partial sums are given by A131242. - Hieronymus Fischer, Jun 21 2007