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

A001650 k appears k times (k odd).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

For n >= 0, a(n+1) is the number of integers x with |x| <= sqrt(n), or equivalently the number of points in the Z^1 lattice of norm <= n+1. - David W. Wilson, Oct 22 2006
The burning number of a connected graph of order n is at most a(n). See Bessy et al. - Michel Marcus, Jun 18 2018

References

  • J. H. Conway and N. J. A. Sloane, "Sphere Packings, Lattices and Groups", Springer-Verlag, p. 106.

Crossrefs

Partial sums of A000122.

Programs

  • Haskell
    a001650 n k = a001650_tabf !! (n-1) !! (k-1)
    a001650_row n = a001650_tabf !! (n-1)
    a001650_tabf = iterate (\xs@(x:_) -> map (+ 2) (x:x:xs)) [1]
    a001650_list = concat a001650_tabf
    -- Reinhard Zumkeller, Nov 14 2015
    
  • Mathematica
    a[1]=1,a[2]=3,a[3]=3,a[n_]:=a[n]=a[n-a[n-2]]+2 (* Branko Curgus, May 07 2010 *)
    Flatten[Table[Table[n,{n}],{n,1,17,2}]] (* Harvey P. Dale, Mar 31 2013 *)
  • PARI
    a(n)=if(n<1,0,1+2*sqrtint(n-1))
    
  • Python
    from math import isqrt
    def A001650(n): return 1+(isqrt(n-1)<<1) # Chai Wah Wu, Nov 23 2024

Formula

a(n) = 1 + 2*floor(sqrt(n-1)), n > 0. - Antonio Esposito, Jan 21 2002
From Michael Somos, Apr 29 2003: (Start)
G.f.: theta_3(x)*x/(1-x).
a(n+1) = a(n) + A000122(n). (End)
a(1) = 1, a(2) = 3, a(3) = 3, a(n) = a(n-a(n-2))+2. - Branko Curgus, May 07 2010
a(n) = 2*ceiling(sqrt(n)) - 1. - Branko Curgus, May 07 2010
Seen as a triangle read by rows: T(n,k) = 2*(n-1), k=1..n. - Reinhard Zumkeller, Nov 14 2015
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi/4 (A003881). - Amiram Eldar, Oct 01 2022

Extensions

More terms from Michael Somos, Apr 29 2003

A140513 Repeat 2^n n times.

Original entry on oeis.org

2, 4, 4, 8, 8, 8, 16, 16, 16, 16, 32, 32, 32, 32, 32, 64, 64, 64, 64, 64, 64, 128, 128, 128, 128, 128, 128, 128, 256, 256, 256, 256, 256, 256, 256, 256, 512, 512, 512, 512, 512, 512, 512, 512, 512, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024
Offset: 0

Views

Author

Paul Curtz, Jul 01 2008

Keywords

Crossrefs

Programs

  • Haskell
    a140513 n k = a140513_tabl !! (n-1) !! (k-1)
    a140513_row n = a140513_tabl !! (n-1)
    a140513_tabl = iterate (\xs@(x:_) -> map (* 2) (x:xs)) [2]
    a140513_list = concat a140513_tabl
    -- Reinhard Zumkeller, Nov 14 2015
    
  • Mathematica
    t={}; Do[r={}; Do[If[k==0||k==n, m=2^n, m=t[[n, k]] + t[[n, k + 1]]]; r=AppendTo[r, m], {k, 0, n}]; AppendTo[t, r], {n, 0, 10}]; t=Flatten[2 t] (* Vincenzo Librandi, Feb 17 2018 *)
    Table[Table[2^n,n],{n,10}]//Flatten (* Harvey P. Dale, Dec 04 2018 *)
  • Python
    from math import isqrt
    def A140513(n): return 1<<(m:=isqrt(k:=n+1<<1))+(k>m*(m+1)) # Chai Wah Wu, Nov 07 2024

Formula

a(n) = 2*A137688(n).
a(n) = A018900(n+1) - A059268(n). - Reinhard Zumkeller, Jun 24 2009
From Reinhard Zumkeller, Feb 28 2010: (Start)
Seen as a triangle read by rows: T(n,k)=2^n, 1 <= k <= n.
T(n,k) = A173786(n-1,k-1) + A173787(n-1,k-1), 1 <= k <= n. (End)
Sum_{n>=0} 1/a(n) = 2. - Amiram Eldar, Aug 16 2022

A193832 Irregular triangle read by rows in which row n lists 2n-1 copies of 2n-1 and n copies of 2n, for n >= 1.

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Aug 22 2011

Keywords

Comments

