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-5 of 5 results.

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

A247515 Numbers k such that 2*floor(sqrt(prime(k))) < floor(2*sqrt(prime(k))).

Original entry on oeis.org

2, 4, 6, 9, 11, 14, 15, 17, 18, 21, 22, 25, 30, 33, 34, 37, 38, 39, 43, 44, 47, 48, 53, 54, 59, 60, 61, 63, 64, 65, 66, 69, 70, 71, 72, 76, 77, 78, 82, 83, 84, 85, 90, 91, 92, 97, 98, 99, 102, 103, 104, 105, 110, 111, 112, 113, 114, 119, 120, 121, 122, 127
Offset: 1

Views

Author

Reinhard Zumkeller, Sep 20 2014

Keywords

Comments

A117767(a(n)) < A247485(a(n)); complement of A247514.

Crossrefs

Programs

  • Haskell
    a247515 n = a247515_list !! (n-1)
    a247515_list = filter (\x -> a117767 x < a247485 x) [1..]
  • Mathematica
    A247515Q[k_]:=With[{r=Sqrt[Prime[k]]},2Floor[r]A247515Q] (* Paolo Xausa, Oct 23 2023 *)

A362570 a(n) is the number of isogeny classes of elliptic curves over the finite field of order prime(n).

Original entry on oeis.org

5, 7, 9, 11, 13, 15, 17, 17, 19, 21, 23, 25, 25, 27, 27, 29, 31, 31, 33, 33, 35, 35, 37, 37, 39, 41, 41, 41, 41, 43, 45, 45, 47, 47, 49, 49, 51, 51, 51, 53, 53, 53, 55, 55, 57, 57, 59, 59, 61, 61, 61, 61, 63, 63, 65, 65, 65, 65, 67, 67, 67, 69, 71, 71, 71, 71, 73, 73, 75, 75, 75, 75, 77
Offset: 1

Views

Author

Robin Visser, Apr 25 2023

Keywords

Comments

Two elliptic curves over a finite field F_q are isogenous if and only if they have the same trace of Frobenius, or equivalently, have the same number of points over F_q.
Thus, by the Hasse bound, a(n) is the number of integers with absolute value bounded by 2*sqrt(prime(n)).

Examples

			For n = 1, the a(1) = 5 isogeny classes of elliptic curves are parametrized by the 5 possible values for the trace of Frobenius: -2, -1, 0, 1, 2.
For n = 2, the a(2) = 7 isogeny classes of elliptic curves are parametrized by the 7 possible values for the trace of Frobenius: -3, -2, -1, 0, 1, 2, 3.
		

Crossrefs

Programs

  • Magma
    [2*Floor(2*Sqrt(p)) + 1 : p in PrimesUpTo(500)];
    
  • Mathematica
    2Floor[2Sqrt[Prime[Range[100]]]]+1 (* Paolo Xausa, Oct 23 2023 *)
  • PARI
    a(n) = 2*sqrtint(4*prime(n)) + 1;

Formula

a(n) = 2*floor(2*sqrt(prime(n))) + 1.
a(n) = 2*A247485(n) - 1.

A347038 Primes p such that there are no solutions to d(k+p) = sigma(k).

Original entry on oeis.org

29, 37, 41, 53, 67, 89, 101, 109, 113, 127, 137, 151, 157, 173, 181, 197, 227, 229, 233, 257, 269, 277, 281, 293, 313, 349, 373, 389, 401, 409, 421, 439, 461, 557, 587, 593, 601, 613, 617, 641, 643, 653, 661, 673, 677, 701, 709, 739, 761, 773, 787, 821, 829
Offset: 1

Views

Author

Angad Singh, Aug 12 2021

Keywords

Comments

If p is not in the sequence and d(k+p) = sigma(k), then k <= 1+2*sqrt(p). Proof: We have d(m) <= 2*sqrt(m) (see formula in A000005), so 2*sqrt(k+p) >= d(k+p) = sigma(k) >= k+1 (if k > 1). After squaring and simplifying, we get k <= 1+2*sqrt(p). - Pontus von Brömssen, Aug 20 2021

Crossrefs

Programs

  • Maple
    filter:= proc(p) isprime(p) and not ormap(k -> numtheory:-tau(k+p) = numtheory:-sigma(k), [$1 .. 1 + 2*isqrt(p)]) end proc:
    select(filter, [seq(i,i=3..1000,2)]); # Robert Israel, Aug 06 2025
  • Python
    from sympy import divisor_count as d, divisor_sigma as sigma, primerange
    from math import isqrt
    def A347038_list(pmax):
        a = []
        for p in primerange(2, pmax + 1):
            if not any(d(k + p) == sigma(k) for k in range(1, 2 + isqrt(4 * p))):
                a.append(p)
        return a  # Pontus von Brömssen, Aug 20 2021
Showing 1-5 of 5 results.