OFFSET
1,2
COMMENTS
Numbers == {1, 19, 37, 73} mod 90 with additive sum sequence 1{+18+18+36+18} {repeat ...}. Includes all prime numbers > 7 with digital root 1.
LINKS
Colin Barker, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (1,0,0,1,-1).
FORMULA
n == {1, 19, 37, 73} mod 90.
a(n + 1) = a(n) + 18 * A177704(n + 1). - David A. Corneth, Mar 24 2018
From Colin Barker, Mar 24 2018: (Start)
G.f.: x*(1 + 18*x + 18*x^2 + 36*x^3 + 17*x^4) / ((1 - x)^2*(1 + x)*(1 + x^2)).
a(n) = a(n-1) + a(n-4) - a(n-5) for n>5.
(End)
EXAMPLE
1+18=19; 19+18=37; 37+36=73; 73+18=91; 91+18=109.
MAPLE
seq(seq(i+90*j, i=[1, 19, 37, 73]), j=0..30); # Robert Israel, Mar 25 2018
MATHEMATICA
LinearRecurrence[{1, 0, 0, 1, -1}, {1, 19, 37, 73, 91}, 50] (* Harvey P. Dale, Dec 14 2019 *)
PROG
(PARI) a(n) = 1 + 18 * (n - 1 + n\4) \\ David A. Corneth, Mar 24 2018
(PARI) Vec(x*(1 + 18*x + 18*x^2 + 36*x^3 + 17*x^4) / ((1 - x)^2*(1 + x)*(1 + x^2)) + O(x^60)) \\ Colin Barker, Mar 24 2018
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Gary Croft, Mar 24 2018
EXTENSIONS
The missing term 1081 added to the sequence by Colin Barker, Mar 24 2018
STATUS
approved