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.

A007481 Number of subsequences of [ 1,...,n ] in which each even number has an odd neighbor.

This page as a plain text file.
%I A007481 M0828 #25 Jul 02 2025 16:01:55
%S A007481 1,2,3,7,11,25,39,89,139,317,495,1129,1763,4021,6279,14321,22363,
%T A007481 51005,79647,181657,283667,646981,1010295,2304257,3598219,8206733,
%U A007481 12815247,29228713,45642179,104099605,162557031,370756241,578955451,1320467933
%N A007481 Number of subsequences of [ 1,...,n ] in which each even number has an odd neighbor.
%C A007481 A055099(n) = a(2*n+1) - a(2*n) = a(2*(n+1)) - a(2*n+1). - _Reinhard Zumkeller_, Oct 25 2015
%D A007481 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H A007481 T. D. Noe, <a href="/A007481/b007481.txt">Table of n, a(n) for n = 0..400</a>
%H A007481 R. K. Guy and W. O. J. Moser, <a href="https://web.archive.org/web/2024*/https://www.fq.math.ca/Scanned/34-2/guy.pdf">Numbers of subsequences without isolated odd members</a>, Fibonacci Quarterly 34:2 (1996), pp. 152-155.
%H A007481 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (0, 3, 0, 2).
%F A007481 a(n) = 3*a(n-2) + 2*a(n-4).
%F A007481 G.f.: (x^3+2*x+1)/(-2*x^4-3*x^2+1). - _Harvey P. Dale_, Feb 29 2012
%e A007481 For n=2, there are the following three subsequences of [1,2] with the desired property: empty, [1], [1,2].
%e A007481 For n=3, there are the following seven subsequences of [1,2,3] with the desired property: empty, [1], [3], [1,2], [2,3], [1,3], [1,2,3].
%t A007481 LinearRecurrence[{0,3,0,2},{1,2,3,7},40] (* _Harvey P. Dale_, Feb 29 2012 *)
%o A007481 (Haskell)
%o A007481 a007481 n = a007481_list !! n
%o A007481 a007481_list = 1 : 2 : 3 : 7 : zipWith (+)
%o A007481                (map (* 3) $ drop 2 a007481_list) (map (* 2) a007481_list)
%o A007481 -- _Reinhard Zumkeller_, Oct 25 2015
%o A007481 (PARI) a(n)=([0,1,0,0; 0,0,1,0; 0,0,0,1; 2,0,3,0]^n*[1;2;3;7])[1,1] \\ _Charles R Greathouse IV_, Mar 02 2016
%Y A007481 Cf. A007455, A007482, A007484, A055099.
%K A007481 nonn,easy,nice
%O A007481 0,2
%A A007481 _N. J. A. Sloane_
%E A007481 More terms from _James Sellers_, Dec 24 1999