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!)
A174398 Numbers that are congruent to {1, 4, 5, 8} mod 12. 0
1, 4, 5, 8, 13, 16, 17, 20, 25, 28, 29, 32, 37, 40, 41, 44, 49, 52, 53, 56, 61, 64, 65, 68, 73, 76, 77, 80, 85, 88, 89, 92, 97, 100, 101, 104, 109, 112, 113, 116, 121, 124, 125, 128, 133, 136, 137, 140, 145, 148, 149, 152, 157, 160, 161, 164, 169, 172, 173 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

Numbers k such that k*(k + 3)/4 + (k + 1)*(k + 2)/6 or k*(5*k + 3)/12 + 1/3 is a nonnegative integer. - Bruno Berselli, Feb 14 2017

LINKS

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

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

FORMULA

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

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

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

a(n) = 2*a(n-1) - 2*a(n-2) + 2*a(n-3) - a(n-4) for n>4.

a(n) = (1 + i)*(3*(n - n*i + i - 1) + i^(1-n) - i^n)/2, where i=sqrt(-1).

a(2*k) = A092259(k), a(2*k-1) = A087445(k). (End)

MAPLE

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

MATHEMATICA

Table[(1+I)*(3*(n-n*I+I-1)+I^(1-n)-I^n)/2, {n, 60}] (* Wesley Ivan Hurt, Jun 07 2016 *)

PROG

(MAGMA) [n : n in [0..200] | n mod 12 in [1, 4, 5, 8]]; // Wesley Ivan Hurt, Jun 07 2016

CROSSREFS

Cf. A087445, A092259.

Sequence in context: A242274 A230549 A133940 * A030978 A101948 A087475

Adjacent sequences:  A174395 A174396 A174397 * A174399 A174400 A174401

KEYWORD

nonn,easy

AUTHOR

Gary Detlefs, Mar 18 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 20 10:50 EST 2017. Contains 294963 sequences.