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.

A300419 Smallest nonnegative number k such that k can be written in exactly n ways as x^2 + xy + y^2 where x and y are positive integers, with x >= y.

This page as a plain text file.
%I A300419 #60 Feb 18 2023 10:39:03
%S A300419 0,3,91,637,1729,24843,12103,405769,53599,157339,593047,59648043,
%T A300419 375193,2989441,8968323,7709611,1983163,3360173089,4877509,
%U A300419 2339177536969,18384457,377770939,146482609,439447827,13882141,1302924259
%N A300419 Smallest nonnegative number k such that k can be written in exactly n ways as x^2 + xy + y^2 where x and y are positive integers, with x >= y.
%C A300419 Except a(0) and a(1), all terms are in A118886.
%C A300419 First positive square term of this sequence is a(7) = 405769 = a(3)^2.
%C A300419 a(3), a(7) = a(3)^2 and a(13) = a(4)^2 are also the sum of two nonzero squares in exactly one way.
%C A300419 a(18) = 4877509, a(20) = 18384457, a(22) = 146482609, a(24) = 13882141, a(27) = 92672671, a(30) = 238997941, a(32) = 85276009, a(36) = 180467833. - _Robert G. Wilson v_, Mar 06 2018
%H A300419 Robert G. Wilson v, <a href="/A300419/a300419.txt">Solutions of a(n) for n <= 16</a>
%F A300419 If A198799(n) is not a square and there is no square s < A198799(n) such that A088534(s) = n + 1, then a(n) = A198799(n), for all n > 0.
%F A300419 If A198799(n+1) is a square, then a(n) <= A198799(n+1).
%e A300419 a(2) = 91 because 91 = 1^2 + 1*9 + 9^2 = 5^2 + 5*6 + 6^2 and 91 is the least number with this property.
%t A300419 nmx = 4750; t = Split@ Sort@ Flatten@ Table[x^2 + x*y + y^2, {x, nmx}, {y, x, nmx}]; lmt = 1 + Length@ t; f[n_] := Block[{k = 1}, While[Length@ t[[k]] != n && k < lmt, k++]; t[[k]][[1]]]; Array[f, 16] (* _Robert G. Wilson v_, Mar 06 2018 *)
%o A300419 (PARI) N(n,d)=sum(x=1,sqrt(n\3),sum(y=max(x,sqrtint(n-x^2)\2),sqrtint(n-2*x^2),x^2+x*y+y^2==n&&!(d&&printf("%d",[x,y])))) \\ Set 2nd arg = 1 to display all decompositions.
%o A300419 a(n)=for(k=0,oo,N(k)==n&&return(k))
%Y A300419 Cf. A024614, A118886, A198799, A327796, A327797.
%K A300419 nonn,more
%O A300419 0,2
%A A300419 _Altug Alkan_, _M. F. Hasler_ and _Robert G. Wilson_, Mar 05 2018
%E A300419 a(17)-a(18) from _Giovanni Resta_, Mar 16 2018
%E A300419 a(19)-a(25) from _Bert Dobbelaere_, Feb 18 2023