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.

A158405 Triangle T(n,m) = 1+2*m of odd numbers read along rows, 0<=m

Original entry on oeis.org

1, 1, 3, 1, 3, 5, 1, 3, 5, 7, 1, 3, 5, 7, 9, 1, 3, 5, 7, 9, 11, 1, 3, 5, 7, 9, 11, 13, 1, 3, 5, 7, 9, 11, 13, 15, 1, 3, 5, 7, 9, 11, 13, 15, 17, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23
Offset: 1

Views

Author

Paul Curtz, Mar 18 2009

Keywords

Comments

Row sums are n^2 = A000290(n).
The triangle sums, see A180662 for their definitions, link this triangle of odd numbers with seventeen different sequences, see the crossrefs. The knight sums Kn14 - Kn110 have been added. - Johannes W. Meijer, Sep 22 2010
A208057 is the eigentriangle of A158405 such that as infinite lower triangular matrices, A158405 * A208057 shifts the latter, deleting the right border of 1's. - Gary W. Adamson, Feb 22 2012
T(n,k) = A099375(n-1,n-k), 1<=k<=n. [Reinhard Zumkeller, Mar 31 2012]

Examples

			The triangle contains the first n odd numbers in row n:
  1;
  1,3;
  1,3,5;
  1,3,5,7;
From _Seiichi Manyama_, Dec 02 2017: (Start)
    |       a(n)        |                               | A000290(n)
   -----------------------------------------------------------------
   0|                                                      (=  0)
   1|                 1 = 1/3 * ( 3)                       (=  1)
   2|             1 + 3 = 1/3 * ( 5 +  7)                  (=  4)
   3|         1 + 3 + 5 = 1/3 * ( 7 +  9 + 11)             (=  9)
   4|     1 + 3 + 5 + 7 = 1/3 * ( 9 + 11 + 13 + 15)        (= 16)
   5| 1 + 3 + 5 + 7 + 9 = 1/3 * (11 + 13 + 15 + 17 + 19)   (= 25)
(End)
		

Crossrefs

Triangle sums (see the comments): A000290 (Row1; Kn11 & Kn4 & Ca1 & Ca4 & Gi1 & Gi4); A000027 (Row2); A005563 (Kn12); A028347 (Kn13); A028560 (Kn14); A028566 (Kn15); A098603 (Kn16); A098847 (Kn17); A098848 (Kn18); A098849 (Kn19); A098850 (Kn110); A000217 (Kn21. Kn22, Kn23, Fi2, Ze2); A000384 (Kn3, Fi1, Ze3); A000212 (Ca2 & Ze4); A000567 (Ca3, Ze1); A011848 (Gi2); A001107 (Gi3). - Johannes W. Meijer, Sep 22 2010

Programs

  • Haskell
    a158405 n k = a158405_row n !! (k-1)
    a158405_row n = a158405_tabl !! (n-1)
    a158405_tabl = map reverse a099375_tabl
    -- Reinhard Zumkeller, Mar 31 2012
    
  • Mathematica
    Table[2 Range[1, n] - 1, {n, 12}] // Flatten (* Michael De Vlieger, Oct 01 2015 *)
  • PARI
    a(n) = 2*(n-floor((-1+sqrt(8*n-7))/2)*(floor((-1+sqrt(8*n-7))/2)+1)/2)-1;
    vector(100, n, a(n)) \\ Altug Alkan, Oct 01 2015

Formula

a(n) = 2*i-1, where i = n-t(t+1)/2, t = floor((-1+sqrt(8*n-7))/2). - Boris Putievskiy, Feb 03 2013
a(n) = 2*A002262(n-1) + 1. - Eric Werley, Sep 30 2015

Extensions

Edited by R. J. Mathar, Oct 06 2009

A007607 Skip 1, take 2, skip 3, etc.

Original entry on oeis.org

2, 3, 7, 8, 9, 10, 16, 17, 18, 19, 20, 21, 29, 30, 31, 32, 33, 34, 35, 36, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130
Offset: 1

Views

Author

Keywords

Comments

Numbers k with the property that the smallest Dyck path of the symmetric representation of sigma(k) has a central peak. (Cf. A237593.) - Omar E. Pol, Aug 28 2018
Union of A317303 and A014105. - Omar E. Pol, Aug 29 2018

Examples

			From _Omar E. Pol_, Aug 29 2018: (Start)
