login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Number of partitions of n into non-consecutive distinct squares.
2

%I #27 Nov 03 2023 15:32:14

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

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

%U 1,1,0,0,0,1,2,1,0,0,1,0,1,2,1,1,2,1,0,0,0,1,2,1,0,1,0,0,0,1,2,1,2,3,0,0,2,0,1,1,0,2,3,0,0,0,0,1,3,3,1,0,2,2,1,0,0,2,2,1,0,1

%N Number of partitions of n into non-consecutive distinct squares.

%C a(n) <= A033461(n).

%C The golden ratio equals the limit, as n approaches infinity, of the following quotient: (number of partitions of order <= n consisting of distinct squares with no consecutive squares and no 1-part) / Sum_{i=1..n} a(i). - _John M. Campbell_, Aug 14 2021

%H Alois P. Heinz, <a href="/A220945/b220945.txt">Table of n, a(n) for n = 0..10000</a> (terms n = 0..1000 from Paul Tek)

%p b:= proc(n,i) option remember; `if`(n=0, 1,

%p `if`(i<1, 0, b(n, i-1)+`if`(i^2>n, 0, b(n-i^2, i-2))))

%p end:

%p a:= n-> b(n, isqrt(n)):

%p seq(a(n), n=0..200); # _Alois P. Heinz_, Apr 15 2013

%t b[n_, i_] := b[n, i] = If[n==0, 1, If[i<1, 0, b[n, i-1] + If[i^2>n, 0, b[n - i^2, i-2]]]]; a[n_] := b[n, Floor[Sqrt[n]]]; Table[a[n], {n, 0, 200}] (* _Jean-François Alcover_, Feb 07 2017, after _Alois P. Heinz_ *)

%o (PARI) a(n) = local(t=0, d=0, nd=0); for(k=1,sqrt(n),nd=(1+t)*x^k^2;t=t+d;d=nd);return(polcoeff(1+t+d,n))

%Y Cf. A000290, A003714, A033461.

%K nonn

%O 0,54

%A _Paul Tek_, Apr 14 2013