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.

Previous Showing 11-16 of 16 results.

A158464 Number of distinct squares in row n of Pascal's triangle.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1
Offset: 0

Views

Author

Reinhard Zumkeller, Mar 19 2009

Keywords

Comments

It seems that some subset of terms in A055997 (A115599) gives the positions of 3's. E.g., we have a(9) = a(50) = a(289) = a(9801) = 3, but on the other hand, a(1682) = a(57122) = 2. - Antti Karttunen, Nov 03 2017

Examples

			a(8) = #{1} = 1;
a(9) = #{1,9,36} = 3.
		

Crossrefs

Programs

  • Maple
    A158464 := proc(n)
        local sqset,k ;
        sqset := {} ;
        for k from 0 to n do
            P := binomial(n,k) ;
            if issqr(P) then
                sqset := sqset union {P} ;
            end if;
        end do:
        nops(sqset) ;
    end proc:
    seq(A158464(n),n=0..120) ; # R. J. Mathar, Jul 09 2016
  • Mathematica
    CountDistinct /@ Table[Sqrt@ Binomial[n, k] /. k_ /; ! IntegerQ@ k -> Nothing, {n, 0, 104}, {k, 0, n}] (* Michael De Vlieger, Nov 03 2017 *)
  • PARI
    A158464(n) = sum(k=0,n\2,issquare(binomial(n,k))); \\ Antti Karttunen, Nov 03 2017

Formula

a(n) = Sum_{k=0..floor(n/2)} A010052(A007318(n,k));
a(A000290(n)) > 1 for n > 1.

Extensions

More terms from Antti Karttunen, Nov 03 2017

A175492 Numbers m >= 3 such that binomial(m,3) + 1 is a square.

Original entry on oeis.org

7, 10, 24, 26, 65, 13777
Offset: 1

Views

Author

Ctibor O. Zizka, May 29 2010

Keywords

Comments

Related sequences:
Numbers m such that binomial(m,2) is a square: A055997;
Numbers m such that binomial(m,2) + 1 is a square: A006451 + 1;
Numbers m such that binomial(m,2) - 1 is a square: A072221 + 1;
Numbers m >= 3 such that binomial(m,3) is a square: {3, 4, 50} (Proved by A. J. Meyl in 1878);
Numbers m >= 4 such that binomial(m,4) + 1 is a square: {6, 7, 45, 55, ...};
Numbers m >= 7 such that binomial(m,7) + 1 is a square: {8, 10, 21, 143, ...}.
No additional terms up to 10 million. - Harvey P. Dale, Apr 04 2017
No additional terms up to 10 billion. - Jon E. Schoenfield, Mar 18 2022
No additional terms up to 1 trillion. The sequence is finite by Siegel's theorem on integral points. - David Radcliffe, Jan 01 2024

Crossrefs

Cf. A216268 (values of binomial(m, 3)) and A216269 (square roots of binomial(m, 3) + 1).