Written as an irregular triangle in which the row lengths are the nonzero even numbers the sequence begins:
    2,   3;
    7,   8,   9,  10;
   16,  17,  18,  19,  20,  21;
   29,  30,  31,  32,  33,  34,  35,  36;
   46,  47,  48,  49,  50,  51,  52,  53,  54,  55;
   67,  68,  69,  70,  71,  72,  73,  74,  75,  76,  77,  78;
   92,  93,  94,  95,  96,  97,  98,  99, 100, 101, 102, 103, 104, 105;
  121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136;
...
Row sums give the nonzero terms of A317297.
Column 1 gives A130883, n >= 1.
Right border gives A014105, n >= 1.
(End)
		

References

  • R. Honsberger, Mathematical Gems III, M.A.A., 1985, p. 177.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Complement of A007606.
Similar to A360418.

Programs

  • Haskell
    a007607 n = a007607_list !! (n-1)
    a007607_list = skipTake 1 [1..] where
       skipTake k xs = take (k + 1) (drop k xs)
                       ++ skipTake (k + 2) (drop (2*k + 1) xs)
    -- Reinhard Zumkeller, Feb 12 2011
    
  • Haskell
    a007607_list' = f $ tail $ scanl (+) 0 [1..] where
       f (t:t':t'':ts) = [t+1..t'] ++ f (t'':ts)
    -- Reinhard Zumkeller, Feb 12 2011
  • Mathematica
    Flatten[ Table[i, {j, 2, 16, 2}, {i, j(j - 1)/2 + 1, j(j + 1)/2}]] (* Robert G. Wilson v, Mar 11 2004 *)
    With[{t=20},Flatten[Take[TakeList[Range[(t(t+1))/2],Range[t]],{2,-1,2}]]] (* Harvey P. Dale, Sep 26 2021 *)
  • PARI
    for(m=0,10,for(n=2*m^2+3*m+2,2*m^2+5*m+3,print1(n", "))) \\ Charles R Greathouse IV, Feb 12 2011
    

Formula

G.f.: 1/(1-x) * (1/(1-x) + x*Sum_{k>=1} (2k+1)*x^(k*(k+1))). - Ralf Stephan, Mar 03 2004
a(A000290(n)) = A001105(n). - Reinhard Zumkeller, Feb 12 2011
A057211(a(n)) = 0. - Reinhard Zumkeller, Dec 30 2011
a(n) = floor(sqrt(n) + 1/2)^2 + n = A053187(n) + n. - Ridouane Oudra, May 04 2019

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)

A128217 Nonnegative integers n such that the square-root of n differs from its nearest integer by less than 1/4.

Original entry on oeis.org

0, 1, 4, 5, 8, 9, 10, 15, 16, 17, 18, 23, 24, 25, 26, 27, 34, 35, 36, 37, 38, 39, 46, 47, 48, 49, 50, 51, 52, 61, 62, 63, 64, 65, 66, 67, 68, 77, 78, 79, 80, 81, 82, 83, 84, 85, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125
Offset: 1

Views

Author

John W. Layman, Feb 19 2007

Keywords

Comments

The squares are a subsequence; apparently A052928(n-1) = number of terms between (n-1)^2 and n^2. - Reinhard Zumkeller, Jun 20 2015

Crossrefs

Cf. A063656. See the first differences in A128218.

Programs

  • Haskell
    a128217 n = a128217_list !! (n-1)
    a128217_list = filter f [0..] where
       f x = 4 * abs (root - fromIntegral (round root)) < 1
             where root = sqrt $ fromIntegral x
    -- Reinhard Zumkeller, Jun 20 2015
    
  • Mathematica
    nsrQ[n_]:=Module[{sr=Sqrt[n]},Abs[First[sr-Nearest[{Floor[sr], Ceiling[sr]},sr]]]<1/4]; Select[Range[0,150],nsrQ] (* Harvey P. Dale, Aug 19 2011 *)
  • Python
    from itertools import count, islice
    from math import isqrt
    def A128217_gen(startvalue=0): # generator of terms >= startvalue
        return filter(lambda n:(m:=n<<4)<(k:=(isqrt(n)<<2)+1)**2 or m>(k+2)**2, count(max(startvalue,0)))
    A128217_list = list(islice(A128217_gen(),40)) # Chai Wah Wu, Jun 06 2025

Extensions

