login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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
OFFSET
1,2
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
(Python)
def A160529(n): return 25*(n>>2)+(0, 1, 5, 6)[n&3] # Chai Wah Wu, Feb 02 2023
CROSSREFS
Sequence in context: A335827 A166591 A342610 * A039572 A033042 A039594
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