login
A329780
Numbers that are either odd or are congruent to {+-2, +-8, +-12, +-14} (mod 32).
4
1, 2, 3, 5, 7, 8, 9, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 23, 24, 25, 27, 29, 30, 31, 33, 34, 35, 37, 39, 40, 41, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 55, 56, 57, 59, 61, 62, 63, 65, 66, 67, 69, 71, 72, 73, 75, 76, 77, 78, 79, 81, 82, 83, 84, 85, 87
OFFSET
1,2
LINKS
G. E. Andrews, Further Problems on Partitions, Amer. Math. Monthly 94 (1987), no. 5, 437-439.
Index entries for linear recurrences with constant coefficients, signature (1,0,1,-1,0,-1,1,0,1,-1,0,-1,1,0,1,-1,0,-1,1,0,1,-1).
FORMULA
From Colin Barker, Dec 01 2019: (Start)
G.f.: x*(1 + x)*(1 + x^2 + x^4 - x^5 + x^6 + x^8 + x^12 + x^14 - x^15 + x^16 + x^18 + x^20) / ((1 - x)^2*(1 + x^2)*(1 + x + x^2)*(1 - x^2 + x^4)*(1 + x^4)*(1 - x^4 + x^8)).
a(n) = a(n-1) + a(n-3) - a(n-4) - a(n-6) + a(n-7) + a(n-9) - a(n-10) - a(n-12) + a(n-13) + a(n-15) - a(n-16) - a(n-18) + a(n-19) + a(n-21) - a(n-22) for n>22.
(End)
MATHEMATICA
okQ[n_] := OddQ[n] || AnyTrue[{2, 8, 12, 14, 18, 20, 24, 30}, Mod[n, 32] == #&];
Select[Range[100], okQ] (* Jean-François Alcover, Mar 09 2023 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Nov 29 2019
STATUS
approved