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-10 of 11 results. Next

A087057 Smallest number whose square is larger than 2*n^2.

Original entry on oeis.org

2, 3, 5, 6, 8, 9, 10, 12, 13, 15, 16, 17, 19, 20, 22, 23, 25, 26, 27, 29, 30, 32, 33, 34, 36, 37, 39, 40, 42, 43, 44, 46, 47, 49, 50, 51, 53, 54, 56, 57, 58, 60, 61, 63, 64, 66, 67, 68, 70, 71, 73, 74, 75, 77, 78, 80, 81, 83, 84, 85, 87, 88, 90, 91, 92, 94, 95, 97, 98, 99, 101
Offset: 1

Views

Author

Jens Voß, Aug 07 2003

Keywords

Comments

Integer solutions to the equation x=ceiling(r*floor(x/r)) where r=sqrt(2). - Benoit Cloitre, Feb 14 2004

Examples

			a(10) = 15 because the 15^2 = 225 is the smallest square number greater than 2*10^2 = 200.
Can be built by recursive removals:
start with 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, ...
get a(1) := 2 and remove the 2nd term (= 4):
[2] _ 3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, ...
get a(2) := 3 and remove the 3rd term (= 7):
[2, 3] _ 5, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, ...
get a(3) := 5 and remove the 5th term (= 11):
[2, 3, 5] _ 6, 8, 9, 10, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, ...
get a(4) := 6 and remove the 6th term (= 14):
[2, 3, 5, 6] _ 8, 9, 10, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22, 23, ...
get a(5) := 8 and remove the 8th term (= 18):
[2, 3, 5, 6, 8] _ 9, 10, 12, 13, 15, 16, 17, 19, 20, 21, 22, 23, 24, ...
get a(6) = 9 and remove the 9th term (= 21), etc.
- _Reinhard Zumkeller_, Feb 04 2014
		

Crossrefs

Programs

  • Haskell
    a087057 n = a087057_list !! (n-1)
    a087057_list = f [2..] where
       f (x:xs) = x : f (us ++ vs) where (us, _ : vs) = splitAt (x - 1) xs
    -- Reinhard Zumkeller, Feb 04 2014
  • Mathematica
    Ceiling[Range[110]Sqrt[2]] (* Harvey P. Dale, Oct 30 2013 *)
  • PARI
    a(n)=ceil(n*sqrt(2)) \\ Charles R Greathouse IV, Oct 24 2011
    
  • PARI
    a(n)=sqrtint(2*n^2+sqrtint(8*n^2)+1) \\ Charles R Greathouse IV, Oct 24 2011
    

Formula

a(n) = 1 + A001951(n) = 1 + floor(n*sqrt(2)) = sqrt(A087058(n)).
a(n) = ceiling(n*sqrt(2)). - Vincenzo Librandi, Oct 22 2011

A087059 Difference between 2*n^2 and the next greater square number.

Original entry on oeis.org

2, 1, 7, 4, 14, 9, 2, 16, 7, 25, 14, 1, 23, 8, 34, 17, 47, 28, 7, 41, 18, 56, 31, 4, 46, 17, 63, 32, 82, 49, 14, 68, 31, 89, 50, 9, 71, 28, 94, 49, 2, 72, 23, 97, 46, 124, 71, 16, 98, 41, 127, 68, 7, 97, 34, 128, 63, 161, 94, 25, 127, 56, 162, 89, 14, 124, 47, 161, 82, 1, 119
Offset: 1

Views

Author

Jens Voß, Aug 07 2003

Keywords

Comments

For n >= 2, a(n) is also the smallest absolute value of all negative values in row n of the triangle D(n, m) = n^2 - m^2 - 2*n*m, for 2 <= m + 1 <= n. The negative values in row n start with m = floor(n/(1 + sqrt(2))) + 1 = ceiling(n/(1 + sqrt(2))). See also a comment on A087056 for the smallest positive numbers in row n >= 3. - Wolfdieter Lang, Jun 11 2015

Examples

			a(10) = 25 because the difference between 2*10^2 = 200 and the next greater square number (225) is 25.
		

