OFFSET
1,2
COMMENTS
A109012(a(n)) < 9.
It seems that, for any n >= 1, there exists no positive integer z such that digit_sum(z) = digit_sum(a(n)+z). - Max Lacoma, Sep 19 2019. Giovanni Resta: this follows immediately from the well-known fact that sod(x) == x (mod 9).
LINKS
Ivan Panchenko, Table of n, a(n) for n = 1..200
Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,0,0,0,1,-1).
FORMULA
From Wesley Ivan Hurt, Sep 12 2015: (Start)
a(n) = a(n-1) + a(n-8) - a(n-9), n>9.
a(n) = n + floor((n-1)/8). (End)
From Philippe Deléham, Dec 05 2016: (Start)
a(n) = 1 + A248375(n-1).
G.f.: x*(1-x^9)/((1-x)^2*(1-x^8)). (End)
E.g.f.: 1 + (1/8)*(-cos(x) + (-5+9*x)*cosh(x) - 2*cos(x/sqrt(2))*cosh(x/sqrt(2)) + sin(x) + (-4+9*x)*sinh(x) + 2*sin(x/sqrt(2))*(sqrt(2)*cosh(x/sqrt(2)) + sinh(x/sqrt(2)))). - Stefano Spezia, Sep 20 2019
MAPLE
MATHEMATICA
Select[Table[n, {n, 200}], Mod[#, 9]!=0&] (* Vladimir Joseph Stephan Orlovsky, Feb 18 2011 *)
With[{nn=81}, Complement[Range[nn], 9Range[Floor[nn/9]]]] (* Harvey P. Dale, Sep 07 2011 *)
PROG
(Haskell)
a168183 n = a168183_list !! (n-1)
a168183_list = [1..8] ++ map (+ 9) a168183_list
-- Reinhard Zumkeller, Mar 04 2014
(PARI) is(n)=!!(n%9) \\ Charles R Greathouse IV, Sep 02 2015
(PARI) a(n)=(9*n-1)\8 \\ Charles R Greathouse IV, Sep 02 2015
(Magma) [n+Floor((n-1)/8) : n in [1..100]]; // Wesley Ivan Hurt, Sep 12 2015
(Python) from gmpy2 import f_mod
[n for n in range(100) if f_mod(n, 9)] # Bruno Berselli, Dec 05 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Reinhard Zumkeller, Nov 30 2009
STATUS
approved