Sequence of successive positive integers k in which if k is odd then k appears k times, otherwise if k is even then k appears k/2 times.
Note that an arrangement of the blocks of this sequence shows the growth of the generalized pentagonal numbers A001318 (see example).
The sums of each block give the positive integers of A129194: 1, 2, 9, 8, 25, 18, 49,...
Partial sums of A080995. - Paolo P. Lava, Aug 23 2011.
Concatenations of rows of triangles A001650 and A111650; also, seen as a flat list, the row lengths of triangle A260672 and the first differences of its row sums (cf. A260706). - Reinhard Zumkeller, Nov 17 2015
Also a(n) = number of squares in the arithmetic progression {24k + 1: 0 <= k <= n-1} [Granville]. - N. J. A. Sloane, Dec 13 2017

Examples

			a) If written as a triangle the initial rows are
  1, 2,
  3, 3, 3, 4, 4,
  5, 5, 5, 5, 5, 6, 6, 6,
  7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8,
  9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10,
  ...
Row sums give A126587.
b) An application using the blocks of this sequence: the illustration of the growth of an arrangement which represents the generalized pentagonal numbers A001318. For example; the first 9 positive initial terms: 1, 2, 5, 7, 12, 15, 22, 26, 35.
.
.         9
.       8 9
.     8 7 9
.   8 6 7 9
. 8 6 5 7 9
. 6 4 5 7 9
. 4 3 5 7 9
. 2 3 5 7 9
. 1 3 5 7 9
...
		

Crossrefs

Programs

  • Haskell
    a193832 n k = a193832_tabf !! (n-1) !! (k-1)
    a193832_row n = a193832_tabf !! (n-1)
    a193832_tabf = zipWith (++) a001650_tabf a111650_tabl
    a193832' n = a193832_list !! (n - 1)
    a193832_list = concat a193832_tabf
    -- Reinhard Zumkeller, Nov 15 2015
  • Mathematica
    Array[Join @@ MapIndexed[ConstantArray[#, #/(1 + Boole[First@ #2 == 2])] &, {2 # - 1, 2 #}] &, 7] // Flatten (* or *)
    Table[If[k <= 2 n - 1, 2 n - 1, 2 n], {n, 7}, {k, 3 n - 1}] // Flatten (* Michael De Vlieger, Dec 14 2017 *)

Formula

a(n) = sqrt(8n/3) plus or minus 1 [Granville] - N. J. A. Sloane, Dec 13 2017
If 8 <= n <= 52, then a(n-1) < a(n) if and only if n is in A221672. - Jonathan Sondow, Dec 14 2017

Extensions

Edited by N. J. A. Sloane, Dec 13 2017

A111651 n appears 3n times.

Original entry on oeis.org

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

Views

Author

Jonathan Vos Post, Aug 12 2005

Keywords

Comments

Ramanujan theta functions: f(q) := Prod_{k>=1} (1-(-q)^k) (see A121373), phi(q) := theta_3(q) := Sum_{k=-oo..oo} q^(k^2) (A000122), psi(q) := Sum_{k=0..oo} q^(k*(k+1)/2) (A010054), chi(q) := Prod_{k>=0} (1+q^(2k+1)) (A000700).

Crossrefs

Programs

  • Mathematica
    Table[PadRight[{},3n,n],{n,10}]//Flatten (* Harvey P. Dale, Sep 15 2021 *)
  • PARI
    {a(n)=if(n<1, 0, polcoeff( x/(1-x)*prod(k=1, n\3, (1-x^(3*k))^(-1)^k, 1+O(x^n)), n))} /* Michael Somos, Aug 31 2006 */
    
  • PARI
    a(n) = sqrtint(24*n) \/ 6; \\ Kevin Ryde, Aug 31 2024
    
  • Python
    from math import isqrt
    def A111651(n): return isqrt((n<<3)//3)+1>>1 # Chai Wah Wu, Oct 05 2024

Formula

Expansion of (q/(1-q))psi(q^3) in powers of q where psi() is a Ramanujan theta function. - Michael Somos, Aug 31 2006
G.f.: x/(1-x)*Product_{k>0} (1-x^(3k))^((-1)^k).
a(n) = round(sqrt((2/3)*n)) = A002024(ceiling(n/3)). - Kevin Ryde, Aug 31 2024

A111652 3n appears n times.

Original entry on oeis.org

3, 6, 6, 9, 9, 9, 12, 12, 12, 12, 15, 15, 15, 15, 15, 18, 18, 18, 18, 18, 18, 21, 21, 21, 21, 21, 21, 21, 24, 24, 24, 24, 24, 24, 24, 24, 27, 27, 27, 27, 27, 27, 27, 27, 27, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 36, 36, 36, 36, 36
Offset: 1

Views

Author

Jonathan Vos Post, Aug 12 2005

Keywords

Crossrefs

Programs

  • Mathematica
    Flatten[Table[Table[3n,{n}],{n,15}]] (* Harvey P. Dale, Jul 23 2013 *)
  • Python
    from math import isqrt
    def A111652(n): return (m:=isqrt(n<<3)+1&-2)+(m>>1) # Chai Wah Wu, Jun 06 2025

Formula

a(n) = 3*A002024(n) = A111650(n)*3/2. - Chai Wah Wu, Jun 06 2025
Showing 1-5 of 5 results.