A131082 Periodic sequence (15, 11, 5, 1, 1, 5, 11, 15).
15, 11, 5, 1, 1, 5, 11, 15, 15, 11, 5, 1, 1, 5, 11, 15, 15, 11, 5, 1, 1, 5, 11, 15, 15, 11, 5, 1, 1, 5, 11, 15, 15, 11, 5, 1, 1, 5, 11, 15, 15, 11, 5, 1, 1, 5, 11, 15, 15, 11, 5, 1, 1, 5, 11, 15, 15, 11, 5, 1, 1, 5, 11, 15, 15, 11, 5, 1, 1, 5, 11, 15, 15, 11, 5, 1, 1, 5, 11, 15, 15, 11, 5, 1
Offset: 1
Links
- Antti Karttunen, Table of n, a(n) for n = 1..8192
- Index entries for linear recurrences with constant coefficients, signature (1,0,0,-1,1).
Programs
-
Magma
m:=84; [ [15, 11, 5, 1, 1, 5, 11, 15][(n-1) mod 8 + 1]: n in [1..m] ];
-
Mathematica
PadRight[{},100,{15,11,5,1,1,5,11,15}] (* or *) LinearRecurrence[ {1,0,0,-1,1},{15,11,5,1,1},100] (* Harvey P. Dale, Feb 01 2015 *)
-
PARI
{m=84; for(n=1, m, r=(n-1)%8; print1(if(r==0||r==7, 15, if(r==1||r==6, 11, if(r==2||r==5, 5, 1))), ","))}
-
Scheme
(define (A131082 n) (list-ref '(15 11 5 1 1 5 11 15) (modulo (- n 1) 8))) ;; Antti Karttunen, Aug 10 2017
Formula
a(n) = a(n-8).
G.f.: x*(15 - 4*x - 6*x^2 - 4*x^3 + 15*x^4)/((1-x)*(1+x^4)).
Comments