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.

A024612 a(n) = number in position n when all i^2 - i*j + j^2, where 1 <= i < j are arranged in increasing order.

This page as a plain text file.
%I A024612 #5 Aug 21 2016 14:34:30
%S A024612 3,7,7,12,13,13,19,19,21,21,27,28,28,31,31,37,37,39,39,43,43,48,49,49,
%T A024612 52,52,57,57,61,61,63,63,67,67,73,73,75,76,76,79,79,84,84,91,91,91,91,
%U A024612 93,93,97,97,103,103,108,109,109,111,111,112,112,117,117,124,124,127,127,129,129,133
%N A024612 a(n) = number in position n when all i^2 - i*j + j^2, where 1 <= i < j are arranged in increasing order.
%p A024612 A024612 := proc(n)
%p A024612     local i,j,disc;
%p A024612     # n=i^2+j^2-i*j = (j-i)^2+i*j, 1<=i<j
%p A024612     # so (j-i)>=1 and i*j>=j and i^2+j^2-i*j >= 1+j max search radius
%p A024612     for j from 2 to n-1 do
%p A024612         # i=(j +- sqrt(4n-3j^2))/2
%p A024612         disc := 4*n-3*j^2 ;
%p A024612         if disc >= 0 then
%p A024612             if issqr(disc) then
%p A024612                 i := (j+sqrt(disc))/2 ;
%p A024612                 if type(i,'integer') and i >= 1 and i<j then
%p A024612                     printf("%d,",n) ;
%p A024612                 end if;
%p A024612                 if disc > 0 then
%p A024612                     i := (j-sqrt(disc))/2 ;
%p A024612                     if type(i,'integer') and i >= 1 and i<j then
%p A024612                         printf("%d,",n) ;
%p A024612                     end if;
%p A024612                 end if;
%p A024612             end if;
%p A024612         end if;
%p A024612     end do:
%p A024612 end proc:
%p A024612 for t from 1 to 120 do
%p A024612     A024612(t);
%p A024612 end do: # _R. J. Mathar_, Aug 21 2016
%K A024612 nonn
%O A024612 1,1
%A A024612 _Clark Kimberling_