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.

A063657 Numbers with property that truncated square root is unequal to rounded square root.

Original entry on oeis.org

3, 7, 8, 13, 14, 15, 21, 22, 23, 24, 31, 32, 33, 34, 35, 43, 44, 45, 46, 47, 48, 57, 58, 59, 60, 61, 62, 63, 73, 74, 75, 76, 77, 78, 79, 80, 91, 92, 93, 94, 95, 96, 97, 98, 99, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 133, 134, 135, 136, 137, 138, 139, 140
Offset: 1

Views

Author

Floor van Lamoen, Jul 24 2001

Keywords

Comments

Also: skip 1, take 0, skip 2, take 1, skip 3, take 2, ...
Integers for which the periodic part of the continued fraction for the square root of n begins with a 1. - Robert G. Wilson v, Nov 01 2001
a(n) belongs to the sequence if and only if a(n) > floor(sqrt(a(n))) * ceiling(sqrt(a(n))), i.e. a(n) in (k*(k+1),k^2), k >= 0. - Daniel Forgues, Apr 17 2011
Any integer between (k - 1/2)^2 and k^2 exclusive, for k > 1, is in this sequence. If we take this sequence and remove each term that is one more than the previous term, we obtain the central polygonal numbers (A002061). If instead we remove each term that is one less than the next term, we obtain numbers that are one less than squares (A005563). - Alonso del Arte, Dec 28 2013

Examples

			7 is in the sequence because its square root is 2.64575..., which truncates to 2 but rounds to 3.
8 is in the sequence because its square root is 2.828427..., which also truncates to 2 but rounds to 3.
9 is not in the sequence because its square root is 3 exactly, which truncates and rounds the same.
Here is the example per Lamoen's skip n, take n - 1 process: starting at 0, we skip one integer (0) but take zero integers for our sequence. Then we skip two integers (1 and 2) and take one integer (3) for our sequence. Then we skip three integers (4, 5, 6) and take two integers for our sequence (7 and 8, so the sequence now stands as 3, 7, 8). Then we skip four integers (9, 10, 11, 12) and so on and so forth.
From _Seiichi Manyama_, Sep 19 2017: (Start)
See R. B. Nelsen's paper.
   k|            A063656(n)         |            a(n)
   -------------------------------------------------------------------
   0|                             0
   1|                        1 +  2 =  3
   2|                   4 +  5 +  6 =  7 +  8
   3|              9 + 10 + 11 + 12 = 13 + 14 + 15
   4|        16 + 17 + 18 + 19 + 20 = 21 + 22 + 23 + 24
    | ...
(End)
The triangle begins as:
   3;
   7,  8;
  13, 14, 15;
  21, 22, 23, 24;
  31, 32, 33, 34, 35;
  43, 44, 45, 46, 47, 48;
  57, 58, 59, 60, 61, 62, 63;
  73, 74, 75, 76, 77, 78, 79, 80;
  91, 92, 93, 94, 95, 96, 97, 98, 99;
  ... - _Stefano Spezia_, Oct 20 2024
		

Crossrefs

Cf. A005563 (main diagonal), A059270 (row sums), A217575.

