A206546 Period 8: repeat [1, 7, 11, 13, 13, 11, 7, 1].
1, 7, 11, 13, 13, 11, 7, 1, 1, 7, 11, 13, 13, 11, 7, 1, 1, 7, 11, 13, 13, 11, 7, 1, 1, 7, 11, 13, 13, 11, 7, 1, 1, 7, 11, 13, 13, 11, 7, 1, 1, 7, 11, 13, 13, 11, 7, 1, 1, 7, 11, 13, 13, 11, 7, 1, 1, 7, 11, 13, 13, 11, 7, 1, 1, 7, 11, 13, 13, 11, 7, 1, 1, 7, 11, 13, 13, 11, 7, 1, 1, 7, 11, 13, 13, 11, 7, 1, 1, 7, 11, 13, 13, 11, 7, 1
Offset: 1
Examples
Residues Modd 15 of the positive odd numbers relatively prime to 15: A007775: 1, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 49, ... Modd 15: 1, 7, 11, 13, 13, 11, 7, 1, 1, 7, 11, 13, 13, 11, ...
Links
- Antti Karttunen, Table of n, a(n) for n = 1..8192
- Index entries for linear recurrences with constant coefficients, signature (1,-1,1,-1,1,-1,1).
Programs
-
Mathematica
PadRight[{},100,{1,7,11,13,13,11,7,1}] (* Harvey P. Dale, Sep 30 2015 *)
-
PARI
a(n)=[1, 7, 11, 13, 13, 11, 7, 1][n%8+1] \\ Charles R Greathouse IV, Jul 17 2016
-
Scheme
(define (A206546 n) (list-ref '(1 7 11 13 13 11 7 1) (modulo (- n 1) 8))) ;; Antti Karttunen, Aug 10 2017
Formula
a(n) = A007775(n) (Modd 15) := Modd15(A007775(n)), n>=1, with the periodic sequence Modd15 (period length 30) given in the comment section.
O.g.f: x*(1+x^7+7*x*(1+x^5)+11*x^2*(1+x^3)+13*x^3*(1+x))/(1-x^8) = x*(1+x)*(1+6*x+5*x^2+8*x^3+5*x^4+6*x^5+x^6)/(1-x^8).
a(n) = -k^2 + 7k + 1 where k = (n-1) mod 8. - David A. Corneth, Aug 13 2017
Comments