OFFSET
1,2
COMMENTS
For general Modd n (not to be confused with mod n) see a comment on A203571. The present sequence gives the residues Modd 13 of the positive odd numbers not divisible by 13, which are given in A204457.
The underlying periodic sequence with period length 26 is periodic([0,1,2,3,4,5,6,7,8,9,10,11,12,0,12,11,10,9,8,7,6,5,4,3,2,1]), called, with offset 0, P_13 or Modd13.
LINKS
Index entries for linear recurrences with constant coefficients, signature (1, 0, 0, 0, 0, -1, 1).
FORMULA
EXAMPLE
Residue Modd 13 of the positive odd numbers not divisible by 13:
A204457: 1, 3, 5, 7, 9, 11, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, ...
Modd 13: 1, 3, 5, 7, 9, 11, 11, 9, 7, 5, 3, 1, 1, 3, 5, 7, ...
MATHEMATICA
LinearRecurrence[{1, 0, 0, 0, 0, -1, 1}, {1, 3, 5, 7, 9, 11, 11}, 72] (* Ray Chandler, Aug 08 2015 *)
PROG
(PARI) a(n)=[1, 1, 3, 5, 7, 9, 11, 11, 9, 7, 5, 3][n%12+1] \\ Charles R Greathouse IV, Jul 17 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wolfdieter Lang, Feb 09 2012
STATUS
approved