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.

A024936 a(n) = maximal length of partitions of n into distinct primes or -1 if there is no such partition.

This page as a plain text file.
%I A024936 #13 Apr 23 2025 23:29:23
%S A024936 0,-1,1,1,-1,2,-1,2,2,2,3,1,3,2,3,3,3,4,3,3,3,4,3,4,3,4,4,4,5,4,5,4,4,
%T A024936 4,5,4,5,4,5,5,5,6,5,5,5,6,5,6,5,6,5,6,5,6,5,6,6,6,7,6,7,6,6,6,7,6,7,
%U A024936 6,7,6,7,6,7,6,7,7,7,8,7,7,7,8,7,8,7,7,7,8,7,8,7,8,7,8,7,8,7,8,8,8,9,8,7,8,8,8,9,8,9,8,9,8
%N A024936 a(n) = maximal length of partitions of n into distinct primes or -1 if there is no such partition.
%H A024936 Alois P. Heinz, <a href="/A024936/b024936.txt">Table of n, a(n) for n = 0..2000</a>
%e A024936 a(12) = 3 because 12 = 2+3+7, but 12 is not a sum of 4 or more distinct primes.
%t A024936 ReplaceAll[Table[Max[Length /@ Select[IntegerPartitions[n, n, Prime[Range[n]]],  DuplicateFreeQ[#] &]], {n, 0, 100}] /. -Infinity -> -1] (* _Robert Price_, Apr 23 2025 *)
%Y A024936 a(n) + 1 = row length of A219180(n).
%K A024936 sign
%O A024936 0,6
%A A024936 _Clark Kimberling_
%E A024936 More terms from _Naohiro Nomoto_, Oct 28 2001
%E A024936 More terms from _David Wasserman_, Jan 23 2003
%E A024936 Offset changed and edited by _Alois P. Heinz_, Nov 13 2012