login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A154778 Numbers of the form a^2 + 5b^2 with positive integers a,b. 19
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 (list; graph; refs; listen; history; internal format)
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] (* From 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 (mathar(AT)strw.leidenuniv.nl), Jan 26 2009]

Sequence in context: A190461 A095098 A134859 * A106350 A020717 A196993

Adjacent sequences:  A154775 A154776 A154777 * A154779 A154780 A154781

KEYWORD

easy,nonn

AUTHOR

M. F. Hasler (www.univ-ag.fr/~mhasler), Jan 24 2009

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 15 18:22 EST 2012. Contains 205835 sequences.