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.

A100506 Bisection of A001523.

This page as a plain text file.
%I A100506 #19 Apr 03 2023 14:25:58
%S A100506 1,4,15,47,130,330,784,1765,3804,7898,15880,31048,59220,110484,202070,
%T A100506 362974,641368,1116325,1916184,3247088,5436972,9002752,14752316,
%U A100506 23938188,38487496,61344055,96974176,152110204,236837795,366177506,562373990,858193804,1301654610
%N A100506 Bisection of A001523.
%H A100506 Alois P. Heinz, <a href="/A100506/b100506.txt">Table of n, a(n) for n = 0..5000</a>
%p A100506 seq(coeff(convert(series(add(-(-1)^k*x^(k*(k+1)/2),k=1..100)/(mul(1-x^k,k=1..100))^2,x,100),polynom),x,2*n+1),n=0..45); # (C. Ronaldo)
%p A100506 # second Maple program:
%p A100506 b:= proc(n, i) option remember;
%p A100506       `if`(i>n, 0, `if`(irem(n, i)=0, 1, 0)+
%p A100506       add(b(n-i*j, i+1)*(j+1), j=0..n/i))
%p A100506     end:
%p A100506 a:= n-> `if`(n=0, 1, b(2*n+1, 1)):
%p A100506 seq(a(n), n=0..60);  # _Alois P. Heinz_, Mar 26 2014
%t A100506 b[n_, i_]:= b[n, i]= If[i>n, 0, If[Mod[n, i]==0, 1, 0] + Sum[b[n-i*j, i + 1]*(j+1), {j, 0, n/i}]];
%t A100506 a[n_]:= If[n==0, 1, b[2*n+1, 1]];
%t A100506 Table[a[n], {n, 0, 60}] (* _Jean-François Alcover_, Jun 18 2018, after _Alois P. Heinz_ *)
%o A100506 (Magma)
%o A100506 m:=200;
%o A100506 R<x>:=PowerSeriesRing(Integers(), m);
%o A100506 b:= Coefficients(R!( 1 + (&+[ x^n*(1-x^n)/(&*[(1-x^j)^2: j in [1..n]]): n in [1..m+2]]) ));
%o A100506 A100506:= func< n | b[2*n+2] >;
%o A100506 [A100506(n): n in [0..80]]; // _G. C. Greubel_, Apr 03 2023
%o A100506 (SageMath)
%o A100506 @CachedFunction
%o A100506 def b(n, k): # Indranil Ghosh's code of A001523
%o A100506     if k>n: return 0
%o A100506     if n%k==0: x=1
%o A100506     else: x=0
%o A100506     return x + sum(b(n-k*j, k+1)*(j+1) for j in range(n//k + 1))
%o A100506 def A100506(n): return 1 if n==0 else b(2*n+1, 1)
%o A100506 [A100506(n) for n in range(41)] # _G. C. Greubel_, Apr 03 2023
%Y A100506 Cf. A001523.
%K A100506 nonn,easy
%O A100506 0,2
%A A100506 _N. J. A. Sloane_, Nov 24 2004
%E A100506 More terms from C. Ronaldo (aga_new_ac(AT)hotmail.com), Jan 19 2005