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

A087811 Numbers k such that ceiling(sqrt(k)) divides k.

Original entry on oeis.org

1, 2, 4, 6, 9, 12, 16, 20, 25, 30, 36, 42, 49, 56, 64, 72, 81, 90, 100, 110, 121, 132, 144, 156, 169, 182, 196, 210, 225, 240, 256, 272, 289, 306, 324, 342, 361, 380, 400, 420, 441, 462, 484, 506, 529, 552, 576, 600, 625, 650, 676, 702, 729, 756, 784, 812, 841
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 16 2003

Keywords

Comments

Essentially the same as the quarter-squares A002620.
Nonsquare terms of this sequence are given by A002378. - Max Alekseyev, Nov 27 2006
This also gives the number of ways to make change for "c" cents using only pennies, nickels and dimes. You must first set n=floor(c/5), to account for the 5-repetitive nature of the task. - Adam Sasson, Feb 09 2011
These are the segment boundaries of Oppermann's conjecture (1882): n^2-n < p < n^2 < p < n^2+n. - Fred Daniel Kline, Apr 07 2011
a(n) is the number of triples (w,x,y) having all terms in {0..n} and w=2*x+y. - Clark Kimberling, Jun 04 2012
a(n+1) is also the number of points with integer coordinates inside a rectangle isosceles triangle with hypotenuse [0,n] (see A115065 for an equilateral triangle). - Michel Marcus, Aug 05 2013
a(n) = degree of generating polynomials of Galois numbers in (n+1)-dimensional vector space, defined as total number of subspaces in (n+1) space over GF(n) (see Mathematica procedure), when n is a power of a prime. - Artur Jasinski, Aug 31 2016, corrected by Robert Israel, Sep 23 2016
Also number of pairs (x,y) with 0 < x <= y <= n, x + y > n. - Ralf Steiner, Jan 05 2020

Crossrefs

