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.

A175628 a(2*n+1) = A005563(n). a(2*n) = A061037(n+1).

Original entry on oeis.org

0, 0, 3, 5, 8, 3, 15, 21, 24, 2, 35, 45, 48, 15, 63, 77, 80, 6, 99, 117, 120, 35, 143, 165, 168, 12, 195, 221, 224, 63, 255, 285, 288, 20, 323, 357, 360, 99, 399, 437, 440, 30, 483, 525, 528, 143, 575, 621, 624, 42, 675, 725, 728, 195, 783, 837, 840, 56, 899, 957, 960, 255, 1023, 1085, 1088, 72, 1155, 1221, 1224, 323, 1295, 1365
Offset: 1

Views

Author

Paul Curtz, Dec 04 2010

Keywords

Comments

Mingles the numerators of the Lyman and Balmer series of the hydrogen problem.

Crossrefs

Programs

  • Magma
    R:= RealField(20);
    a:= func< n | (n mod 2) eq 1 select (n-1)*(n+3)/4 else Round((n^2+4*n-12)*(37 +27*(-1)^(n/2) +6*Cos((n+2)*Pi(R)/4))/2^8) >;
    [a(n): n in [1..90]]; // G. C. Greubel, Sep 19 2018; Dec 04 2019
    
  • Maple
    seq( `if`( (n mod 2) = 1, (n-1)*(n+3)/4, (n^2+4*n-12)*(37 +27*(-1)^(n/2) +6*cos((n+2)*Pi/4))/2^8 ), n=1..90); # G. C. Greubel, Dec 04 2019
  • Mathematica
    a[n_]:= If[OddQ[n], (n-1)*(n+3)/4, (n^2+4*n-12)*(37 +27*(-1)^(n/2) +6*Cos[(n + 2)*Pi/4])/2^8]; Table[a[n], {n, 90}] (* G. C. Greubel, Sep 19 2018; Dec 04 2019 *)
  • PARI
    a(n) = if(n%2==1, (n-1)*(n+3)/4, round((n^2+4*n-12)*(37 +27*(-1)^(n/2) +6*cos((n+2)*Pi/4))/2^8) ); \\ G. C. Greubel, Sep 19 2018; Dec 04 2019
    
  • Sage
    def a(n):
        if (mod(n,2)==1): return (n-1)*(n+3)/4
        else: return round((n^2+4*n-12)*(37 +27*(-1)^(n/2) +6*cos((n+2)*pi/4))/2^8)
    [a(n) for n in (1..90)] # G. C. Greubel, Dec 04 2019

Formula

a(n) = 3*a(n-8) - 3*a(n-16) + a(n-24). - R. J. Mathar, Dec 08 2010
G.f.: x^3*(3*x^21 + x^20 + x^19 + 3*x^17 - 3*x^16 - 8*x^14 - 14*x^13 - 18*x^12 - 6*x^11 - 24*x^10 - 30*x^9 - 26*x^8 - 2*x^7 - 24*x^6 - 21*x^5 - 15*x^4 - 3*x^3 - 8*x^2 - 5*x -3) / ((x-1)^3*(x+1)^3*(x^2+1)^3*(x^4+1)^3). - Colin Barker, Jan 26 2014
a(n) = (n-1)*(n+3)/4 when n is odd, otherwise (n^2+4*n-12)*(37 + 27*(-1)^(n/2) + 6*cos((n+2)*Pi/4))/2^8. - G. C. Greubel, Dec 04 2019
Sum_{n>=3} 1/a(n) = 31/12. - Amiram Eldar, Aug 14 2022