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.

Showing 1-3 of 3 results.

A247485 Integer part of 2*sqrt(prime(n)) + 1.

Original entry on oeis.org

3, 4, 5, 6, 7, 8, 9, 9, 10, 11, 12, 13, 13, 14, 14, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 21, 21, 21, 21, 22, 23, 23, 24, 24, 25, 25, 26, 26, 26, 27, 27, 27, 28, 28, 29, 29, 30, 30, 31, 31, 31, 31, 32, 32, 33, 33, 33, 33, 34, 34, 34, 35, 36, 36, 36, 36, 37
Offset: 1

Views

Author

Reinhard Zumkeller, Sep 20 2014

Keywords

Comments

A117767(n) = 2*floor(sqrt(prime(n))) + 1 <= a(n);
a(A247514(n)) = A117767(A247514(n)); a(A247515(n)) > A117767(A247515(n)).
Andrica's conjecture: a(n) <= A001223(n).

Crossrefs

Programs

  • Haskell
    a247485 = (+ 1) . floor . (* 2) . sqrt . fromIntegral . a000040
    
  • Mathematica
    Floor[2Sqrt[Prime[Range[70]]]+1] (* Harvey P. Dale, Sep 04 2020 *)
  • PARI
    a(n) = 1+sqrtint(4*prime(n)); \\ Michel Marcus, Aug 26 2021

A117767 a(n) is the difference between the smallest square greater than prime(n) and the largest square less than prime(n), where prime(n) = A000040(n) is the n-th prime number.

Original entry on oeis.org

3, 3, 5, 5, 7, 7, 9, 9, 9, 11, 11, 13, 13, 13, 13, 15, 15, 15, 17, 17, 17, 17, 19, 19, 19, 21, 21, 21, 21, 21, 23, 23, 23, 23, 25, 25, 25, 25, 25, 27, 27, 27, 27, 27, 29, 29, 29, 29, 31, 31, 31, 31, 31, 31, 33, 33, 33, 33, 33, 33, 33, 35, 35, 35, 35, 35, 37, 37, 37, 37, 37, 37
Offset: 1

Views

Author

Odimar Fabeny, Apr 15 2006

Keywords

Comments

From Reinhard Zumkeller, Sep 20 2014: (Start)
a(n) <= floor(2*sqrt(prime(n))) + 1 = A247485(n).
a(A247514(n)) = A247485(A247514(n)).
a(A247515(n)) < A247485(A247515(n)). (End)

Examples

			The 7th prime number is 17, which is between the consecutive squares 16 and 25, so a(7) = 25 - 16 = 9.
		

Crossrefs

Programs

  • Haskell
    a117767 = (+ 1) . (* 2) . a000006  -- Reinhard Zumkeller, Sep 20 2014
  • Mathematica
    a[n_]:=2Floor[Sqrt[Prime[n]]]+1
  • PARI
    { forprime(p=2,200, f = floor(sqrt(p)) ; print1(2*f+1,",") ; ) ; } \\ R. J. Mathar, Apr 21 2006
    

Formula

a(n) = 2*A000006(n) + 1.
a(n) = 2*floor(sqrt(prime(n))) + 1. - R. J. Mathar, Apr 21 2006

Extensions

More terms from R. J. Mathar, Apr 21 2006
Edited by Dean Hickerson, Jun 03 2006

A247514 Numbers k such that 2*floor(sqrt(prime(k))) = floor(2*sqrt(prime(k))).

Original entry on oeis.org

1, 3, 5, 7, 8, 10, 12, 13, 16, 19, 20, 23, 24, 26, 27, 28, 29, 31, 32, 35, 36, 40, 41, 42, 45, 46, 49, 50, 51, 52, 55, 56, 57, 58, 62, 67, 68, 73, 74, 75, 79, 80, 81, 86, 87, 88, 89, 93, 94, 95, 96, 100, 101, 106, 107, 108, 109, 115, 116, 117, 118, 123, 124
Offset: 1

Views

Author

Reinhard Zumkeller, Sep 20 2014

Keywords

Comments

A117767(a(n)) = A247485(a(n)); complement of A247515.

Crossrefs

Programs

  • Haskell
    a247514 n = a247514_list !! (n-1)
    a247514_list = filter (\x -> a117767 x == a247485 x) [1..]
    
  • Mathematica
    A247514Q[k_]:=With[{r=Sqrt[Prime[k]]},2Floor[r]==Floor[2r]];
    Select[Range[200],A247514Q] (* Paolo Xausa, Oct 23 2023 *)
  • PARI
    isok(k) = my(p=prime(k)); 2*sqrtint(p) == sqrtint(4*p); \\ Michel Marcus, Apr 29 2023
Showing 1-3 of 3 results.