Programs

  • Haskell
    a087811 n = (n + n `mod` 2) * (n + 2 - n `mod` 2) `div` 4
    -- Reinhard Zumkeller, Oct 27 2012
    
  • Magma
    [ n: n in [1..841] | n mod Ceiling(Sqrt(n)) eq 0 ]; // Bruno Berselli, Feb 09 2011
    
  • Maple
    f:= gfun:-rectoproc({a(n)=n+a(n-2),a(1)=1,a(2)=2},a(n),remember):
    map(f, [$1..100]); # Robert Israel, Aug 31 2016
  • Mathematica
    a[1] := 1; a[2] := 2; a[n_] := n + a[n - 2]; Table[a[n], {n, 57}] (* Alonso del Arte *)
    GaloisNumber[n_, q_] :=
    Sum[QBinomial[n, m, q], {m, 0, n}]; aa = {}; Do[
    sub = Table[GaloisNumber[m, n], {n, 0, 200}];
    pp = InterpolatingPolynomial[sub, x]; pol = pp /. x -> n + 1;
    coef = CoefficientList[pol, n];
    AppendTo[aa, Length[coef] - 1], {m, 2, 25}]; aa (* Artur Jasinski, Aug 31 2016 *)
    Select[Range[900],Divisible[#,Ceiling[Sqrt[#]]]&] (* or *) LinearRecurrence[ {2,0,-2,1},{1,2,4,6},60] (* Harvey P. Dale, Nov 06 2016 *)
  • PARI
    a(n)=(n+n%2)*(n+2-n%2)/4 \\ Charles R Greathouse IV, Apr 03 2012
    
  • PARI
    j=0;for(k=1,850,s=sqrtint(4*k+1);if(s>j,j=s;print1(k,", "))) \\ Hugo Pfoertner, Sep 17 2018
    
  • Python
    def A087811(n): return n*(n+2)+(n&1)>>2 # Chai Wah Wu, Jul 27 2022

Formula

a(n) = (n + n mod 2)*(n + 2 - n mod 2)/4.
Numbers of the form m^2 or m^2 - m. - Don Reble, Oct 17 2003
a(1) = 1, a(2) = 2, a(n) = n + a(n - 2). - Alonso del Arte, Jun 18 2005
From Bruno Berselli, Feb 09 2011: (Start)
G.f.: x/((1+x)*(1-x)^3).
a(n) = (2*n*(n+2)-(-1)^n+1)/8. (End)
G.f.: G(0)/(2*(1-x^2)*(1-x)), where G(k) = 1 + 1/(1 - x*(2*k+1)/(x*(2*k+2) + 1/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 25 2013
a(n) = (C(n+2,2) - floor((n+2)/2))/2. - Mircea Merca, Nov 23 2013
a(n) = ((-1)^n*(-1 + (-1)^n*(1 + 2*n*(2 + n))))/8. - Fred Daniel Kline, Jan 06 2015
a(n) = Product_{k=1...n-1} (1 + 2 / (k + k mod 2)), n >= 1. - Fred Daniel Kline, Oct 30 2016
E.g.f.: (1/4)*(x*(3 + x)*cosh(x) + (1 + 3*x + x^2)*sinh(x)). - Stefano Spezia, Jan 05 2020
a(n) = (n*(n+2)+(n mod 2))/4. - Chai Wah Wu, Jul 27 2022
Sum_{n>=1} 1/a(n) = Pi^2/6 + 1. - Amiram Eldar, Sep 17 2022
a(n) = A024206(n) + 1. - Ya-Ping Lu, Dec 29 2023

A195325 Least n-gap prime: a(n) = least prime p for which there is no prime between n*p and n*q, where q is the next prime after p.

Original entry on oeis.org

2, 59, 71, 29, 59, 149, 191, 641, 149, 347, 809, 461, 3371, 1487, 857, 1301, 1877, 5849, 4721, 9239, 4271, 1619, 1481, 20507, 20981, 32117, 13337, 19379, 24977, 48779, 20441, 25301, 5651, 37991, 17747, 43577, 176777, 145757, 191249, 84809, 150209, 11717
Offset: 1

Views

Author

Vladimir Shevelev, Sep 15 2011

Keywords

Comments

Such a prime always exists.
The sequence is unbounded.
Conjecture. For n >= 2, a(n) is a lesser of twin primes (A001359). This implies the twin prime conjecture. - Vladimir Shevelev, Sep 15 2011
If a member of this sequence is not the lesser of a twin prime pair, it is greater than 10^10. - Charles R Greathouse IV, Sep 15 2011
A dual sequence: b(n)= least prime p for which there is no prime between n*q and n*p, where q is the previous prime before p. Evidently, b(n) is the next prime after a(n): 3,61,73,31,..., and for n>=2, by the same conjecture, b(n) is a greater of twin primes.

Crossrefs

Programs

  • Maple
    a:= proc(n) local p, q;
          p:= 2; q:= nextprime(p);
          while nextprime(n*p) < (n*q) do
            p, q:= q, nextprime(q)
          od; p
        end:
    seq (a(n), n=1..25); # Alois P. Heinz, Sep 15 2011
  • Mathematica
    pQ[p_, r_] := Block[{q = NextPrime[p]},NextPrime[r*p]> r*q]; f[n_] := Block[{p = 2}, While[ !pQ[p, n], p = NextPrime[p]]; p]; f[1] = 2; Array[f, 42] (* Robert G. Wilson v, Sep 18 2011 *) (* Revised by Zak Seidov, Sep 19 2011 *)

A202998 Previous integer to m^2/n where m is the next odd prime after n (n excluded).

Original entry on oeis.org

8, 4, 8, 6, 9, 8, 17, 15, 13, 12, 15, 14, 22, 20, 19, 18, 21, 20, 27, 26, 25, 24, 36, 35, 33, 32, 31, 30, 33, 32, 44, 42, 41, 40, 39, 38, 45, 44, 43, 42, 45, 44, 51, 50, 49, 48, 59, 58, 57, 56, 55, 54, 65, 64, 63, 62, 61, 60, 63, 62, 73, 72
Offset: 1

Views

Author

Michael B. Rees and Frank M Jackson, Jan 07 2012

Keywords

Comments

It is conjectured by Michael B Rees (Dec 2011) that for any n > 0, A110835(n) >= a(n)>=n. The Sierpinski conjecture states that: "For any n >= 2 and any k such that 1 < k <= n there exists a prime number between (k-1)*n and k*n (inclusively)". Rees has conjectured that: "For any n >= 1 and any k such that 1 < k < m^2/n where m is the next odd prime after n (n excluded), there exists a prime number between (k-1)*n and k*n (inclusively)".

Examples

			For n=5, a(5)=9. Thus there is at least one prime between any two terms (5 excluded) in the arithmetic progression 5,10,....,45. Note that the progression continues to 5*A110835(5)=90 before there is no prime between 90 and 95. So A110835(5)=18 and 18>=9>=5.
		

Crossrefs

Programs

  • Mathematica
    nextprime[n_] := (If[n==1, 3, (j=n+1; While[!PrimeQ[j], j++]; j)]);Table[If[IntegerQ[nextprime[i]^2/i], nextprime[i]^2/i-1, Floor[nextprime[i]^2/i]], {i, 1, 100}]
    Join[{8},Table[Floor[NextPrime[n]^2/n],{n,2,70}]] (* Harvey P. Dale, Apr 27 2015 *)

Formula

a(n) = previousinteger(nextprime(n)^2/n) where the nextprime(n) excludes n and where previousinteger(i) gives i-1 when i is an integer.

A228775 a(n) is the maximal k>=1 such that nextprime(j*n)<=(j+1)*n, j=1,...,k.

Original entry on oeis.org

2, 3, 7, 5, 17, 14, 16, 24, 12, 19, 28, 43, 86, 80, 34, 82, 78, 73, 69, 66, 117, 329, 57, 222, 171, 228, 178, 470, 291, 359, 505, 366, 585, 576, 644, 544, 423, 742, 502, 636, 765, 466, 936, 578, 697, 682, 541, 1442, 640, 627, 615, 603, 2025, 1660, 570, 1833
Offset: 1

Views

Author

Vladimir Shevelev, Sep 04 2013

Keywords

Examples

			If n=3, then, for j=1, nextprime(3)<=6; for j=2, nextprime(6)<=9; for j=3,nextprime(9)<=12; for j=4, nextprime(12)<=15; for j=5, nextprime(15)<=18; for j=6,nextprime(18)<=21; for j=7, nextprime(21)<=24, BUT for j=8, nextprime(24)>27. Thus a(3)=7.
		

Crossrefs

Main sequence is A110835.

Programs

  • Mathematica
    a[n_] := For[k = 1, True, k++, If[NextPrime[k*n] <= (k+1)*n && NextPrime[(k+1)*n] > (k+2)*n, Return[k]]]; Table[a[n], {n, 1, 60}] (* Jean-François Alcover, Sep 05 2013 *)

Formula

Conjectural inequality: for n>=2, a(n) <= log^2(n*a(n)). This essentially corresponds to Cramer's conjecture for prime gaps.

Extensions

More terms from Peter J. C. Moses

A174741 a(n) = smallest m > 0 such that there are no primes between p*m and p*(m+1) inclusive where p is the n-th prime.

Original entry on oeis.org

4, 8, 18, 17, 29, 87, 79, 70, 58, 292, 506, 424, 766, 937, 542, 2026, 1820, 2842, 4960, 5215, 2136, 4687, 4461, 12809, 13992, 3666, 16231, 17662, 17338, 41935, 60010, 46063, 61469, 144060, 114441, 137956, 293037, 290348, 443629, 457617, 264395
Offset: 1

Views

Author

W. Edwin Clark, Mar 29 2010

Keywords

Crossrefs

Programs

  • Maple
    a:=proc(n) local m,p; p:=ithprime(n); for m from 2 do if nextprime(p*m)>p*(m+1) then return m; fi; od: end proc:

Extensions

Terms from a(37) on from R. J. Mathar, Apr 15 2010

A188542 Number of primes between n^3-n and n^3+n.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 3, 1, 2, 3, 2, 3, 2, 4, 4, 4, 3, 5, 5, 4, 4, 7, 4, 4, 8, 7, 6, 5, 6, 5, 4, 6, 6, 5, 6, 9, 5, 5, 5, 7, 9, 7, 5, 7, 12, 8, 8, 12, 7, 8, 13, 10, 10, 9, 10, 7, 11, 11, 11, 6, 5, 11, 13, 12, 8, 8, 14, 9, 5, 7, 5, 14, 12, 13, 8, 11, 15, 15, 12, 11, 5, 11, 17, 14, 15, 15, 12, 15, 14, 16, 14, 17, 13, 15, 15, 12, 6, 17, 16, 14
Offset: 1

Views

Author

Keywords

Comments

We include the end points in the range; this affects the value only for n=1.
Conjecture: the sequence contains no 0's. Verified up to n = 100000.

Crossrefs

Programs

  • PARI
    vector(100,m,sum(k=m^3-m,m^3+m,isprime(k)))

A367647 Irregular triangle read by rows in which row n lists the positive values k such that there are no primes between k*n and k*(n + 1), or -1 if no such k exists.

Original entry on oeis.org

1, 1, 2, 1, 4, 2, 1, 3, 4, 1, 2, 3, 2, 4, 2, 9, 1, 1, 6, 2, 3, 2, 7, 3, 5, 2, 6, 1, 6, 7, 10, 1, 3, 4, 2, 4, 5, 1, 2, 5, 1, 2, 3, 8, 1, 7, 1, 2, 2, 3, 5, 4, 7, 11, 3, 4, 2, 3, 1, 2, 10, 1, 4, 9, 1, 2, 6, 1, 4, 15, 4, 6, 2, 5, 8, 1, 2, 3, 4, 1, 3, 2, 3, 5, 8, 3, 5, 2, 4, 7, 2, 5, 1, 3, 12, 1, 2, 2, 4, 7
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Nov 25 2023

Keywords

Examples

			Triangle begins:
1;
1;
1;
2;
1;
4;
2;
1, 3, 4;
1;
2;
3;
2, 4;
2, 9;
1;
1, 6;
2, 3;
2, 7;
3, 5;
2, 6;
1, 6, 7, 10;
1, 3, 4;
2;
4, 5;
1, 2, 5;
1, 2, 3, 8.
		

Crossrefs

Showing 1-7 of 7 results.