[go: up one dir, main page]

login
A154778
Numbers of the form a^2 + 5b^2 with positive integers a,b.
21
6, 9, 14, 21, 24, 29, 30, 36, 41, 45, 46, 49, 54, 56, 61, 69, 70, 81, 84, 86, 89, 94, 96, 101, 105, 109, 116, 120, 126, 129, 134, 141, 144, 145, 149, 150, 161, 164, 166, 174, 180, 181, 184, 189, 196, 201, 205, 206, 214, 216, 224, 225, 229, 230, 241, 244, 245, 246
OFFSET
1,1
COMMENTS
Subsequence of A020669 (which allows for a=0 and/or b=0). See there for further references. See A155560 ff for intersection of sequences of type (a^2 + k b^2).
Also, subsequence of A000408 (with 5b^2 = b^2 + (2b)^2).
EXAMPLE
a(1) = 6 = 1^2 + 5*1^2 is the least number that can be written as A+5B where A,B are positive squares.
a(2) = 9 = 2^2 + 5*1^2 is the second smallest number that can be written in this way.
MATHEMATICA
formQ[n_] := Reduce[a > 0 && b > 0 && n == a^2 + 5 b^2, {a, b}, Integers] =!= False; Select[ Range[300], formQ] (* Jean-François Alcover, Sep 20 2011 *)
Timing[mx = 300; limx = Sqrt[mx]; limy = Sqrt[mx/5]; Select[Union[Flatten[Table[x^2 + 5 y^2, {x, limx}, {y, limy}]]], # <= mx &]] (* T. D. Noe, Sep 20 2011 *)
PROG
(PARI) isA154778(n, /* use optional 2nd arg to get other analogous sequences */c=5) = { for( b=1, sqrtint((n-1)\c), issquare(n-c*b^2) & return(1))}
for( n=1, 300, isA154778(n) & print1(n", "))
CROSSREFS
Cf. A033205 (subsequence of primes). [From R. J. Mathar, Jan 26 2009]
Sequence in context: A316011 A316012 A316013 * A316014 A106350 A217851
KEYWORD
easy,nonn
AUTHOR
M. F. Hasler, Jan 24 2009
STATUS
approved