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.

A260672 Table read by rows: T(n,k) = n - A001318(k), k = 0 .. A193832(n)-1.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Nov 15 2015

Keywords

Comments

Column k starts at row A001318(k); each column = A001477.

Examples

			.   0:    0
.   1:    1   0
.   2:    2   1   0
.   3:    3   2   1
.   4:    4   3   2
.   5:    5   4   3   0
.   6:    6   5   4   1
.   7:    7   6   5   2   0
.   8:    8   7   6   3   1
.   9:    9   8   7   4   2
.  10:   10   9   8   5   3
.  11:   11  10   9   6   4
.  12:   12  11  10   7   5   0
.  13:   13  12  11   8   6   1
.  14:   14  13  12   9   7   2
.  15:   15  14  13  10   8   3   0
.  16:   16  15  14  11   9   4   1
.  17:   17  16  15  12  10   5   2
.  18:   18  17  16  13  11   6   3
.  19:   19  18  17  14  12   7   4
.  20:   20  19  18  15  13   8   5  .
		

Crossrefs

Cf. A001318, A193832 (row lengths), A000041, A087960, A054440, A260664, A260706 (row sums).

Programs

  • Haskell
    a260672 n k = a260672_tabf !! n !! k
    a260672_row n = a260672_tabf !! n
    a260672_tabf = map (takeWhile (>= 0) . flip map a001318_list . (-)) [0..]

Formula

Number of m-tuples of partitions of n that have no part in common = Sum(A087960(k)*A000041(T(n,k))^m: k = 0 .. A193832(n+1)-1), e.g. A054440 (m=2) and A260664 (m=3); see Wilf link: p. 2, (3).

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

A126587 a(n) is the number of integer lattice points inside the right triangle with legs 3n and 4n (and hypotenuse 5n).

Original entry on oeis.org

3, 17, 43, 81, 131, 193, 267, 353, 451, 561, 683, 817, 963, 1121, 1291, 1473, 1667, 1873, 2091, 2321, 2563, 2817, 3083, 3361, 3651, 3953, 4267, 4593, 4931, 5281, 5643, 6017, 6403, 6801, 7211, 7633, 8067, 8513, 8971, 9441, 9923, 10417, 10923, 11441
Offset: 1

Views

Author

Zak Seidov, Jan 05 2007

Keywords

Comments

Row sums of triangle A193832. - Omar E. Pol, Aug 22 2011

Examples

			At n=1, three lattice points (1,1), (1,2) and (2,1) are inside the triangle with vertices at the points (0,0), (3n,0) and (0,4n); hence a(1)=3.
		

Crossrefs

Programs

  • Magma
    [6*n^2 - 4*n + 1: n in [1..50] ]; // Vincenzo Librandi, May 23 2011
    
  • Mathematica
    nip[a_,b_]:=Sum[Floor[b-b*i/a-10^-6],{i,a-1}] Table[nip[3k,4k],{k,100}]
    Table[6*n^2-4*n+1, {n,1,50}] (* G. C. Greubel, Mar 06 2018 *)
  • PARI
    a(n)=6*n^2-4*n+1 \\ Charles R Greathouse IV, Jun 17 2017

Formula

a(n) = A186424(2*n-1).
By Pick's theorem, a(n) = 6*n^2 - 4*n + 1. - Nick Hobson, Mar 13 2007
O.g.f.: x*(3+8*x+x^2)/(1-x)^3 = -1 - 12/(-1+x)^3 - 11/(-1+x) - 22/(-1+x)^2. - R. J. Mathar, Dec 10 2007
E.g.f.: exp(x)*(1 + 2*x + 6*x^2) - 1. - Stefano Spezia, May 09 2021
a(n) = (A000326(2n-1) + A000326(2n))/2. - Charlie Marion, Apr 17 2024

A111650 2n appears n times (n>0).

Original entry on oeis.org

2, 4, 4, 6, 6, 6, 8, 8, 8, 8, 10, 10, 10, 10, 10, 12, 12, 12, 12, 12, 12, 14, 14, 14, 14, 14, 14, 14, 16, 16, 16, 16, 16, 16, 16, 16, 18, 18, 18, 18, 18, 18, 18, 18, 18, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 24, 24, 24, 24, 24, 24, 24
Offset: 1

Views

Author

Jonathan Vos Post, Aug 12 2005

Keywords

Comments

Seen as a triangle read by rows: T(n,k) = 2*n, 1<=k<=n. - Reinhard Zumkeller, Mar 18 2011

Crossrefs

Programs

  • Haskell
    a111650 n k = a111650_tabl !! (n-1) !! (k-1)
    a111650_row n = a111650_tabl !! (n-1)
    a111650_tabl = iterate (\xs@(x:_) -> map (+ 2) (x:xs)) [2]
    a111650_list = concat a111650_tabl
    -- Reinhard Zumkeller, Nov 14 2015, Mar 18 2011
    
  • Mathematica
    Table[Table[2n,n],{n,12}]//Flatten (* Harvey P. Dale, Apr 21 2018 *)
  • Python
    from math import isqrt
    def A111650(n): return isqrt(n<<3)+1&-2 # Chai Wah Wu, Jun 06 2025

Formula

a(n) = 2*A002024(n). - Chai Wah Wu, Jun 06 2025

A221671 Maximum number of squares in a non-constant arithmetic progression (AP) of length n.

Original entry on oeis.org

