OFFSET
0,1
EXAMPLE
a(5)=42 because the 5th partition number is 7 and the next partition number divisible by 7 is 42.
MAPLE
with(combinat): a:=proc(n) local S, j: S:={}: for j from n+1 to 800 do if type(numbpart(j)/numbpart(n), integer)=true then S:=S union {numbpart(j)} else S:=S fi: od: min(seq(S[i], i=1..nops(S))): end: seq(a(n), n=1..25); # Emeric Deutsch, May 16 2006
MATHEMATICA
a[n_] := Module[{j, pj, pn = PartitionsP[n]}, For[j = n+1, True, j++, If[Divisible[pj = PartitionsP[j], pn], Return[pj]]]];
Table[a[n], {n, 1, 25}] (* Jean-François Alcover, Jul 08 2024 *)
PROG
(PARI) a(n)=if(n<0, 0, s=n+1; while(polcoeff(1/eta(x), s)%polcoeff(1/eta(x), n)>0, s++); polcoeff(1/eta(x), s))
CROSSREFS
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Feb 01 2003
EXTENSIONS
More terms from Emeric Deutsch, May 16 2006
a(0) prepended by Alois P. Heinz, Jul 08 2024
STATUS
approved