login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A198772 Numbers having exactly one representation by the quadratic form x^2 + xy + y^2 with 0 <= x <= y. 9
0, 1, 3, 4, 7, 9, 12, 13, 16, 19, 21, 25, 27, 28, 31, 36, 37, 39, 43, 48, 52, 57, 61, 63, 64, 67, 73, 75, 76, 79, 81, 84, 93, 97, 100, 103, 108, 109, 111, 112, 117, 121, 124, 127, 129, 139, 144, 148, 151, 156, 157, 163, 171, 172, 175, 181, 183, 189, 192, 193 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
LINKS
FORMULA
A088534(a(n)) = 1.
a(n) = A034022(n) for n <= 32.
EXAMPLE
a(20) = 48 = 4^2 + 4*4 + 4^2, A088534(48) = 1;
a(21) = 52 = 2^2 + 2*6 + 6^2, A088534(52) = 1.
MATHEMATICA
amax = 200; xmax = Sqrt[amax] // Ceiling; Clear[f]; f[_] = 0; Do[q = x^2 + x y + y^2; f[q] = f[q] + 1, {x, 0, xmax}, {y, x, xmax}];
A198772 = Select[Range[0, 3 xmax^2], # <= amax && f[#] == 1&] (* Jean-François Alcover, Jun 21 2018 *)
PROG
(Haskell)
a198772 n = a198772_list !! (n-1)
a198772_list = filter ((== 1) . a088534) a003136_list
(Julia)
function isA198772(n)
M = Int(round(2*sqrt(n/3)))
count = 0
for y in 0:M, x in 0:y
n == x^2 + y^2 + x*y && (count += 1)
count == 2 && break
end
return count == 1
end
A198772list(upto) = [n for n in 0:upto if isA198772(n)]
A198772list(193) |> println # Peter Luschny, Mar 17 2018
CROSSREFS
Subsequence of Loeschian numbers A003136.
Complement of A118886 with respect to A003136.
Sequence in context: A326421 A329963 A034022 * A185256 A070992 A246514
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Oct 30 2011
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 19 06:05 EDT 2024. Contains 370952 sequences. (Running on oeis4.)