Crossrefs

Programs

  • Mathematica
    (Floor[Sqrt[#]]+1)^2-#&/@Table[2n^2,{n,80}] (* Harvey P. Dale, Jan 15 2023 *)
  • PARI
    a(n) = (1 + sqrtint(2*n^2))^2 - 2*n^2 \\ Michel Marcus, Jun 25 2013

Formula

a(n) = A087058(n) - 2*n^2 = A087057(n)^2 - 2*n^2 = (1 + A001951(n))^2 - 2*n^2 = (1 + floor(n*sqrt(2)))^2 - 2*n^2.
a(n) = 2*c(n)^2 - (n - c(n))^2, with c(n) := ceiling(n/(1 + sqrt(2))), n >= 1. - Wolfdieter Lang, Jun 11 2015

A120861 Fixed-k dispersion for Q = 8: Square array D(g,h) (g, h >= 1), read by ascending antidiagonals.

Original entry on oeis.org

1, 2, 7, 3, 12, 41, 4, 19, 70, 239, 5, 24, 111, 408, 1393, 6, 31, 140, 647, 2378, 8119, 8, 36, 181, 816, 3771, 13860, 47321, 9, 48, 210, 1055, 4756, 21979, 80782, 275807, 10, 53, 280, 1224, 6149, 27720, 128103, 470832, 1607521, 11, 60, 309, 1632, 7134
Offset: 1

Views

Author

Clark Kimberling, Jul 09 2006

Keywords

Comments

For each positive integer n, there exists a unique pair (j,k) of positive integers such that (j + k + 1)^2 - 4*k = 8*n^2; in fact, j(n) = A087056(n) and k(n) = A087059(n).
Suppose g >= 1 and let k = k(g). The numbers in row g of array D are among those n for which (j + k + 1)^2 - 4*k = 8*n^2 for some j; that is, k stays fixed and j and n vary - hence the name "fixed-k dispersion". (The fixed-j dispersion for Q = 8 is A120860.)
Every positive integer occurs exactly once in array D and every pair of rows are mutually interspersed. That is, beginning at the first term of any row having greater initial term than that of another row, all the following terms individually separate the individual terms of the other row.

Examples

			Northwest corner:
  1,  7,  41,  239, 1393,  8119,  47321, ...
  2, 12,  70,  408, 2378, 13860,  80782, ...
  3, 19, 111,  647, 3771, 21979, 128103, ...
  4, 24, 140,  816, 4756, 27720, 161564, ...
  5, 31, 181, 1055, 6149, 35839, 208885, ...
  6, 36, 210, 1224, 7134, 41580, 242346, ...
... [Edited by _Petros Hadjicostas_, Jul 07 2020]
		

Crossrefs

Cf. A087056, A087059, A120858, A120859, A120860, A120862, A120863, A336109 (first column), A002315 (first row), A001542 (2nd row), A253811 (3rd row).

Programs

  • PARI
    f(n) = 3*n + 2*sqrtint(2*n^2) + 2;
    unused(listus) = {my(v=vecsort(Vec(listus))); for (i=1, vecmax(v), if (!vecsearch(v, i), return (i)););};
    D(nb) = {my(m = matrix(nb, nb), t); my(listus = List); for (g=1, nb, if (g==1, t = 1, t = unused(listus)); m[g,1]=t; listput(listus, t); t = f(t); m[g,2]=t; listput(listus, t); for (h=3, nb, t = 6*m[g,h-1] - m[g,h-2]; m[g, h] = t; listput(listus, t););); m;}; \\ Michel Marcus, Jul 08 2020

Formula

Define f(n) = 3*n + 2*floor(n*sqrt(2)) + 2. Let D(g,h) be the term in row g and column h of the array to be defined:
D(1,1) = 1; D(1,2) = f(1); and D(1,h) = 6*D(1,h-1) - D(1,h-2) for h >= 3.
For arbitrary g >= 1, once row g is defined, define D(g+1,1) = least positive integer not in rows 1,2,...,g; D(g+1,2) = f(D(g+1,1)); and D(g+1,h) = 6*D(g+1,h-1) - D(g+1,h-2) for h >= 3. All rows after row 1 are thus inductively defined. [Corrected by Petros Hadjicostas, Jul 07 2020]

Extensions

Name edited by Petros Hadjicostas, Jul 07 2020

A087060 Difference between 2n^2 and the nearest square number.

Original entry on oeis.org

1, 1, 2, 4, 1, 8, 2, 7, 7, 4, 14, 1, 14, 8, 9, 17, 2, 23, 7, 16, 18, 7, 31, 4, 25, 17, 14, 32, 1, 36, 14, 23, 31, 8, 49, 9, 34, 28, 17, 49, 2, 47, 23, 28, 46, 7, 62, 16, 41, 41, 18, 68, 7, 56, 34, 31, 63, 4, 73, 25, 46, 56, 17, 89, 14, 63, 47, 32, 82, 1, 82, 36, 49, 73, 14, 103, 23, 68
Offset: 1

Views

Author

Jens Voß, Aug 07 2003

Keywords

Comments

max(a(n)/n) approaches sqrt(2), and the indices of the maxima are apparently in A227792. - Ralf Stephan, Sep 23 2013

Examples

			a(10) = 4 because the difference between 2*10^2 = 200 and the nearest square number (196) is 4.
		

Crossrefs

Programs

  • Mathematica
    dnsn[n_]:=Module[{c=2n^2,a,b},a=Floor[Sqrt[c]]^2;b=Ceiling[Sqrt[c]]^2;Min[c-a,b-c]]; Array[dnsn,80] (* Harvey P. Dale, Jul 01 2017 *)

Formula

a(n) = min [A087056(n), A087059(n)] = min [2*n^2 - (floor[n*sqrt(2)])^2, (1 + floor[n*sqrt(2)])^2 - 2*n^2]

A120860 Fixed-j dispersion for Q = 8: Square array D(g,h) (g, h >= 1), read by ascending antidiagonals.

Original entry on oeis.org

1, 2, 5, 3, 10, 29, 4, 17, 58, 169, 6, 22, 99, 338, 985, 7, 34, 128, 577, 1970, 5741, 8, 39, 198, 746, 3363, 11482, 33461, 9, 46, 227, 1154, 4348, 19601, 66922, 195025, 11, 51, 268, 1323, 6726, 25342, 114243, 390050, 1136689, 12, 63, 297, 1562, 7711
Offset: 1

Views

Author

Clark Kimberling, Jul 09 2006

Keywords

Comments

For each positive integer n, there exists a unique pair (j,k) of positive integers such that (j + k + 1)^2 - 4*k = 8*n^2; in fact, j(n) = A087056(n) and k(n) = A087059(n). Suppose g >= 1 and let j = j(g).
The numbers in row g of array D are among those n for which (j + k + 1)^2 - 4*k = 8*n^2 for some k; that is, j stays fixed and k and n vary - hence the name "fixed-j dispersion". (The fixed-k dispersion for Q = 8 is A120861.)
Every positive integer occurs exactly once in D and every pair of rows are mutually interspersed. That is, beginning at the first term of any row having greater initial term than that of another row, all the following terms individually separate the individual terms of the other row. Possibly, D is the dispersion of A098021.
From Petros Hadjicostas, Jul 08 2020: (Start)
It appears that the first column of the dispersion array D is A187968. That is, the first column of D consists of those positive integers m such that A187967(m) = 1; i.e., those m for which floor(sqrt(2)*m + 2*sqrt(2)) - floor(sqrt(2)*m) - floor(2*sqrt(2)) = 1.
Indeed, Clark Kimberling, the author of this sequence and of sequence A187968, conjectured that A187968 is the complement of A098021, and that A098021 is the complement of the first column of array D here. (End)

Examples

			Northwest corner:
  1,  5,  29,  169,  985,  5741,  33461,  195025, ...
  2, 10,  58,  338, 1970, 11482,  66922,  390050, ...
  3, 17,  99,  577, 3363, 19601, 114243,  665857, ...
  4, 22, 128,  746, 4348, 25342, 147704,  860882, ...
  6, 34, 198, 1154, 6726, 39202, 228486, 1331714, ...
  7, 39, 227, 1323, 7711, 44943, 261947, 1526739, ...
  ...
		

Crossrefs

Programs

  • PARI
    f(n) = 3*n + 2*sqrtint(2*n^2); \\ A098021
    unused(listus) = {my(v=vecsort(Vec(listus))); for (i=1, vecmax(v), if (!vecsearch(v, i), return (i)););};
    D(nb) = {my(m = matrix(nb, nb), t); my(listus = List); for (g=1, nb, if (g==1, t = 1, t = unused(listus)); m[g,1]=t; listput(listus, t); t = f(t); m[g,2]=t; listput(listus, t); for (h=3, nb, t = 6*m[g,h-1] - m[g,h-2]; m[g, h] = t; listput(listus, t););); m;}; \\ Michel Marcus, Jul 08 2020

Formula

Define f(n) = 3*n + 2*floor(n*2^(1/2)). Let D(g,h) be the term in row g and column h of the array to be defined:
D(1,1) = 1; D(1,2) = f(1); D(1,h) = 6*D(1,h-1) - D(1,h-2) for h >= 3.
For arbitrary g >= 1, once row g is defined, define D(g+1,1) = least positive integer not in rows 1, 2, ..., g; D(g+1,2) = f(D(g+1,1)); and D(g+1,h) = 6*D(g+1,h-1) - D(g+1,h-2) for h >= 3. All rows after row 1 are thus inductively defined. [Corrected by Petros Hadjicostas, Jul 07 2020]

Extensions

Name edited by Petros Hadjicostas, Jul 07 2020

A087055 Largest square number less than 2*n^2.

Original entry on oeis.org

1, 4, 16, 25, 49, 64, 81, 121, 144, 196, 225, 256, 324, 361, 441, 484, 576, 625, 676, 784, 841, 961, 1024, 1089, 1225, 1296, 1444, 1521, 1681, 1764, 1849, 2025, 2116, 2304, 2401, 2500, 2704, 2809, 3025, 3136, 3249, 3481, 3600, 3844, 3969, 4225, 4356, 4489
Offset: 1

Views

Author

Jens Voß, Aug 07 2003

Keywords

Examples

			a(10) = 196 because 196 is the largest square less than 2*10^2 = 200.
		

Crossrefs

Programs

  • Mathematica
    Table[Floor[Sqrt[2n^2-1]],{n,100}]^2  (* Harvey P. Dale, Mar 26 2011 *)
  • PARI
    a(n) = sqrtint(2*n^2)^2; \\ Michel Marcus, Jul 08 2020

Formula

a(n) = A001951(n)^2 = floor(n*sqrt(2))^2.

A087058 Smallest square number greater than 2*n^2.

Original entry on oeis.org

4, 9, 25, 36, 64, 81, 100, 144, 169, 225, 256, 289, 361, 400, 484, 529, 625, 676, 729, 841, 900, 1024, 1089, 1156, 1296, 1369, 1521, 1600, 1764, 1849, 1936, 2116, 2209, 2401, 2500, 2601, 2809, 2916, 3136, 3249, 3364, 3600, 3721, 3969, 4096, 4356, 4489
Offset: 1

Views

Author

Jens Voß, Aug 07 2003

Keywords

Examples

			A087058(10) = 225 because 225 is the smallest square number greater than 2*10^2 = 200.
		

Crossrefs

Programs

  • Mathematica
    Table[Ceiling[Sqrt[2n^2]]^2,{n,50}] (* Harvey P. Dale, Jan 22 2015 *)

Formula

A087058(n) = A087057(n)^2 = (1 + A001951(n))^2 = (1 + floor[n*sqrt(2)])^2

A257853 a(n) = 2*n^3 - floor(2^(1/3)*n)^3.

Original entry on oeis.org

0, 1, 8, 27, 3, 34, 89, 174, 24, 127, 272, 465, 81, 298, 575, 918, 192, 565, 1016, 1551, 375, 946, 1613, 2382, 648, 1459, 2384, 62, 1029, 2122, 3347, 263, 1536, 2953, 4520, 566, 2187, 3970, 5921, 989, 3000, 5191, 7568, 1550, 3993, 6634, 9479, 2267, 5184, 8317
Offset: 0

Views

Author

M. F. Hasler, May 28 2015

Keywords

Comments

Is there a simple expression for a nontrivial lower bound for a(n)?

Examples

			a(4) = 2*4^3 - floor(2^(1/3)*4)^3 = 2*64 - 5^3 = 3.
a(5) = 2*5^3 - floor(2^(1/3)*5)^3 = 2*125 - 6^3 = 34.
		

Crossrefs

Cf. A087056 (analog for squares), A257854, A257855 (4th & 5th power).

Programs

  • Magma
    [2*n^3 - Floor(2^(1/3)*n)^3: n in [0..50]]; // Vincenzo Librandi, May 29 2015
  • Mathematica
    Table[2 n^3 - Floor[2^(1/3) n]^3, {n, 0, 60}] (* Vincenzo Librandi, May 29 2015 *)
  • PARI
    f(n,e=3,b=2)=n^e*b-floor(sqrtn(b,e)*n)^e
    

A257854 a(n) = 2*n^4 - floor(2^(1/4)*n)^4.

Original entry on oeis.org

0, 1, 16, 81, 256, 625, 191, 706, 1631, 3122, 5359, 721, 3056, 6497, 11296, 17729, 751, 7042, 15471, 26386, 40159, 57186, 11536, 28241, 48896, 73969, 103952, 14306, 43391, 78226, 119375, 167426, 12016, 58401, 112672, 175489, 247536, 226, 69647, 149426, 240319
Offset: 0

Views

Author

M. F. Hasler, May 28 2015

Keywords

Comments

Is there a simple expression for a nontrivial lower bound for a(n)?

Examples

			a(5) = 2*5^4 - floor(2^(1/4)*5)^4 = 2*625 - 5^4 = 625.
a(6) = 2*6^4 - floor(2^(1/4)*6)^4 = 2*1296 - 7^4 = 191.
		

Crossrefs

Cf. A087056 (analog for squares), A257853 & A257855 (3rd & 5th power).

Programs

  • Magma
    [2*n^4 - Floor(2^(1/4)*n)^4: n in [0..50]]; // Vincenzo Librandi, May 29 2015
  • Mathematica
    Table[2 n^4 - Floor[2^(1/4) n]^4, {n, 0, 60}] (* Vincenzo Librandi, May 29 2015 *)
  • PARI
    f(n,e=4,b=2)=n^e*b-floor(sqrtn(b,e)*n)^e
    

A257855 a(n) = 2*n^5 - floor(2^(1/5)*n)^5.

Original entry on oeis.org

0, 1, 32, 243, 1024, 3125, 7776, 846, 6487, 18098, 38949, 73270, 126371, 204762, 27072, 98893, 207584, 363615, 579136, 868097, 1246368, 205578, 541639, 991310, 1576341, 2320882, 3251603, 68663, 866304, 1886905, 3164576, 4736427, 6642688, 8926829, 646649, 2643750
Offset: 0

Views

Author

M. F. Hasler, May 28 2015

Keywords

Comments

Is there a simple expression for a nontrivial lower bound for a(n)?

Examples

			a(6) = 2*6^5 - floor(2^(1/5)*6)^5 = 2*7776 - 6^5 = 7776.
a(7) = 2*7^5 - floor(2^(1/5)*7)^5 = 2*16807 - 8^5 = 846.
		

Crossrefs

Cf. A087056 (analog for squares), A257853, A257854 (3rd & 4th power).

Programs

  • Magma
    [2*n^5 - Floor(2^(1/5)*n)^5: n in [0..50]]; // Vincenzo Librandi, May 29 2015
  • Mathematica
    Table[2 n^5 - Floor[2^(1/5) n]^5, {n, 0, 60}] (* Vincenzo Librandi, May 29 2015 *)
  • PARI
    f(n,e=5,b=2)=n^e*b-floor(sqrtn(b,e)*n)^e
    
Showing 1-10 of 11 results. Next