1, 2, 3, 3, 4, 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
Offset: 1

Views

Author

Jonathan Sondow, Jan 24 2013

Keywords

Comments

Let s(n;d,i) denote the number of squares in AP i, i+d, i+2d, ..., i+(n-1)d. Then a(n) is the maximum of s(n;d,i) over all such APs with d > 0.
González-Jiménez and Xarles (2013) compute a(n) up to a(52) = 12 using elliptic curves (see Table 2, where their Q(N) = a(N)). They do not seem to have noticed that a(n) = A193832(n) for n != 5 in the range where they computed a(n). I conjecture that this formula holds for all n != 5.
Bombieri & Zannier prove that a(n) << n^(3/5) (log n)^c for some constant c > 0. It is conjectured that a(n) ~ sqrt(8n/3). - Charles R Greathouse IV, Jan 21 2022

Examples

			The AP 1, 25, 49 = 1^2, 5^2, 7^2 shows that a(3) = 3. By Fermat and Euler, no four squares are in AP, so a(4) = 3 (see A216869). Then the AP 49, 169, 289, 409, 529 = 7^2, 13^2, 17^2, 409, 23^2 shows that a(5) = 4 (see A216870).
		

References

  • Andrew Granville, "Squares in arithmetic progressions and infinitely many primes", The American Mathematical Monthly 124, no. 10 (2017), pp. 951-954.

Crossrefs

Programs

  • Mathematica
    (* note that an extension to more than 52 terms may not be correct *) row[n_] := Join[Table[2*n-1, {2*n-1}], Table[2*n, {n}]]; row[2] = {3, 3, 4, 4, 4}; Flatten[Table[row[n], {n, 1, 6}]][[1 ;; 52]] (* Jean-François Alcover, Jan 25 2013, from formula *)

Formula

a(n) = A193832(n) for n < 53 except for n = 5.
a(n) >= A193832(n) for all n. (Proof. A193832 equals the partial sums of A080995 (characteristic function of generalized pentagonal numbers A001318) and a term in the AP 1+24*k is a square if and only if k = A001318(x) = x*(3*x-1)/2 for some x. See González-Jiménez and Xarles (2013) Lemma 2.)
a(A221672(n)) = n.

A221672 Length of shortest non-constant arithmetic progression (AP) containing n squares.

Original entry on oeis.org

1, 2, 3, 5, 8, 13, 16, 23, 27, 36, 41, 52
Offset: 1

Views

Author

Jonathan Sondow, Jan 28 2013

Keywords

Comments

Same as where records occur in A221671 (maximum number of squares in a non-constant AP of length n).
González-Jiménez and Xarles (2013) conjecture that for n >= 5 the sequence a(n)-1 equals the tail 7, 12, 15, 22, 26, 35, 40, 51, ... of A001318 (generalized pentagonal numbers k*(3*k-1)/2 for k = 0, +-1, +-2, ...). They prove it up to a(12)-1 = 51 = 6*(3*6-1)/2.
See A221671 for additional comments.
Also 8, 13, 16, 23, 27, 36, 41, 52 are where records occur for 8 <= n <= 52 in A193832 (number of squares in the arithmetic progression {24k + 1: 0 <= k <= n-1} [Granville]). - Jonathan Sondow, Dec 15 2017

Examples

			The AP 1, 25, 49 = 1^2, 5^2, 7^2 shows that a(n) = n for n = 1, 2, 3 (see A216869).
By Fermat and Euler, no four squares are in AP, so the AP 49, 169, 289, 409, 529 = 7^2, 13^2, 17^2, 409, 23^2 shows that a(4) = 5 (see Dickson and A216870).
As k*(3*k-1)/2 = 0, 1, 2, 5, 7 for k = 0, +-1, +-2, and 24*k*(3*k-1)/2 + 1 = (6*k-1)^2 is a square, the AP 24*n+1 for the 8 numbers n = 0, 1, ..., 7 contains 5 squares, so a(5) <= 8. González-Jiménez and Xarles (2013) prove a(5) > 7, so a(5) = 8.
		

References

  • L. E. Dickson, History of the Theory of Numbers, Vol. II, Chelsea, New York, 1952, pp. 435-440.

Crossrefs

Formula

A221671(a(n)) = n.
a(n) <= A001318(n)+1. (Proof. As 24*k*(3*k-1)/2 + 1 = (6*k-1)^2, a term in the AP 24*m+1 is a square when m is in A001318. Thus the AP 24*m+1 for m = 0, 1, ..., A001318(n) contains n squares and has length A001318(n)+1.)

A260706 Row sums of A260672.

Original entry on oeis.org

0, 1, 3, 6, 9, 12, 16, 20, 25, 30, 35, 40, 45, 51, 57, 63, 70, 77, 84, 91, 98, 105, 112, 120, 128, 136, 144, 153, 162, 171, 180, 189, 198, 207, 216, 225, 235, 245, 255, 265, 275, 286, 297, 308, 319, 330, 341, 352, 363, 374, 385, 396, 408, 420, 432, 444, 456
Offset: 0

Views

Author

Reinhard Zumkeller, Nov 17 2015

Keywords

Comments

a(n) = Sum(A260672(n,k): k=0..A193832(n)-1);
A193832(n+1) = a(n+1) - a(n);
a(A001318(n+1)) = A212760(n).

Crossrefs

Programs

  • Haskell
    a260706 = sum . a260672_row
Showing 1-7 of 7 results.