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.

A316631 Expansion of A(x) = x*(1+3*x^2+x^3+3*x^4+x^6)/(1-x^4)^2.

Original entry on oeis.org

0, 1, 0, 3, 1, 5, 0, 7, 2, 9, 0, 11, 3, 13, 0, 15, 4, 17, 0, 19, 5, 21, 0, 23, 6, 25, 0, 27, 7, 29, 0, 31, 8, 33, 0, 35, 9, 37, 0, 39, 10, 41, 0, 43, 11, 45, 0, 47, 12, 49, 0, 51, 13, 53, 0, 55, 14, 57, 0, 59, 15, 61, 0, 63, 16, 65, 0, 67, 17, 69, 0, 71, 18, 73, 0, 75, 19, 77, 0, 79, 20
Offset: 0

Views

Author

Werner Schulte, Jul 09 2018

Keywords

Examples

			a(22) = 0 since 22 mod 4 = 2; a(23) = 23 for 23 mod 2 = 1; a(24) = 6 because 24 mod 4 = 0 and 24/4 = 6.
		

Crossrefs

Programs

  • GAP
    a:=[0,1,0,3,1,5,0,7];; for n in [9..85] do a[n]:=2*a[n-4]-a[n-8]; od; a; # Muniru A Asiru, Jul 20 2018
  • Maple
    seq(coeff(series(x*(1+3*x^2+x^3+3*x^4+x^6)/(1-x^4)^2, x,n+1),x,n),n=0..80); # Muniru A Asiru, Jul 20 2018
  • Mathematica
    CoefficientList[Series[x (1 + 3 x^2 + x^3 + 3 x^4 + x^6)/(1 - x^4)^2, {x, 0, 80}], x] (* Michael De Vlieger, Jul 20 2018 *)
    LinearRecurrence[{0, 0, 0, 2, 0, 0, 0, -1}, {0, 1, 0, 3, 1, 5, 0, 7}, 81] (* Robert G. Wilson v, Jul 21 2018 *)
  • PARI
    concat(0, Vec((x*(1+3*x^2+x^3+3*x^4+x^6)/(1-x^4)^2) + O(x^80))) \\ Felix Fröhlich, Jul 09 2018
    
  • PARI
    {my(N=79); concat([0], dirdiv(vector(N,n,n), vector(N, n, my(k=valuation(n, 2)); if(n==2^k, k+1, 0))))} \\ Andrew Howroyd, Jul 09 2018
    

Formula

a(n) = n/4 if n mod 4 = 0, and a(n) = 0 if n mod 4 = 2, and a(n) = n if n mod 2 = 1.
Linear recurrence: a(n) = 2*a(n-4) - a(n-8) for n > 7.
a(n) for n > 0 is multiplicative with a(2^e) = 1 - e if e < 2 and a(2^e) = 2^(e-2) if e > 1 otherwise a(p^e) = p^e for prime p > 2 and e >= 0.
Dirichlet g.f.: Sum_{n>0} a(n)/n^s = (1-1/2^s)^2 * zeta(s-1).
Dirichlet inverse b(n) for n > 0 is multiplicative with b(2^e) = 1 - e and for prime p > 2: b(p) = -p and b(p^e) = 0 if e > 1.
Dirichlet convolution with A104117(n) yields A000027(n).
Dirichlet convolution with A115364(n) yields A000203(n).
Sum_{k=1..n} a(k) ~ (9/32) * n^2. - Amiram Eldar, Nov 20 2022