OFFSET
0,5
COMMENTS
Number of permutations satisfying -k <= p(i)-i <= r and p(i)-i not in I, i=1..n, with k=1, r=3, I={0,2}.
Number of compositions of n into elements of the set {2,4}.
a(n-2) is the number of circular arrangements of the first n positive integers such that adjacent terms have absolute difference 1 or 3. - Ethan Patrick White, Jun 24 2020
REFERENCES
D. H. Lehmer, Permutations with strongly restricted displacements. Combinatorial theory and its applications, II (Proc. Colloq., Balatonfured, 1969), pp. 755-770. North-Holland, Amsterdam, 1970.
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Vladimir Baltic, On the number of certain types of strongly restricted permutations, Applicable Analysis and Discrete Mathematics 4 (2010), 119-135.
Ethan P. White, Richard K. Guy, and Renate Scheidler, Difference Necklaces, arXiv:2006.15250 [math.CO], 2020.
Index entries for linear recurrences with constant coefficients, signature (0,1,0,1).
FORMULA
MATHEMATICA
Riffle[Fibonacci[Range[50]], 0] (* Harvey P. Dale, Dec 20 2015 *)
PROG
(PARI) a(n)=if(n%2, 0, fibonacci(n/2+1)) \\ Charles R Greathouse IV, Jun 11 2015
(Magma)
A079977:= func< n | (1+(-1)^n)*Fibonacci(Floor((n+2)/2))/2 >;
[A079977(n): n in [0..50]]; // G. C. Greubel, Jul 25 2022
(SageMath)
def A079977(n): return ((n+1)%2)*fibonacci((n+2)//2)
[A079977(n) for n in (0..50)] # G. C. Greubel, Jul 25 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vladimir Baltic, Feb 17 2003
EXTENSIONS
Editorial note: normally the alternate zeros are omitted from sequences like this. This entry is an exception. - N. J. A. Sloane
STATUS
approved