Programs

  • Haskell
    a063657 n = a063657_list !! n
    a063657_list = f 0 [0..] where
       f k (_:xs) = us ++ f (k + 1) (drop (k + 1) vs) where
                            (us, vs) = splitAt k xs
    -- Reinhard Zumkeller, Jun 20 2015
  • Maple
    A063657:=n->`if`(floor(floor(sqrt(n+1)) * (1+floor(sqrt(n+1)))/(n+1))=1, NULL, n+1); seq(A063657(n), n=1..200); # Wesley Ivan Hurt, Dec 28 2013
  • Mathematica
    Select[ Range[200], Floor[ Sqrt[ # ]] != Floor[ Sqrt[ # ] + 1/2] & ] (* or *) Select[ Range[200], First[ Last[ ContinuedFraction[ Sqrt[ # ]]]] == 1 & ]
  • PARI
    { n=0; for (m=0, 10^9, if (sqrt(m)%1 > .5, write("b063657.txt", n++, " ", m); if (n==1000, break)) ) } \\ Harry J. Smith, Aug 27 2009
    

Formula

a(n) = A217575(n) + 1. - Reinhard Zumkeller, Jun 20 2015
From Stefano Spezia, Oct 20 2024: (Start)
As a triangle:
T(n,k) = n^2 + n + k with 1 <= k <= n.
G.f.: x*y*(3 + x^2*(1 - 4*y) - x*(2 + y) + x^3*y*(1 + 2*y))/((1 - x)^3*(1 - x*y)^3). (End)

A063656 Numbers k such that the truncated square root of k is equal to the rounded square root of k.

Original entry on oeis.org

0, 1, 2, 4, 5, 6, 9, 10, 11, 12, 16, 17, 18, 19, 20, 25, 26, 27, 28, 29, 30, 36, 37, 38, 39, 40, 41, 42, 49, 50, 51, 52, 53, 54, 55, 56, 64, 65, 66, 67, 68, 69, 70, 71, 72, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 121
Offset: 0

Views

Author

Floor van Lamoen, Jul 24 2001

Keywords

Comments

Also: take 1, skip 0, take 2, skip 1, take 3, skip 2, ...
The union of sets of numbers in closed intervals [k^2,k^2+k], k >= 0, intervals 0 to 1, 1 to 2, 4 to 6, 9 to 12 etc. - J. M. Bergot, Jun 27 2013
Conjecture: the following definition produces a(n) for n >= 1: a(1) = 1; for n > 1, smallest number > a(n-1) satisfying the condition that a(n) is a square if and only if n is a triangular number. - J. Lowell, May 13 2014
Thus a(2) = 2, because 2 is not a triangular number and not a square; a(3) != 3, because 3 is not a square but is a triangular number; a(3) = 4 is OK because 4 is a square and 3 is a triangular number; etc. [Examples supplied by N. J. A. Sloane, May 13 2014]

Examples

			The triangle begins as:
   0;
   1,  2;
   4,  5,  6;
   9, 10, 11, 12;
  16, 17, 18, 19, 20;
  25, 26, 27, 28, 29, 30;
  36, 37, 38, 39, 40, 41, 42;
  49, 50, 51, 52, 53, 54, 55, 56;
  ... - _Stefano Spezia_, Oct 19 2024
		

Crossrefs

Essentially partial sums of A051340.

Programs

  • Haskell
    a063656 n = a063656_list !! n
    a063656_list = f 1 [0..] where
       f k xs = us ++ f (k + 1) (drop (k - 1) vs) where
                        (us, vs) = splitAt k xs
    -- Reinhard Zumkeller, Jun 20 2015
  • Mathematica
    Select[Range[121],Floor[Sqrt[#]]==Round[Sqrt[#]] &] (* Stefano Spezia, Oct 19 2024 *)
  • PARI
    { n=-1; for (m=0, 10^9, if (sqrt(m)%1 < .5, write("b063656.txt", n++, " ", m); if (n==1000, break)) ) } \\ Harry J. Smith, Aug 27 2009
    

Formula

As a triangle from Stefano Spezia, Oct 19 2024: (Start)
T(n,k) = n^2 + k with 0 <= k <= n.
G.f.: x*(1 + x + 2*y - 4*x*y + 3*x^3*y^2 - x^2*y*(2 + y))/((1 - x)^3*(1 - x*y)^3). (End)

A217570 Numbers n such that floor(sqrt(n)) = floor(n/(floor(sqrt(n))-1))-1.

Original entry on oeis.org

9, 16, 17, 25, 26, 27, 36, 37, 38, 39, 49, 50, 51, 52, 53, 64, 65, 66, 67, 68, 69, 81, 82, 83, 84, 85, 86, 87, 100, 101, 102, 103, 104, 105, 106, 107, 121, 122, 123, 124, 125, 126, 127, 128, 129, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 169, 170, 171, 172, 173
Offset: 1

Views

Author

Takumi Sato, Oct 07 2012

Keywords

Comments

The sequence consists of numbers n^2+k, 0<=k<=n-3, n=3,4,5,... - M. F. Hasler, Oct 09 2012
One of four sequences given by classifying natural numbers according to the value of floor(sqrt(n)). See the paper in Link lines and A005563, A217571, A217575. - Takumi Sato, Oct 09 2012

Examples

			As a triangle (see the first comment) this begins:
9;
16, 17;
25, 26, 27;
36, 37, 38, 39;
49, 50, 51, 52, 53;
64, 65, 66, 67, 68, 69;
81, 82, 83, 84, 85, 86, 87;
100, 101, 102, 103, 104, 105, 106, 107; etc.
[_Bruno Berselli_, Oct 12 2012]
		

Crossrefs

Programs

A217571 a(n) = (2*n*(n+5) + (2*n+1)*(-1)^n - 1)/8.

Original entry on oeis.org

1, 4, 5, 10, 11, 18, 19, 28, 29, 40, 41, 54, 55, 70, 71, 88, 89, 108, 109, 130, 131, 154, 155, 180, 181, 208, 209, 238, 239, 270, 271, 304, 305, 340, 341, 378, 379, 418, 419, 460, 461, 504, 505, 550, 551, 598, 599, 648, 649, 700, 701, 754, 755, 810, 811, 868
Offset: 1

Views

Author

Takumi Sato, Oct 07 2012

Keywords

Comments

One of four sequences given by classifying natural numbers according to the value of floor(sqrt(n)). See Sato link and sequences A005563, A217570, A217575.
Numbers n such that floor(sqrt(n)) = floor(n/floor(sqrt(n))) = floor(n/(floor(sqrt(n)) + 2)) + 1.

Examples

			From _Stefano Spezia_, Dec 14 2019: (Start)
Illustration of the initial terms:
o      o        o        o           o
     o o o    o o o    o o o       o o o
                o        o           o
                     o o o o o   o o o o o
                                     o
(1)   (4)      (5)     (10)        (11)
(End)
		

Crossrefs

Programs

  • GAP
    List([1..60], n-> (2*n^2 +10*n -1 +(-1)^n*(2*n+1))/8 ); # G. C. Greubel, Dec 19 2019
  • Magma
    [n: n in [1..900] | Floor(n/Isqrt(n)) eq Floor(n/(Isqrt(n)+2))+1]; // Bruno Berselli, Oct 10 2012
    
  • Magma
    I:=[1, 4, 5, 10, 11]; [n le 5 select I[n] else Self(n-1) + 2*Self(n-2) - 2*Self(n-3) - Self(n-4) + Self(n-5): n in [1..60]]; // Vincenzo Librandi, Dec 15 2012
    
  • Maple
    seq( (2*n^2 +10*n -1 +(-1)^n*(2*n+1))/8, n=1..60); # G. C. Greubel, Dec 19 2019
  • Mathematica
    CoefficientList[Series[(1 + 3*x - x^2 - x^3)/((1 + x)^2*(1 - x)^3), {x, 0, 40}], x] (* Vincenzo Librandi, Dec 15 2012 *)
    a[1]=1;a[n_]:=If[EvenQ[n],a[n-1]+1+n,a[n-1]+1]; Array[a,56] (* Stefano Spezia, Dec 18 2019 *)
  • Maxima
    makelist((2*n*(n+5)+(2*n+1)*(-1)^n-1)/8, n, 1, 56); /* Martin Ettl, Oct 15 2012 */
    
  • PARI
    vector(60, n, (2*n^2 +10*n -1 +(-1)^n*(2*n+1))/8 ) \\ G. C. Greubel, Dec 19 2019
    
  • Sage
    [(2*n^2 +10*n -1 +(-1)^n*(2*n+1))/8 for n in (1..60)] # G. C. Greubel, Dec 19 2019
    

Formula

G.f.: x*(1+3*x-x^2-x^3)/((1+x)^2*(1-x)^3). - Bruno Berselli, Oct 11 2012
From Stefano Spezia, Dec 14 2019: (Start)
E.g.f.: (x*(5+x)*cosh(x) - (1-7*x-x^2)*sinh(x))/4.
a(n) = a(n-1) + 1 for n odd.
a(n) = a(n-1) + n + 1 for n even.
a(2*n) = A028552(n).
a(2*n+1) = A028387(n).
(End)

Extensions

Definition by Bruno Berselli, Oct 11 2012
Showing 1-4 of 4 results.