OFFSET
1,3
COMMENTS
This sequence is based on numbers (2^k-3) that are divisible by 5 or by 13, but not both. Its terms are (2^k-3)/5 when 2^k-3 is divisible by 5, and numbers (2^k-3)/13 when 2^k-3 is divisible by 13. [Comment clarified by Michel Marcus, Aug 06 2015]
For n>2, a(n) is of the form (2^(12*m+4)-3)/13 iff n == 1 (mod 4). - Bruno Berselli, Aug 07 2015
LINKS
Index entries for linear recurrences with constant coefficients, signature (0,0,0,4097,0,0,0,-4096).
FORMULA
From Bruno Berselli, Aug 07 2015: (Start)
G.f.: x*(1 + x + 25*x^2 + 409*x^3 + 944*x^4 + 2456*x^5 + 2432*x^6 + 2048*x^7)/((1 - x)*(1 + x)*(1 - 8*x)*(1 + 8*x)*(1 + 64*x^2)*(1 + x^2)).
a(n) = 4097*a(n-4) - 4096*a(n-8) for n>8. (End)
EXAMPLE
a(4) = 409 = (2^(4*2+3)-3)/5, while a(5) = 5041 = (2^(12*1+4)-3)/13.
MATHEMATICA
Take[Sort[Table[(2^(4 m + 3) - 3)/5, {m, 0, 15}]~Join~Table[(2^(12 m + 4) - 3)/13, {m, 0, 15}]], 22] (* Michael De Vlieger, Aug 06 2015 *)
PROG
(Magma) &cat [[(2^(12*m+4)-3)/13] cat [(2^(4*(3*m+i)+3)-3)/5: i in [0..2]]: m in [0..8]]; // Bruno Berselli, Aug 07 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Marco Ripà, Aug 05 2015
STATUS
approved