login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A357282 a(n) = number of subsets S of {1,2,...,n} having more than 1 element such that (difference between least two elements of S) = difference between greatest two elements of S. 0
0, 0, 1, 4, 9, 18, 33, 60, 109, 202, 381, 732, 1425, 2802, 5545, 11020, 21957, 43818, 87525, 174924, 349705, 699250, 1398321, 2796444, 5592669, 11185098, 22369933, 44739580, 89478849, 178957362, 357914361, 715828332, 1431656245, 2863312042, 5726623605 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,4
LINKS
FORMULA
a(n) = A000295(n)-2*A272144(n-2) for n >= 2.
a(n) = 4*a(n-1) - 4*a(n-2) - 2*a(n-3) + 5*a(n-4) - 2*a(n-5).
G.f.: -((x^2 (-1 + 3 x^2))/((-1 + x)^3 (1 + x) (-1 + 2 x))).
EXAMPLE
The 4 relevant subsets of {1,2,3} are {1,2}, {1,3}, {2,3}, and {1,2,3}.
MATHEMATICA
s[n_] := s[n] = Select[Subsets[Range[n]], Length[#] >= 2 &];
a[n_] := Select[s[n], #[[2]] - #[[1]] == #[[-1]] - #[[-2]] &];
Table[Length[a[n]], {n, 0, 18}]
CROSSREFS
Sequence in context: A192760 A295964 A292765 * A301157 A019454 A019453
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Sep 27 2022
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 14:06 EDT 2024. Contains 371987 sequences. (Running on oeis4.)