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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A216505 Number of values of k for which n can be written in the form a^2+k*b^2, a > 0, b > 0, k >= 0. 7
1, 1, 1, 2, 2, 2, 2, 3, 4, 3, 3, 4, 5, 3, 3, 5, 6, 5, 5, 5, 5, 5, 4, 6, 8, 5, 5, 6, 8, 5, 6, 7, 7, 7, 5, 10, 10, 6, 6, 9, 11, 6, 8, 9, 10, 7, 6, 10, 12, 7, 7, 11, 11, 8, 7, 10, 11, 9, 8, 9, 14, 7, 9, 11, 11, 8, 10, 13, 11, 9, 8, 15, 17, 9, 9, 14, 11, 8, 11, 12 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,4

LINKS

T. D. Noe, Table of n, a(n) for n = 1..1000

MATHEMATICA

Table[cnt = 0; If[IntegerQ[Sqrt[n]], cnt++]; Do[b = 1; found = False; While[q = n - k*b^2; ! found && q > 0, If[IntegerQ[Sqrt[q]], cnt++; found = True]; b++], {k, n}]; cnt, {n, 100}] (* T. D. Noe, Sep 11 2012 *)

PROG

(PARI) for(n=1, 100, sol=0; for(k=0, n-1, for(x=1, n, if(issquare(n-k*x*x)&&n-k*x*x>0, sol++; break))); print1(sol", ")) /* V. Raman, Oct 16 2012 */

CROSSREFS

Cf. A001481, A154777, A092572.

Sequence in context: A164978 A119789 A025424 * A265626 A230230 A187821

Adjacent sequences:  A216502 A216503 A216504 * A216506 A216507 A216508

KEYWORD

nonn

AUTHOR

V. Raman, Sep 07 2012

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 18 02:23 EDT 2019. Contains 328135 sequences. (Running on oeis4.)