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.

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