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-6 of 6 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

A167381 The numbers read down the left-center column of an arrangement of the natural numbers in square blocks.

Original entry on oeis.org

1, 3, 6, 10, 14, 18, 23, 29, 35, 41, 47, 53, 60, 68, 76, 84, 92, 100, 108, 116, 125, 135, 145, 155, 165, 175, 185, 195, 205, 215, 226, 238, 250, 262, 274, 286, 298, 310, 322, 334, 346, 358, 371, 385, 399, 413, 427, 441, 455, 469, 483, 497, 511, 525, 539, 553
Offset: 1

Views

Author

Paul Curtz, Nov 02 2009

Keywords

Comments

The natural numbers are filled into square blocks of edge length 2, 4, 6, 8, ...
by taking A016742(n+1) = 4, 16, 36, ... at a time:
.......1..2......
.......3..4......
....5..6..7..8...
....9.10.11.12...
...13.14.15.16...
...17.18.19.20...
21.22.23.24.25.26
27.28.29.30.31.32
33.34.35.36.37.38
39.40.41.42.43.44
Reading down the column just left from the center yields a(n).
The length of the rows is given by A001670.
The number of elements in each square block, 4, 16, 36, etc., are the first differences of A166464:
A016742(n) = A166464(n)-A166464(n-1).
Reading the blocks from right to left, row by row, we obtain a permutation of the integers, which starts similar to A166133.

Crossrefs

Cf. A113127, A167991 (first differences).

Programs

  • Mathematica
    r[1] = Range[4]; r[n_] := r[n] = Range[r[n-1][[-1]]+1, r[n-1][[-1]]+(2n)^2 ];
    s[n_] := Partition[r[n], Sqrt[Length[r[n]]]][[All, n]];
    A167381 = Table[s[n], {n, 1, 7}] // Flatten (* Jean-François Alcover, Mar 26 2017 *)
    Module[{nn=7,c},c=TakeList[Range[(2/3)*nn(nn+1)(2*nn+1)],(2*Range[ nn])^2]; Table[Take[c[[n]],{n,-1,2*n}],{n,nn}]]//Flatten (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Oct 18 2018 *)

Extensions

Edited by R. J. Mathar, Aug 29 2010
More terms from Jean-François Alcover, Mar 26 2017

A130829 2n+1 appears 2n times.

Original entry on oeis.org

3, 3, 5, 5, 5, 5, 7, 7, 7, 7, 7, 7, 9, 9, 9, 9, 9, 9, 9, 9, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 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, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17
Offset: 1

Views

Author

Paul Curtz, Jul 17 2007

Keywords

Crossrefs

Programs

  • Maple
    seq(2*n+1 $ 2*n, n=1..10); # Robert Israel, Jan 14 2015
  • Python
    from math import isqrt
    def A130829(n): return 1|((m:=isqrt(n))+int((n-m*(m+1)<<2)>=1)<<1) # Chai Wah Wu, Oct 17 2022

Formula

a(n) = 2*floor(sqrt(n)+1/2)+1. - Mikael Aaltonen, Jan 14 2015
From Robert Israel, Jan 14 2015: (Start)
G.f.: (x/(1-x))*(1+2*Sum_{m>=0} x^(m*(m+1))) = (x/(1-x))*(1+x^(-1/4)*theta_2(0,x)) where theta_2 is the second Jacobi theta function.
a(2n) = a(2n-1) = 2*A002024(n)+1.
a(n) = A001670(n)+1.
(End)

A306366 For any sequence s of positive integers without infinitely many consecutive equal terms, let T(s) be the sequence obtained by replacing each run, say of k consecutive t's, with a run of t consecutive k's; this sequence corresponds to T(K) (where K denotes the Kolakoski sequence A000002).

Original entry on oeis.org

1, 2, 2, 2, 1, 1, 1, 2, 2, 1, 2, 2, 2, 1, 1, 2, 2, 2, 1, 1, 1, 2, 1, 1, 1, 2, 2, 2, 1, 1, 2, 1, 1, 1, 2, 2, 1, 2, 2, 2, 1, 1, 1, 2, 2, 1, 1, 1, 2, 1, 1, 2, 2, 2, 1, 2, 2, 2, 1, 1, 1, 2, 2, 1, 2, 2, 2, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 1, 2, 2, 2, 1, 2, 2, 2, 1, 1
Offset: 1

