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.

A025530 a(n) = (1/1 - 1/2 + ... + (-1)^(n-1)/n)*lcm{1..n}.

Original entry on oeis.org

1, 1, 5, 7, 47, 37, 319, 533, 1879, 1627, 20417, 18107, 263111, 237371, 261395, 477745, 8842385, 8161705, 167324635, 155685007, 166770367, 156188887, 3825136961, 3602044091, 19081066231, 18051406831, 57128792093, 54260455193, 1653866633797
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Haskell
    a025530 n = sum $ map (div (a003418 $ fromInteger n))
                          (zipWith (*) [1..n] a033999_list)
    -- Reinhard Zumkeller, Dec 23 2011
    
  • Mathematica
    nn=30;With[{fr=Accumulate[Table[1/(n (-1)^(n-1)),{n,nn}]]}, Table[fr[[n]] LCM@@ Range[n],{n,nn}]] (* Harvey P. Dale, Dec 27 2012 *)
  • PARI
    a(n)=my(v=primes(primepi(n)),k=sqrtint(n),L=log(n+.5),t);t=prod(i=1,#v,if(v[i]>k,v[i],v[i]^(L\log(v[i]))));-sum(i=1,n,(-1)^i*t/i) \\ Charles R Greathouse IV, Dec 23 2011
    
  • PARI
    s=1;v=vector(10^4,i,1);for(n=2,#v,t=n/gcd(s,n);s*=t;v[n]=v[n-1]*t-(-1)^n*s/n);v \\ Charles R Greathouse IV, Dec 23 2011