login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A174438 Numbers that are congruent to {0, 2, 5, 8} mod 9. 3
0, 2, 5, 8, 9, 11, 14, 17, 18, 20, 23, 26, 27, 29, 32, 35, 36, 38, 41, 44, 45, 47, 50, 53, 54, 56, 59, 62, 63, 65, 68, 71, 72, 74, 77, 80, 81, 83, 86, 89, 90, 92, 95, 98, 99, 101, 104, 107, 108, 110, 113, 116, 117, 119, 122, 125, 126, 128, 131, 134, 135, 137 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

Table of n, a(n) for n=1..62.

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

FORMULA

a(n) = 3*(n-floor(n/4))-(3-I^n-(-I)^n-(-1)^n)/4 where I=sqrt(-1), offset=0.

From Wesley Ivan Hurt, Jun 07 2016: (Start)

G.f.: x^2*(2+3*x+3*x^2+x^3)/((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-15+i^(2*n)+(3-i)*i^(-n)+(3+i)*i^n)/8 where i=sqrt(-1). (End)

MAPLE

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

MATHEMATICA

Table[(18n-15+I^(2n)+(3-I)*I^(-n)+(3+I)*I^n)/8, {n, 80}] (* Wesley Ivan Hurt, Jun 07 2016 *)

Select[Range[0, 150], MemberQ[{0, 2, 5, 8}, Mod[#, 9]]&] (* Harvey P. Dale, Jan 02 2019 *)

PROG

(MAGMA) [n : n in [0..150] | n mod 9 in [0, 2, 5, 8]]; // Wesley Ivan Hurt, Jun 07 2016

CROSSREFS

Sequence in context: A212591 A153275 A161154 * A176061 A183234 A108968

Adjacent sequences:  A174435 A174436 A174437 * A174439 A174440 A174441

KEYWORD

nonn,easy

AUTHOR

Gary Detlefs, Mar 19 2010

EXTENSIONS

a(23) corrected by Chai Wah Wu, Jun 10 2016

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
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 9 21:21 EDT 2020. Contains 336326 sequences. (Running on oeis4.)