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.

A299173 a(n) is the maximum number of squared consecutive positive integers into which the integer n can be partitioned.

This page as a plain text file.
%I A299173 #28 Feb 06 2018 08:35:56
%S A299173 1,0,0,1,2,0,0,0,1,0,0,0,2,3,0,1,0,0,0,0,0,0,0,0,2,0,0,0,3,4,0,0,0,0,
%T A299173 0,1,0,0,0,0,2,0,0,0,0,0,0,0,1,3,0,0,0,4,5,0,0,0,0,0,2,0,0,1,0,0,0,0,
%U A299173 0,0,0,0,0,0,0,0,3,0,0,0,1,0,0,0,2,4,0,0,0,5,6,0,0,0,0,0,0,0,0,1
%N A299173 a(n) is the maximum number of squared consecutive positive integers into which the integer n can be partitioned.
%C A299173 a(k^2)>=1, the inequality being strict if k is in A097812.
%H A299173 Robert Israel, <a href="/A299173/b299173.txt">Table of n, a(n) for n = 1..10000</a>
%e A299173 25 = 5^2 = 3^2 + 4^2 and no such partition is longer, so a(25) = 2.
%e A299173 30 = 1^2 + 2^2 + 3^2 + 4^2 and no such partition is longer, so a(30) = 4.
%e A299173 2018 = 7^2 + 8^2 + 9^2 + 10^2 + 11^2 + 12^2 + 13^2 + 14^2 + 15^2 + 16^2 + 17^2 + 18^2 and no such partition is longer, so a(2018) = 12. (This special example is due to _Seiichi Manyama_.) - _Jean-François Alcover_, Feb 05 2018
%p A299173 N:= 200: # to get a(1)..a(N)
%p A299173 A:= Vector(N):
%p A299173 S:= n -> n*(n+1)*(2*n+1)/6:
%p A299173 M:= floor(sqrt(N)):
%p A299173 for d from 1 to M do
%p A299173   for b from d to M do
%p A299173     s:= S(b) - S(b-d);
%p A299173     if s > N then break fi;
%p A299173     A[s]:= d
%p A299173 od od:
%p A299173 convert(A,list); # _Robert Israel_, Feb 04 2018
%t A299173 terms = 100; jmax = Ceiling[Sqrt[terms]]; kmax = Ceiling[(3*terms)^(1/3)]; Clear[a]; a[_] = 0; Do[r = Range[j, j + k - 1]; n = r . r; If[k > a[n], a[n] = k], {j, jmax}, {k, kmax}]; Array[a, terms]
%Y A299173 Cf. A034705, A097812, A130052, A111044, A234304, A234311, A296338, A298467.
%K A299173 nonn,look
%O A299173 1,5
%A A299173 _Jean-François Alcover_, Feb 04 2018