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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A160529 a(1) = 1; for n>1, a(n) = a(n-1) + d1 + d2 where d1 = 4 if n is even. d1 = 1 if n is odd, d2 = 15 if n mod 4 = 0, d2 = 0 if n mod 4 != 0. 1
1, 5, 6, 25, 26, 30, 31, 50, 51, 55, 56, 75, 76, 80, 81, 100, 101, 105, 106, 125, 126, 130, 131, 150, 151, 155, 156, 175, 176, 180, 181, 200, 201, 205, 206, 225, 226, 230, 231, 250, 251, 255, 256, 275, 276, 280, 281, 300, 301, 305, 306, 325, 326, 330, 331, 350 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

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

From Hagen von Eitzen, May 17 2009: (Start)

For n>=0, a(4n+1) = 1+25n, a(4n+2) = 5+25n, a(4n+3) = 6+25n, a(4n+4) = 25+25n.

a(n) = 25*floor(n/4) + [0,1,5,6](n mod 4).

(End)

a(n) = a(n-1)+a(n-4)-a(n-5). G.f.: x*(1+4*x+x^2+19*x^3)/((1+x)*(x^2+1)*(x-1)^2). a(n)=-101/8+21*(-1)^n/8+15*A057077(n)/4+25*(n+1)/4. - R. J. Mathar, May 17 2009

G.f.: x*(1+4*x+x^2+19*x^3) / ((1-x^4)*(1-x)). - Franklin T. Adams-Watters, Jul 10 2009

a(n) = (-1 - 21*(-1)^n + (15-i*15)*(-i)^n + (15+15*i)*i^n + 50*n)/8 where i=sqrt(-1). - Colin Barker, Oct 16 2015

MATHEMATICA

LinearRecurrence[{1, 0, 0, 1, -1}, {1, 5, 6, 25, 26}, 60] (* Harvey P. Dale, Aug 15 2011 *)

PROG

(C)

#include <stdio.h>

int main()

{

    int n, d1, d2; int a[101]; a[1] = 1;

    printf ("%d, ", a[1]);

    for (n=2; n<101; n++)

    {

        if (n % 2==0) d1 =4;

        else d1 = 1;

        if (n%4==0) d2 = 15;

        else d2=0;

        a[n] = a[n-1] + d1 + d2;

        printf ("%d, ", a[n]);

    }

    printf("\n");

    return 0;

}

(PARI) a(n) = (-1 - 21*(-1)^n + (15-I*15)*(-I)^n + (15+15*I)*I^n + 50*n)/8 \\ Colin Barker, Oct 16 2015

(PARI) Vec(x*(1+4*x+x^2+19*x^3)/((1-x^4)*(1-x)) + O(x^100)) \\ Colin Barker, Oct 16 2015

CROSSREFS

Sequence in context: A042283 A047186 A166591 * A039572 A033042 A039594

Adjacent sequences:  A160526 A160527 A160528 * A160530 A160531 A160532

KEYWORD

nonn,easy

AUTHOR

Krishnan (krishnanrk2000(AT)yahoo.com), May 17 2009

EXTENSIONS

Edited by N. J. A. Sloane, May 17 2009

Extended by R. J. Mathar, May 17 2009

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 October 24 01:08 EDT 2018. Contains 316541 sequences. (Running on oeis4.)