A122962 Duplicate of A048648.
2, 2, 24, 1, 1, 2, 240
Offset: 1
Keywords
Extensions
Definition and terms corrected by Jonathan Sondow, Jun 16 2011
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.
LinearRecurrence[{0, 0, 0, 0, 0, 0, 0, 1},{2, 2, 1, 0, 1, 1, 1, 0},104] (* Ray Chandler, Aug 25 2015 *) PadRight[{},120,{2,2,1,0,1,1,1,0}] (* Harvey P. Dale, Jun 13 2017 *)
a(n)=[2, 2, 1, 0, 1, 1, 1, 0][n%8+1] \\ Charles R Greathouse IV, Jul 13 2016
Vec((2 + 2*x + x^2 + x^4 + x^5 + x^6) / ((1 - x)*(1 + x)*(1 + x^2)*(1 + x^4)) + O(x^90)) \\ Colin Barker, Nov 02 2019
from sympy import bernoulli def a(n): if n == 0: return 1 n_ = n % 8 d = {0:2, 1:2, 2:1, 4:1, 5:1, 6:1} if n_ in [3, 7]: k = (n+1)//4 return (bernoulli(2*k)/(4*k)).denominator else: return d[n_]
Comments