cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

This page as a plain text file.
%I A357282 #5 Oct 01 2022 19:33:28
%S A357282 0,0,1,4,9,18,33,60,109,202,381,732,1425,2802,5545,11020,21957,43818,
%T A357282 87525,174924,349705,699250,1398321,2796444,5592669,11185098,22369933,
%U A357282 44739580,89478849,178957362,357914361,715828332,1431656245,2863312042,5726623605
%N 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.
%H A357282 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (4,-4,-2,5,-2)
%F A357282 a(n) = A000295(n)-2*A272144(n-2) for n >= 2.
%F A357282 a(n) = 4*a(n-1) - 4*a(n-2) - 2*a(n-3) + 5*a(n-4) - 2*a(n-5).
%F A357282 G.f.: -((x^2 (-1 + 3 x^2))/((-1 + x)^3 (1 + x) (-1 + 2 x))).
%e A357282 The 4 relevant subsets of {1,2,3} are {1,2}, {1,3}, {2,3}, and {1,2,3}.
%t A357282 s[n_] := s[n] = Select[Subsets[Range[n]], Length[#] >= 2 &];
%t A357282 a[n_] := Select[s[n], #[[2]] - #[[1]] == #[[-1]] - #[[-2]] &];
%t A357282 Table[Length[a[n]], {n, 0, 18}]
%Y A357282 Cf. A000295, A272144.
%K A357282 nonn,easy
%O A357282 0,4
%A A357282 _Clark Kimberling_, Sep 27 2022