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

A278115 Triangle T(n,k) = A278113(n,k)^2 A000040(k) for 1 <= k <= A278114(n), read by rows.

Original entry on oeis.org

2, 8, 3, 5, 7, 18, 12, 5, 7, 11, 13, 17, 32, 27, 20, 28, 11, 13, 17, 19, 23, 29, 31, 50, 48, 45, 28, 44, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 72, 48, 45, 63, 44, 52, 68, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 98, 75, 80, 63, 44, 52, 68, 76, 92, 29, 31, 37, 41, 43, 47, 53
Offset: 1

Views

Author

Jason Kimberley, Feb 10 2017

Keywords

Examples

			The first six rows are:
2;
8, 3, 5, 7;
18, 12, 5, 7, 11, 13, 17;
32, 27, 20, 28, 11, 13, 17, 19, 23, 29, 31;
50, 48, 45, 28, 44, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47;
72, 48, 45, 63, 44, 52, 68, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71;
		

Crossrefs

Cf. A278101.

Programs

  • Magma
    A278112:=func;
    A278115_row:=funcA278112(n,p)^2*p:p in PrimesUpTo(2*n^2)]>;
    &cat[A278115_row(n):n in[1..7]];
  • Mathematica
    Table[# Floor[n Sqrt[2/#]]^2 &@ Prime@ k, {n, 7}, {k, PrimePi[2 n^2]}] // Flatten (* Michael De Vlieger, Feb 17 2017 *)

Formula

T(n,k) = prime(k) * floor(n*sqrt(2/prime(k)))^2.

A278113 Triangle T(n,k) = A278112(n,A000040(k)) for 1 <= k <= A278114(n), read by rows.

Original entry on oeis.org

1, 2, 1, 1, 1, 3, 2, 1, 1, 1, 1, 1, 4, 3, 2, 2, 1, 1, 1, 1, 1, 1, 1, 5, 4, 3, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6, 4, 3, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 5, 4, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 8, 6, 5, 4, 3, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 1

Views

Author

Jason Kimberley, Feb 09 2017

Keywords

Comments

This triangle consists of those columns of A278112 that have prime index.

Examples

			The first eight rows are:
  1;
  2, 1, 1, 1;
  3, 2, 1, 1, 1, 1, 1;
  4, 3, 2, 2, 1, 1, 1, 1, 1, 1, 1;
  5, 4, 3, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1;
  6, 4, 3, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1;
  7, 5, 4, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1;
  8, 6, 5, 4, 3, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1;
		

Crossrefs

Programs

  • Magma
    A278112:=func;
    A278113_row:=funcA278112(n,p):p in PrimesUpTo(2*n^2)]>;
    &cat[A278113_row(n):n in[1..8]];
  • Mathematica
    Table[Floor[n Sqrt[2/Prime@ k]], {n, 8}, {k, PrimePi[2 n^2]}] // Flatten (* Michael De Vlieger, Feb 17 2017 *)

Formula

T(n,k) = floor(n*sqrt(2/prime(k))).
T(n,k) sqrt(A000040(k)) <= n sqrt(2) < (T(n,k)+1) sqrt(A000040(k)).

A285786 Number of primes p with 2(n-1)^2 < p <= 2n^2.

Original entry on oeis.org

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

Views

Author

Ralf Steiner, Apr 26 2017

Keywords

Comments

The author of the sequence conjectures that a(n) >= 1 for all n. This conjecture is similar to the famous conjecture made by Adrien-Marie Legendre that there is always a prime between n^2 and (n+1)^2, see A014085. - Antti Karttunen, May 01 2017

Examples

			For n = 1, the primes from 2*((1-1)^2) to 2*(1^2) (in semiopen range ]0, 2]) are: 2, thus a(1) = 1.
For n = 2, the primes from 2*((2-1)^2) to 2*(2^2) (in semiopen range ]2, 8]) are: 3, 5 and 7, thus a(2) = 3.
For n = 3, the primes from 2*((3-1)^2) to 2*(3^2) (in semiopen range ]8, 18]) are: 11, 13 and 17, thus a(3) = 3.
For n = 4, the primes from 2*((4-1)^2) to 2*(4^2) (in semiopen range ]18, 32]) are: 19, 23, 29 and 31, thus a(4) = 4.
		

Crossrefs

Cf. A001105, A000720 (number of primes), A014085 (between n^2 and (n+1)^2), A285738, A285388.

Programs

  • Maple
    R:= [0, seq(numtheory:-pi(2*n^2),n=1..100)]:
    R[2..-1] - R[1..-2]; # Robert Israel, May 01 2017
  • Mathematica
    Table[Length[Select[FactorInteger[Numerator[Table[2^(1 - 2 n^2) n Binomial[2 n^2, n^2], {n, 1, k}]]][[k]][[All, 1]], # > 2 (k - 1)^2 &]], {k, 1, 60}]
    Flatten[{1,2,Table[PrimePi[2 k^2] - PrimePi[2 (k - 1)^2], {k, 3, 60}]}]
    (* Second program: *)
    Array[PrimePi[2 #^2] - PrimePi[2 (# - 1)^2] &, 60] (* Michael De Vlieger, Apr 26 2017, at the suggestion of Robert G. Wilson v. *)
  • PARI
    a(n) = (primepi(2*n^2)-primepi(2*(n-1)^2)) \\ David A. Corneth, Apr 27 2017, edited by Antti Karttunen, May 01 2017
    
  • PARI
    a(n)=my(s); forprime(p=2*n^2 - 4*n + 3, 2*n^2, s++); s \\ Charles R Greathouse IV, May 10 2017
    
  • Python
    from sympy import primepi
    def a(n): return primepi(2*n**2) - primepi(2*(n - 1)**2) # Indranil Ghosh, May 01 2017

Formula

From Antti Karttunen, May 01 2017: (Start)
a(1) = 1, for n > 1, a(n) = A000720(A001105(n)) - A000720(A001105(n-1)).
For all n except n=2, a(n) <= n.
(End)
First differences of A278114: a(n) = A278114(n) - A278114(n-1) for n > 0, if we use A278114(0) = 0. A278114(n) = Sum_{k=1..n} a(n). - M. F. Hasler, May 02 2017

Extensions

Definition and value of a(2) changed by Antti Karttunen, May 01 2017

A285269 Number of (odd) primes between 2*n^2 and 2*(n+1)^2.

Original entry on oeis.org

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

Views

Author

M. F. Hasler, May 02 2017

Keywords

Comments

Essentially the same as A285786, except for the offset and initial values.

Examples

			a(0) = 0 because between 2*0^2 = 0 and 2*1^2 = 2, there are no (odd) primes.
a(1) = 3 because between 2*1^2 = 2 and 2*2^2 = 8, there are the 3 (odd) primes 3, 5 and 7.
a(2) = 3 because between 2*2^2 = 8 and 2*3^2 = 18, there are the 3 primes 11, 13 and 17.
		

Programs

  • Mathematica
    Join[{0}, Differences[PrimePi[2*Range[100]^2]]] (* Paolo Xausa, Nov 22 2024 *)
  • PARI
    a(n)=primepi(2*(n+1)^2-1)-primepi(2*n^2)

Formula

a(n) = A285786(n+1), for all n >= 2.
First differences of A278114, a(n) = A278114(n+1) - A278114(n), for n > 0.
Showing 1-4 of 4 results.