Views

Author

Rémy Sigrist, Feb 10 2019

Keywords

Comments

If s is finite, then s and T(s) have the same sum.
Fixed points of T correspond to sequences where each run, say of t's, has t elements; A001650, A001670, A002024, A130196, A167817, A175944 and A213083 are fixed points of T.
When s has no consecutive equal terms, then T(s) is all 1's (A000012).
Apparently, T^4(K) = T^2(K) (where T^i denotes the i-th iterate of K).

Examples

			The first terms of the Kolakoski sequence are:
       +-----+     +--+  +-----+  +-----+     +--
       |     |     |  |  |     |  |     |     |
    +--+     +-----+  +--+     +--+     +-----+
    |#1|#2   |#3   |#4|#5|#6   |#7|#8   |#9   |#10 ...
    +--+-----+-----+--+--+-----+--+-----+-----+--
      1, 2, 2, 1, 1, 2, 1, 2, 2, 1, 2, 2, 1, 1, 2, ...
.
The first terms of this sequence are:
       +-----+--+        +-----+  +-----+--
       |     .  |        |     |  |     .
    +--+     .  +-----+--+     +--+     .
    |#1|#2   .#3|#4   .#5|#6   |#7|#8   .#9  ...
    +--+-----+--+-----+--+-----+--+-----+--
      1, 2, 2, 2, 1, 1, 1, 2, 2, 1, 2, 2, 2, ...
		

Crossrefs

Programs

  • PARI
    See Links section.

Formula

a(n) = A000002(ceiling(2*n/3)) (conjectured). - Jon Maiga, Jan 24 2021

A167384 Irregular table with the left half of the array described in A167381.

Original entry on oeis.org

1, 3, 5, 6, 9, 10, 13, 14, 17, 18, 21, 22, 23, 27, 28, 29, 33, 34, 35, 39, 40, 41, 45, 46, 47, 51, 52, 53, 57, 58, 59, 60, 65, 66, 67, 68, 73, 74, 75, 76, 81, 82, 83, 84, 89, 90, 91, 92, 97, 98, 99, 100
Offset: 0

Views

Author

Paul Curtz, Nov 02 2009

Keywords

Examples

			1;
3;
5,6;
9,10;
13,14;
17,18;
21,22,23;
27,28,29;
33,34,35;
39,40,41;
		

Crossrefs

Cf. A001670 (number of terms per row), A167381 (last term of row n), A167413.

Formula

T(n,k) = T(n,k-1)+1, k>=1.

A167413 Irregular array with the first differences of row A167384(n,.) in row n.

Original entry on oeis.org

2, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 1, 4, 1, 1, 4, 1, 1, 4, 1, 1, 4, 1, 1, 4, 1, 1, 4, 1, 1, 1, 5, 1, 1, 1, 5, 1, 1, 1, 5, 1, 1, 1, 5, 1, 1, 1, 5, 1, 1, 1, 5, 1, 1, 1, 5, 1, 1, 1, 5, 1, 1, 1, 1, 6, 1, 1, 1, 1, 6, 1, 1, 1, 1, 6, 1, 1, 1, 1, 6, 1, 1, 1, 1, 6, 1, 1, 1, 1, 6, 1, 1, 1, 1, 6, 1, 1, 1, 1, 6, 1, 1, 1, 1, 6
Offset: 0

Views

Author

Paul Curtz, Nov 03 2009

Keywords

Comments

The left column has 2 two's, 4 three's, 6 four's,... ,2*k-2 k's.
Entries in the remaining columns are all 1.
If one looks at the flattened sequence (2), (2), (1,3), (1,3), (1,3),.. in blocks of 1, 1, 2, 2, 2,.. , A000194(k) terms, the sum of entries in the subsequence in block number k is A001670(k).

Examples

			2;
2, 1;
3, 1;
3, 1;
3, 1;
3, 1, 1;
4, 1, 1;
4, 1, 1;
4, 1, 1;
4, 1, 1;
4, 1, 1;
4, 1, 1, 1;
5, 1, 1, 1;
5, 1, 1, 1;
5, 1, 1, 1;
5, 1, 1, 1;
5,...
		

Crossrefs

Cf. A167381.
Showing 1-6 of 6 results.