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.

A141631 a(n) = 3*n^2 - 4*n + 3.

Original entry on oeis.org

2, 7, 18, 35, 58, 87, 122, 163, 210, 263, 322, 387, 458, 535, 618, 707, 802, 903, 1010, 1123, 1242, 1367, 1498, 1635, 1778, 1927, 2082, 2243, 2410, 2583, 2762, 2947, 3138, 3335, 3538, 3747, 3962, 4183, 4410, 4643, 4882, 5127, 5378, 5635, 5898, 6167, 6442
Offset: 1

Views

Author

Paul Curtz, Aug 28 2008

Keywords

Comments

First bisection of A133146.
Also first bisection of A271713. - Bruno Berselli, Mar 19 2021

Crossrefs

Cf. A000004 (third differences), A010722 (second differences).

Programs

Formula

a(n) = A133146(2*n-2) = (n - 2)^2 + (n - 1)*(n + 1) + n^2.
First differences: a(n+1) - a(n) = A016969(n-1).
G.f.: x*(2 + x + 3*x^2)/(1 - x)^3. - R. J. Mathar, Oct 15 2008
a(n) = 6*n + a(n-1) - 7 for n > 1, a(1)=2. - Vincenzo Librandi, Nov 25 2010
a(n) = 2*A000290(n)^2 + A067998(n-1) = 2*n^2 + (n - 1)*(n - 3). - L. Edson Jeffery, Nov 30 2013
From Elmo R. Oliveira, Nov 13 2024: (Start)
E.g.f.: exp(x)*(3*x^2 - x + 3) - 3.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n > 3. (End)

Extensions

Edited and extended by R. J. Mathar, Oct 15 2008

A352666 Maximum number of induced copies of the claw graph K_{1,3} in an n-node graph.

Original entry on oeis.org

0, 0, 0, 1, 4, 10, 20, 40, 70, 112, 176, 261, 372, 520, 704, 935, 1220, 1560, 1976, 2464, 3038, 3710, 4480, 5376, 6392, 7548, 8856, 10320, 11970, 13800, 15840, 18095, 20580, 23320, 26312, 29601, 33176, 37072, 41300, 45875, 50830, 56160, 61920, 68096, 74732
Offset: 1

Views

Author

Pontus von Brömssen, Mar 26 2022

Keywords

Comments

The sequence (a(n)/binomial(n,4)) is decreasing for n >= 4 and converges to 1/2, the inducibility of the claw graph.
Brown and Sidorenko (1994) prove that a bipartite optimal graph (i.e., an n-node graph with a(n) induced claw graphs) exists for all n. For n >= 2, the size k of the smallest part of an optimal bipartite graph K_{k,n-k} is one of the two integers closest to n/2 - sqrt(3*n/4-1), and a(n) = binomial(k,3)*(n-k) + binomial(n-k,3)*k. Both are optimal if and only if n is in A271713. For 7 <= n <= 10 (and, trivially, n = 3), the tripartite graph K_{1,1,n-2} is also optimal.

Crossrefs

Cf. A271713.
Maximum number of induced copies of other graphs: A028723 (4-node cycle), A111384 (3-node path), A352665 (4-node path), A352667 (paw graph), A352668 (diamond graph), A352669 (cycles).

Programs

  • Python
    from math import comb,isqrt
    def A352666(n):
        if n <= 1: return 0
        r = isqrt(3*n-4)
        k0 = (n-r-1)//2
        return max(comb(k,3)*(n-k)+comb(n-k,3)*k for k in (k0,k0+1))

A271675 Numbers m such that 3*m + 4 is a square.

Original entry on oeis.org

0, 4, 7, 15, 20, 32, 39, 55, 64, 84, 95, 119, 132, 160, 175, 207, 224, 260, 279, 319, 340, 384, 407, 455, 480, 532, 559, 615, 644, 704, 735, 799, 832, 900, 935, 1007, 1044, 1120, 1159, 1239, 1280, 1364, 1407, 1495, 1540, 1632, 1679, 1775, 1824, 1924, 1975, 2079, 2132, 2240, 2295, 2407
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Apr 12 2016

Keywords

Comments

7 is the unique prime in this sequence. If m is in this sequence, then 3*m + 4 = k^2 for k is nonzero integer, that is, m = (k^2 - 4)/3 = (k-2)*(k+2)/3. So m can be only prime if one of divisors is prime and another one is 1. Otherwise there should be more than 1 prime divisors, that is n must be composite. - Altug Alkan, Apr 12 2016
From Ray Chandler, Apr 12 2016: (Start)
Square roots of resulting squares gives A001651 (with a different starting point).
Sequence is the union of (positive terms) in A140676 and A270710. (End)
The sequence terms are the exponents in the expansion of Sum_{n >= 0} q^n*(1 - q)*(1 - q^3)*...*(1 - q^(2*n+1)) = 1 - q^4 - q^7 + q^15 + q^20 - q^32 - q^50 + + - - .... - Peter Bala, Dec 19 2024

Examples

			a(4) = 32 because 3*32 + 4 = 100 = 10*10.
		

Crossrefs

