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.

A122698 a(1)=a(2)=1 then a(n) = Sum_{d|n, 1 a(d)*a(n/d).

This page as a plain text file.
%I A122698 #11 Sep 05 2023 01:43:45
%S A122698 1,1,0,1,0,0,0,2,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,0,0,
%T A122698 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42,0,0,0,0,
%U A122698 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
%N A122698 a(1)=a(2)=1 then a(n) = Sum_{d|n, 1<d<n} a(d)*a(n/d).
%H A122698 Andrew Howroyd, <a href="/A122698/b122698.txt">Table of n, a(n) for n = 1..8192</a>
%F A122698 a(1) = 1, for k>=0 a(2^(k+1)) = A000108(k) and if n>1 is not a power of 2 a(n) = 0.
%t A122698 a[1] = a[2] = 1; a[n_] := a[n] = DivisorSum[n, a[#] * a[n/#] &, 1 < # < n &]; Array[a, 100]
%t A122698 (* or *)
%t A122698 a[n_] := Module[{e = IntegerExponent[n, 2]}, If[n == 2^e, CatalanNumber[e-1], 0]]; a[1] = 1; a[n_?OddQ] = 0; Array[a, 100] (* _Amiram Eldar_, Sep 05 2023 *)
%o A122698 (PARI) a(n)=if(n<3,1,sumdiv(n,d,if((d-1)*(d-n),a(d)*a(n/d),0)))
%o A122698 (PARI) a(n)={my(e=valuation(n,2)); if(n==1<<e, if(e==0, 1, binomial(2*e-2, e-1)/e), 0)} \\ _Andrew Howroyd_, Aug 05 2018
%Y A122698 Cf. A000108.
%K A122698 nonn,easy,mult
%O A122698 1,8
%A A122698 _Benoit Cloitre_, Sep 22 2006
%E A122698 Keyword:mult added by _Andrew Howroyd_, Aug 05 2018