Offset changed by Reinhard Zumkeller, Jun 20 2015

A292564 Take 1, skip 3 * 1 - 1, take 2, skip 3 * 2 - 1, take 3, skip 3 * 3 - 1, ...

Original entry on oeis.org

0, 3, 4, 10, 11, 12, 21, 22, 23, 24, 36, 37, 38, 39, 40, 55, 56, 57, 58, 59, 60, 78, 79, 80, 81, 82, 83, 84, 105, 106, 107, 108, 109, 110, 111, 112, 136, 137, 138, 139, 140, 141, 142, 143, 144, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 210, 211, 212
Offset: 0

Views

Author

Seiichi Manyama, Sep 19 2017

Keywords

Crossrefs

Programs

  • Maple
    seq(seq(2*k^2+k+j,j=0..k),k=0..10); # Robert Israel, Sep 20 2017

Formula

a(n) = n + floor((sqrt(8*n+1)-1)/2)*(3*floor((sqrt(8*n+1)-1)/2)+1)/2. - Robert Israel, Sep 20 2017

A307508 Primes p for which the continued fraction expansion of sqrt(p) does not have a 1 in the second position.

Original entry on oeis.org

2, 5, 11, 17, 19, 29, 37, 41, 53, 67, 71, 83, 89, 101, 103, 107, 109, 127, 131, 149, 151, 173, 179, 181, 197, 199, 227, 229, 233, 239, 257, 263, 269, 271, 293, 331, 337, 367, 373, 379, 401, 409, 419, 443, 449, 457, 461, 487, 491, 499, 503, 541, 547, 577, 587, 593, 599
Offset: 1

Views

Author

Michel Marcus, Apr 11 2019

Keywords

Comments

These are the primes that are located between a square number and the following oblong number. - Charles Kusniec, Apr 17 2020
Primes in A063656. - Charles Kusniec, Sep 04 2022

Examples

			For p = 2,  we have [1; 2, ...]; see A040000.
For p = 5,  we have [2; 4, ...]; see A040002.
For p = 11, we have [3; 3, ...]; see A040007.
		

Crossrefs

Complement of A334163 with respect to the primes.

Programs

  • PARI
    isok(p) = isprime(p) && contfrac(sqrt(p))[2] != 1;

A377187 Triangle read by rows: T(n,k) = numerator((n^2 + k)/(n^2 - k)).

Original entry on oeis.org

3, 11, 2, 9, 19, 5, 27, 14, 29, 3, 19, 13, 5, 41, 7, 51, 26, 53, 27, 55, 4, 33, 67, 17, 69, 35, 71, 9, 83, 14, 85, 43, 29, 44, 89, 5, 51, 103, 13, 21, 53, 107, 27, 109, 11, 123, 62, 125, 63, 127, 64, 129, 65, 131, 6, 73, 49, 37, 149, 25, 151, 19, 17, 77, 155, 13
Offset: 2

Views

Author

Stefano Spezia, Oct 19 2024

Keywords

Examples

			The triangle begins as:
   3;
  11,   2;
   9,  19,  5;
  27,  14, 29,  3;
  19,  13,  5, 41,  7;
  51,  26, 53, 27, 55,   4;
  33,  67, 17, 69, 35,  71,  9;
  83,  14, 85, 43, 29,  44, 89,   5;
  51, 103, 13, 21, 53, 107, 27, 109, 11;
  ...
		

References

  • Steven R. Finch, Mathematical Constants, Encyclopedia of Mathematics and its Applications, vol. 94, Cambridge University Press, Section 1.3, p. 14.

Crossrefs

Cf. A001113, A026741, A063656, A164900, A377188 (denominator).

Programs

  • Mathematica
    T[n_,k_]:=Numerator[(n^2+k)/(n^2-k)]; Table[T[n,k],{n,2,12},{k,2,n}]//Flatten
  • Python
    from math import isqrt, comb, gcd
    def A377187(n): return (d:=(a:=(m:=isqrt(k:=n-1<<1))+(k>m*(m+1))+1)**2+(b:=n-comb(a-1,2)))//gcd(d,d-(b<<1)) # Chai Wah Wu, Nov 12 2024

Formula

Limit_{n->oo} Product_{k=1..n} T(n,k)/A377188(n,k) = e = A001113 (see Finch).
T(n,n) = A026741(n+1).
T(n,2) = A164900(n-1).
Showing 1-7 of 7 results.