Cf. numbers n such that 3*n + k is a square: A120328 (k=-6), A271713 (k=-5), A056107 (k=-3), A257083 (k=-2), A033428 (k=0), A001082 (k=1), A080663 (k=3), this sequence (k=4), A100536 (k=6).

Programs

  • Magma
    [n: n in [0..4000] | IsSquare(3*n+4)];
    
  • Mathematica
    Select[Range[0,2500], IntegerQ@ Sqrt[3 # + 4] &] (* Michael De Vlieger, Apr 12 2016 *)
    LinearRecurrence[{1,2,-2,-1,1},{0,4,7,15,20},60] (* Harvey P. Dale, Dec 09 2016 *)
  • Python
    from gmpy2 import is_square
    for n in range(0,10**5):
        if(is_square(3*n+4)):print(n)
    # Soumil Mandal, Apr 12 2016

Formula

O.g.f.: x^2*(4 + 3*x - x^3)/((1 + x)^2*(1 - x)^3).
E.g.f.: 1 + (1 - 2*x)*exp(-x)/8 - 3*(3 - 4*x - 2*x^2)*exp(x)/8.
a(n) = A001082(n+1) - 1 = (6*n*(n+1) + (2*n + 1)*(-1)^n - 1)/8 - 1. Therefore: a(2*k+1) = k*(3*k+4), a(2*k) = (k+1)*(3*k-1).
Sum_{n>=2} 1/a(n) = 19/16 - Pi/(4*sqrt(3)). - Amiram Eldar, Jul 26 2024

Extensions

Edited and extended by Bruno Berselli, Apr 12 2016

A271723 Numbers k such that 3*k - 8 is a square.

Original entry on oeis.org

3, 4, 8, 11, 19, 24, 36, 43, 59, 68, 88, 99, 123, 136, 164, 179, 211, 228, 264, 283, 323, 344, 388, 411, 459, 484, 536, 563, 619, 648, 708, 739, 803, 836, 904, 939, 1011, 1048, 1124, 1163, 1243, 1284, 1368, 1411, 1499, 1544, 1636, 1683, 1779, 1828, 1928, 1979, 2083, 2136, 2244, 2299
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Apr 13 2016

Keywords

Comments

Square roots of resulting squares gives A001651. - Ray Chandler, Apr 14 2016

Examples

			a(1) = 3 because 3*3 - 8 = 1^2.
		

Crossrefs

Cf. A001651.
Cf. numbers n such that 3*n + k is a square: this sequence (k=-8), A120328 (k=-6), A271713 (k=-5), A056107 (k=-3), A257083 (k=-2), A033428 (k=0), A001082 (k=1), A080663 (k=3), A271675 (k=4), A100536 (k=6), A271741 (k=7), A067725 (k=9).

Programs

  • Magma
    [n: n in [1..2400] | IsSquare(3*n-8)];
    
  • Maple
    seq(seq(((3*m+k)^2+8)/3, k=1..2),m=0..50); # Robert Israel, Dec 05 2016
  • Mathematica
    Select[Range@ 2400, IntegerQ@ Sqrt[3 # - 8] &] (* Bruno Berselli, Apr 14 2016 *)
    LinearRecurrence[{1,2,-2,-1,1},{3,4,8,11,19},60] (* Harvey P. Dale, Oct 02 2020 *)
  • Python
    from gmpy2 import is_square
    [n for n in range(3000) if is_square(3*n-8)] # Bruno Berselli, Dec 05 2016
    
  • Python
    [(6*(n-1)*n-(2*n-1)*(-1)**n+23)/8 for n in range(1, 60)] # Bruno Berselli, Dec 05 2016

Formula

From Ilya Gutkovskiy, Apr 13 2016: (Start)
G.f.: x*(3 + x - 2*x^2 + x^3 + 3*x^4)/((1 - x)^3*(1 + x)^2).
a(n) = (6*(n - 1)*n - (2*n - 1)*(-1)^n + 23)/8. (End)

A271740 a(n) = 3*n^2 - 2*n + 2.

Original entry on oeis.org

2, 3, 10, 23, 42, 67, 98, 135, 178, 227, 282, 343, 410, 483, 562, 647, 738, 835, 938, 1047, 1162, 1283, 1410, 1543, 1682, 1827, 1978, 2135, 2298, 2467, 2642, 2823, 3010, 3203, 3402, 3607, 3818, 4035, 4258, 4487, 4722, 4963, 5210, 5463, 5722, 5987, 6258, 6535, 6818, 7107, 7402, 7703
Offset: 0

Views

Author

Ray Chandler, Apr 13 2016

Keywords

Comments

3*a(n) - 5 is a square. - Vincenzo Librandi, Apr 13 2016

Crossrefs

Programs

Formula

From Bruno Berselli, Apr 13 2016: (Start)
O.g.f.: (3 + x + 2*x^2)/(1 - x)^3.
E.g.f.: (3 + 7*x + 3*x^2)*exp(x). (End)
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n>2. - Wesley Ivan Hurt, Apr 13 2016

Extensions

Definition changed so sequence starts one term earlier. Some formulas may need adjusting. - N. J. A. Sloane, Jun 22 2021
Showing 1-5 of 5 results.