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.

A173631 a(n) = ceiling(sqrt(4*P_n)), where P_n is product of first n primes.

Original entry on oeis.org

2, 3, 5, 11, 29, 97, 347, 1429, 6229, 29873, 160869, 895680, 5448207, 34885543, 228759799, 1568298164, 11417382972, 87698582661, 684947826800, 5606539592683, 47241542317190, 403631914492643, 3587558929043911, 32684217334320604, 308342289648017960, 3036819365023555974
Offset: 0

Views

Author

Vladimir Shevelev, Nov 23 2010

Keywords

Crossrefs

Programs

  • Maple
    P:= 1: p:= 1: A[0]:= 2:
    for n from 1 to 30 do
      p:= nextprime(p);
      P:= P*p;
      A[n]:= ceil(sqrt(4*P));
    od:
    seq(A[i],i=0..30); # Robert Israel, Mar 18 2020
  • Mathematica
    p=4; Join[{Sqrt[p]}, Table[p=p*Prime[n]; Ceiling[Sqrt[p]], {n, 25}]]
  • PARI
    a(n) = sqrtint(4*prod(k=1, n, prime(k)) - 1) + 1; \\ Michel Marcus, Feb 22 2016; corrected Jun 16 2022

Formula

a(n) = ceiling(sqrt(4*A002110(n))). - Michel Marcus, Feb 22 2016

Extensions

Extended by T. D. Noe, Nov 23 2010