login
This site is supported by donations to The OEIS Foundation.

 

Logo

Annual appeal: Please make a donation to keep the OEIS running! Over 6000 articles have referenced us, often saying "we discovered this result with the help of the OEIS".
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A174396 Numbers congruent to {1,4,5,8} mod 9. 1
1, 4, 5, 8, 10, 13, 14, 17, 19, 22, 23, 26, 28, 31, 32, 35, 37, 40, 41, 44, 46, 49, 50, 53, 55, 58, 59, 62, 64, 67, 68, 71, 73, 76, 77, 80, 82, 85, 86, 89, 91, 94, 95, 98, 100, 103, 104, 107, 109, 112, 113, 116, 118, 121, 122, 125, 127, 130, 131, 134, 136 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

G. C. Greubel, Table of n, a(n) for n = 1..1000

Index entries for linear recurrences with constant coefficients, signature (1,0,0,1,-1).

FORMULA

a(n) = 3*(n-1-floor((n-1)/4)) + (-1)^floor((n-1)/2).

From Wesley Ivan Hurt, Oct 17 2015: (Start)

G.f.: x*(1+3*x+x^2+3*x^3+x^4)/((x-1)^2*(1+x+x^2+x^3)).

a(n) = a(n-1)+a(n-4)-a(n-5) for n>5.

a(n) = (18*n-9+3*(-1)^n-2*(-1)^((2*n+1-(-1)^n)/4))/8. (End)

E.g.f.: (1/8)*(2*sin(x) - 2*cos(x) + 18*x*exp(x) + 3*exp(-x) - 9*exp(x) + 8). - G. C. Greubel, Oct 18 2015

MAPLE

seq(3*(n - floor(n/4)) + (-1)^floor(n/2), n=0..100);

MATHEMATICA

CoefficientList[Series[(1 + 3 x + x^2 + 3 x^3 + x^4)/((x - 1)^2*(1 + x + x^2 + x^3)), {x, 0, 100}], x] (* Wesley Ivan Hurt, Oct 17 2015 *)

RecurrenceTable[{a[1] == 1, a[2] == 4, a[3] == 5, a[4] == 8, a[5] == 10 , a[n+5] == a[n+4] + a[n+1] - a[n] }, a, {n, 1, 100}] (* G. C. Greubel, Oct 18 2015 *)

PROG

(MAGMA) [(18*n-9+3*(-1)^n-2*(-1)^((2*n+1-(-1)^n) div 4))/8 : n in [1..100]]; // Wesley Ivan Hurt, Oct 17 2015

CROSSREFS

Sequence in context: A255491 A292658 A214026 * A033157 A059659 A140459

Adjacent sequences:  A174393 A174394 A174395 * A174397 A174398 A174399

KEYWORD

nonn,easy

AUTHOR

Gary Detlefs, Mar 18 2010

EXTENSIONS

Formula corrected by Gary Detlefs, Mar 19 2010

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified November 19 03:53 EST 2017. Contains 294912 sequences.