Programs

  • Mathematica
    lst = {}; k = 3; While[k < 10^6, If[ IntegerQ@ Sqrt[ Binomial[k, 3] + 1], AppendTo[lst, k]]; k++ ]; lst (* Robert G. Wilson v, Jun 11 2010 *)
    Select[Range[3,14000],IntegerQ[Sqrt[Binomial[#,3]+1]]&] (* Harvey P. Dale, Apr 04 2017 *)
  • PARI
    isok(m) = (m>=3) && issquare(binomial(m,3)+1); \\ Michel Marcus, Mar 15 2022
    
  • Python
    from sympy import binomial
    from sympy.ntheory.primetest import is_square
    for m in range(3, 10**6):
        if is_square(binomial(m,3)+1):
            print(m) # Mohammed Yaseen, Mar 18 2022

A270889 Integers n such that the circular graph C_n has a square size deficiency.

Original entry on oeis.org

3, 6, 27, 150, 867, 5046, 29403, 171366, 998787, 5821350, 33929307, 197754486, 1152597603, 6717831126, 39154389147, 228208503750, 1330096633347, 7752371296326, 45184131144603, 263352415571286, 1534930362283107, 8946229758127350, 52142448186480987, 303908459360758566, 1771308307978070403
Offset: 0

Views

Author

John Rafael M. Antalan, Mar 25 2016

Keywords

Comments

Define the size deficiency of a graph G as the number of edges needed to complete G. If G is a cycle graph C_n, this sequence gives the values of n for which C_n has a size deficiency which is a perfect square.

Programs

  • Mathematica
    a[0] = 3; a[1] = 6; a[n_] := a[n] = 6 a[n - 1] - a[n - 2] - 6; Table[a@ n, {n, 0, 24}] (* Michael De Vlieger, Mar 25 2016 *)
    LinearRecurrence[{7,-7,1},{3,6,27},30] (* Harvey P. Dale, Jan 23 2019 *)
  • PARI
    is(n)=issquare(n*(n-3)/2) \\ Charles R Greathouse IV, Mar 25 2016
    
  • PARI
    a(n)=([0,1,0;0,0,1;1,-7,7]^n*[3;6;27])[1,1] \\ Charles R Greathouse IV, Mar 25 2016
    
  • PARI
    Vec(3*(1-5*x+2*x^2)/((1-x)*(1-6*x+x^2)) + O(x^50)) \\ Colin Barker, Apr 03 2016

Formula

a(n+2) = 6*a(n+1) - a(n) - 6; a(0) = 3 , a(1) = 6.
G.f.: 3*(1-5*x+2*x^2)/((1-x)*(1-6*x+x^2)). - Joerg Arndt, Mar 25 2016
a(n) = 3 * A055997(n+1). - Joerg Arndt, Mar 25 2016
a(n) = 7*a(n-1)-7*a(n-2)+a(n-3) for n>2. - Colin Barker, Apr 03 2016
a(n) = 3*(2+(3-2*sqrt(2))^n+(3+2*sqrt(2))^n)/4. - Colin Barker, Apr 03 2016

A275151 a(1) = 8; a(n) = 3*a(n-1) + 2*sqrt(2*a(n-1)*(a(n-1)-7)) - 7 for n > 1.

Original entry on oeis.org

8, 25, 128, 729, 4232, 24649, 143648, 837225, 4879688, 28440889, 165765632, 966152889, 5631151688, 32820757225, 191293391648, 1114939592649, 6498344164232, 37875125392729, 220752408192128, 1286639323760025, 7499083534368008, 43707861882448009, 254748087760320032, 1484780664679472169
Offset: 1

Views

Author

Keywords

Comments

Related to A055997.
If we solve X^2 + (X+7)^2 = (X+N)^2 over the positive integers we find that the solutions belong to three sequences:
1) The first is a(1) = 7; a(n) = 3*a(n-1) + 2*sqrt(2*a(n-1)*(a(n-1)-7)) - 7 for n > 1: 7, 14, 63, 350, 2023, 11774, 68607, 399854, 2330503, 13583150, 79168383, 461427134, ... We observe that a(n) = 7*A055997(n).
2) The second is this sequence.
3) The third is a(1) = 9; a(n) = 3*a(n-1) + 2*sqrt(2*a(n-1)*(a(n-1)-7))-7 for n > 1: 9, 32, 169, 968, 5625, 32768, 190969, 1113032, 6487209, 37810208, 220374025, 1284433928, 7486229529, 43632943232, 254311429849, 1482235635848, ...
There is a property of the formula:
If y = 3*x + 2*sqrt(2*x*(x-q)) - q then x = 3*y - 2*sqrt(2*y*(y-q)) - q.
Let F(X) = 3*x - 2*sqrt(2*x*(x-7)) - 7.
Let us use this function:
With the 1st sequence: With the 2nd: With the 3rd:
F(2023)=350 F(729)=128 F(968)=169
F(350)=63 F(128)=25 F(169)=32
F(63)=14 F(25)=8 F(32)=9
F(14)=7 F(8)=9 F(9)=8
F(7)=14 F(9)=8 F(8)=9

Crossrefs

Cf. A055997.

Programs

  • Magma
    I:=[8]; [n le 1 select I[n] else Floor(3*Self(n-1) +2*Sqrt(2*Self(n-1)*(Self(n-1) - 7)) -7): n in [1..30]]; // G. C. Greubel, Oct 07 2018
  • Maple
    a:= proc(n) option remember; `if`(n=1, 8,
          3*a(n-1)+2*isqrt(2*a(n-1)*(a(n-1)-7))-7)
        end:
    seq(a(n), n=1..25);
  • Mathematica
    NestList[3 # + 2 Sqrt[2 # (# - 7)] - 7 &, 8, 23] (* Michael De Vlieger, Jul 18 2016 *)
  • PARI
    m=30; v=concat([8], vector(m-1)); for(n=2, m, v[n] = floor(3*v[n-1] +2*sqrt(2*v[n-1]*(v[n-1]-7))-7)); v \\ G. C. Greubel, Oct 07 2018
    

Formula

a(n) = 3*a(n-1) + 2*sqrt(2*a(n-1)*(a(n-1)-7)) - 7, for n > 1, with a(1)=8.
Conjectures from Colin Barker, Jul 19 2016: (Start)
a(n) = (14 + (11-6*sqrt(2))*(3+2*sqrt(2))^n + (3-2*sqrt(2))^n*(11+6*sqrt(2)))/4.
a(n) = 7*a(n-1) - 7*a(n-2) + a(n-3) for n > 3.
G.f.: x*(8 - 31*x + 9*x^2) / ((1-x)*(1 - 6*x + x^2)). (End)

A308085 a(n) is the least positive number k such that n*(n-1)/2 + k*(k-1)/2 is a square.

Original entry on oeis.org

1, 1, 2, 3, 4, 2, 6, 7, 1, 9, 10, 6, 3, 13, 14, 2, 16, 17, 18, 4, 6, 21, 3, 23, 24, 9, 5, 27, 13, 4, 30, 31, 2, 6, 34, 35, 5, 37, 38, 16, 7, 30, 23, 6, 44, 20, 46, 8, 16, 1, 7, 51, 12, 53, 9, 42, 23, 8, 58, 59, 60, 10, 27, 63, 9, 65, 20, 67, 11, 69, 6, 10, 72, 3, 44, 12, 21, 77, 11, 34, 80, 46
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Jun 05 2019

Keywords

Comments

a(n) <= n-1 if n > 1, because (n-1)*(n-2)/2 + n*(n-1)/2 = (n-1)^2.
a(7*k+2) <= k and a(7*k+6) <= k+2, because (7*k+2)*(7*k+1)/2 + k*(k-1)/2 = (5*k+1)^2 and (7*k+6)*(7*k+5)/2 + (k+2)*(k+1)/2 = (5*k+4)^2.
From Bernard Schott, Jun 27 2019: (Start)
a(m) = 1 iff the triangular number t(m-1) = (m-1)*m/2 is a square, so iff m-1 is in A001108, or m in A055997.
a(m) = 2 iff the triangular number t(m-1) + 1 is a square, so iff m-1 is in A006451. (End)

Examples

			a(5) = 4 because 4*3/2 + 5*4/2 = 4^2 and none of 1*0/2 + 5*4/2, 2*1/2 + 5*4/2, 3*2/2 + 5*4/2 are squares.
		

Crossrefs

Cf. A000217, A055997 (a(n)=1).

Programs

  • Maple
    f:= proc(n) local k;
      for k from 1 do
        if issqr((k*(k-1)+n*(n-1))/2) then return k fi
      od
    end proc:
    map(f, [$1..100]);
  • PARI
    a(n) = {my(k=1); while (!issquare(n*(n-1)/2 + k*(k-1)/2), k++); k;} \\ Michel Marcus, Jun 27 2019

A373504 Triangular array: row n gives the coefficients T(n,k) of powers x^(2k) in the series expansion of ((b^n + b^(-n))/2)^2, where b = x + sqrt(x^2 + 1).

Original entry on oeis.org

1, 1, 1, 1, 4, 4, 1, 9, 24, 16, 1, 16, 80, 128, 64, 1, 25, 200, 560, 640, 256, 1, 36, 420, 1792, 3456, 3072, 1024, 1, 49, 784, 4704, 13440, 19712, 14336, 4096, 1, 64, 1344, 10752, 42240, 90112, 106496, 65536, 16384, 1, 81, 2160, 22176, 114048, 329472, 559104, 552960, 294912, 65536
Offset: 0

Views

Author

Clark Kimberling, Aug 03 2024

Keywords

Comments

Related to Chebyshev polynomials of the first kind; see A123588.

Examples

			First 8 rows:
  1
  1    1
  1    4     4
  1    9    24     16
  1   16    80    128     64
  1   25   200    560    640    256
  1   36   420   1792   3456   3072   1024
  1   49   784   4704  13440  19612  14336  4096
The 4th polynomial is 1 + 9 x^2 + 24 x^4 + 16 x^6.
		

Crossrefs

Cf. A000012 (col 0), A000290 (col 1), A002415 ((1/4)*col(2)), A112742 (col 2), A000302 (T(n,n)), A123588, A008310.
Row sums give A055997(n+1).
Triangle without column 0 gives A334009.

Programs

  • Maple
    p:= proc(n) option remember; (b-> series(
          ((b^n+b^(-n))/2)^2, x, 2*n+1))(x+sqrt(x^2+1))
        end:
    T:= (n, k)-> coeff(p(n), x, 2*k):
    seq(seq(T(n,k), k=0..n), n=0..10);  # Alois P. Heinz, Aug 03 2024
  • Mathematica
    t[n_] := ((x + Sqrt[x^2 + 1])^n + (x + Sqrt[x^2 + 1])^(-n))/2
    u = Expand[Table[FullSimplify[Expand[t[n]]], {n, 0, 10}]^2]
    v = Column[CoefficientList[u, x^2]] (* array *)
    Flatten[v] (* sequence *)
    T[n_, k_] := If[k==0, 1, 4^(k - 1)*(2*Binomial[n + k, 2*k] - Binomial[n + k -1, 2*k -1])]; Flatten[Table[T[n,k],{n,0,9},{k,0,n}]] (* Detlef Meya, Aug 11 2024 *)

Formula

T(n, k) = if (k=0) then 1, otherwise 4^(k - 1)*(2*binomial(n + k, 2*k) - binomial(n + k - 1, 2*k - 1)). - Detlef Meya, Aug 11 2024
Previous Showing 11-16 of 16 results.