login
This site is supported by donations to The OEIS Foundation.

 

Logo

Annual Appeal: Please make a donation (tax deductible in USA) to keep the OEIS running. Over 5000 articles have referenced us, often saying "we discovered this result with the help of the OEIS".

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A023533 a(n) = 1 if n is of the form m(m+1)(m+2)/6, and 0 otherwise. 40

%I

%S 1,1,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,

%T 0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,

%U 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0

%N a(n) = 1 if n is of the form m(m+1)(m+2)/6, and 0 otherwise.

%C a(n) is the characteristic function of tetrahedral numbers. - _Mikael Aaltonen_, Mar 28 2015

%H Danny Rorabaugh, <a href="/A023533/b023533.txt">Table of n, a(n) for n = 0..10000</a>

%H <a href="/index/Ch#char_fns">Index entries for characteristic functions</a>

%F a(A000292(n))=1; a(A145397(n))=0; a(n)=1-A014306(n). - _Reinhard Zumkeller_, Oct 14 2008

%F For n > 0, a(n) = floor(t(n) + 1/(3 * t(n)) - 1) - floor(t(n-1) + 1/(3 * t(n-1)) - 1), where t(n) = ( sqrt(243*n^2-1)/3^(3/2) + 3*n )^(1/3). - _Mikael Aaltonen_, Mar 28 2015

%t With[{ms=Table[m(m+1)(m+2)/6,{m,0,20}]},Table[If[MemberQ[ms,n],1,0], {n,0,100}]] (* _Harvey P. Dale_, Jul 25 2011 *)

%o (Sage) #Generates an array with at least N terms.

%o A = []

%o for m in range(ceil((6*N)^(1/3))):

%o ..A.extend([0]*(binomial(m+2,3) - len(A)) + [1])

%o # _Danny Rorabaugh_, Mar 16 2015

%o (PARI) lista(nn) = {v = vector(nn); for (n=0, nn, i = 1+n*(n+1)*(n+2)/6; if (i > nn, break); v[i] = 1;); v;} \\ _Michel Marcus_, Mar 16 2015

%Y Cf. A000292, A014306, A145397.

%K nonn,easy

%O 0,1

%A _Clark Kimberling_, Jun 14 1998

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified December 3 18:47 EST 2016. Contains 278745 sequences.