OFFSET
0,4
COMMENTS
The graph of this sequence is made up of four linear functions: a(n_odd)=n, a(n=2+4i)=n/2, a(4+8i)=n/4, a(8i)=n/8. - Zak Seidov, Oct 30 2006. [In general, f(n) = numerator of n/(n+m) consists of linear functions n/d_i, where d_i are divisors of m (including 1 and m).]
a(n+2), n>=0, is the denominator of the harmonic mean H(n,2) = 4*n/(n+2). a(n+2) = (n+2)/gcd(n+2,8). a(n+5) = A227042(n+2, 2), n >= 0. - Wolfdieter Lang, Jul 04 2013
The sequence p(n) = a(n-4), n>=1, with a(-3) = a(3) = 3, a(-2) = a(2) = 1 and a(-1) = a(1) = 1, appears in the problem of writing 2*sin(2*Pi/n) as an integer in the algebraic number field Q(rho(q(n))), where rho(k) = 2*cos(Pi/k) and q(n) = A225975(n). One has 2*sin(2*Pi/n) = R(p(n), x) modulo C(q(n), x), with x = rho(q(n)) and the integer polynomials R and C given in A127672 and A187360, respectively. See a comment on A225975. - Wolfdieter Lang, Dec 04 2013
A204455(n) divides a(n) for n>=1. - Alexander R. Povolotsky, Apr 06 2015
A multiplicative sequence. Also, a(n) is a strong divisibility sequence, that is, gcd(a(n),a(m)) = a(gcd(n,m)) for n >= 1, m >= 1. In particular, a(n) is a divisibility sequence: if n divides m then a(n) divides a(m). - Peter Bala, Feb 20 2019
LINKS
N. J. A. Sloane, Table of n, a(n) for n = 0..10000
Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,-1).
FORMULA
a(n) = 2*a(n-8) - a(n-16).
G.f.: x* (x^2-x+1) * (x^12 +2*x^11 +4*x^10 +3*x^9 +4*x^8 +4*x^7 +7*x^6 +4*x^5 +4*x^4 +3*x^3 +4*x^2 +2*x +1) / ( (x-1)^2 *(x+1)^2 *(x^2+1)^2 *(x^4+1)^2 ). - R. J. Mathar, Dec 02 2010
From R. J. Mathar, Apr 18 2011: (Start)
a(n) = A109049(n)/8.
Dirichlet g.f. zeta(s-1)*(1-1/2^s-1/2^(2s)-1/2^(3s)).
Multiplicative with a(2^e) = 2^max(0,e-3). a(p^e) = p^e if p>2. (End)
a(n) = n/gcd(n,8), n >= 0. See the harmonic mean comment above. - Wolfdieter Lang, Jul 04 2013
a(n) = n if n is odd; for n == 0 (mod 8) it is n/8, for n == 2 or 6 (mod 8) it is n/2 and for n == 4 (mod 8) it is n/4. - Wolfdieter Lang, Dec 04 2013
From Peter Bala, Feb 20 2019: (Start)
O.g.f.: Sum_{n >= 0} a(n)*x^n = F(x) - F(x^2) - F(x^4) - F(x^8), where F(x) = x/(1 - x)^2.
More generally, for m >= 1, Sum_{n >= 0} (a(n)^m)*x^n = F(m,x) + (1 - 2^m)*( F(m,x^2) + F(m,x^4) + F(m,x^8) ), where F(m,x) = A(m,x)/(1 - x)^(m+1) with A(m,x) the m-th Eulerian polynomial: A(1,x) = x, A(2,x) = x*(1 + x), A(3,x) = x*(1 + 4*x + x^2) - see A008292.
Sum_{n >= 1} (1/n)*a(n)*x^n = G(x) - (1/2)*G(x^2) - (1/4)*G(x^4) - (1/8)*G(x^8), where G(x) = x/(1 - x).
Sum_{n >= 1} (1/n^2)*a(n)*x^n = L(x) - (1/2^2)*L(x^2) - (1/4)^2*L(x^4) - (1/8)^2*L(x^8), where L(x) = Log(1/(1 - x)).
Sum_{n >= 1} (1/a(n))*x^n = L(x) + (1/2)*L(x^2) + (1/2)*L(x^4) + (1/2)*L(x^8). (End)
Sum_{k=1..n} a(k) ~ (43/128) * n^2. - Amiram Eldar, Nov 25 2022
MAPLE
a := n -> iquo(n, [8, 1, 2, 1, 4, 1, 2, 1][1 + modp(n, 8)]):
seq(a(n), n=0..79); # using Wolfdieter Lang's formula, Peter Luschny, Feb 22 2019
MATHEMATICA
f[n_]:=Numerator[n/(n+8)]; Array[f, 100, 0] (* Vladimir Joseph Stephan Orlovsky, Feb 16 2011 *)
LinearRecurrence[{0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, -1}, {0, 1, 1, 3, 1, 5, 3, 7, 1, 9, 5, 11, 3, 13, 7, 15}, 100] (* Harvey P. Dale, Sep 27 2019 *)
PROG
(Sage) [lcm(n, 8)/8 for n in range(0, 100)] # Zerinvary Lajos, Jun 09 2009
(Magma) [Numerator(n/(n+8)): n in [0..100]]; // Vincenzo Librandi, Apr 18 2011
(PARI) vector(100, n, n--; numerator(n/(n+8))) \\ G. C. Greubel, Feb 19 2019
(GAP) List([0..80], n->NumeratorRat(n/(n+8))); # Muniru A Asiru, Feb 19 2019
CROSSREFS
KEYWORD
nonn,frac,mult,easy
AUTHOR
N. J. A. Sloane, May 15 2005
STATUS
approved