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!)
A247367 Number of ways to write n as a sum of a square and a nonsquare. 3
0, 0, 1, 2, 1, 1, 3, 3, 2, 2, 2, 4, 4, 2, 4, 4, 3, 3, 4, 5, 3, 5, 5, 5, 5, 2, 4, 6, 6, 4, 6, 6, 5, 6, 4, 6, 5, 5, 7, 7, 5, 5, 7, 7, 7, 5, 7, 7, 7, 6, 5, 8, 6, 6, 8, 8, 8, 8, 6, 8, 8, 6, 8, 8, 7, 5, 9, 9, 7, 9, 9, 9, 8, 7, 7, 9, 9, 9, 9, 9, 7, 8, 8, 10, 10, 6 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,4
LINKS
EXAMPLE
a(10) = #{0+10, 4+6} = 2;
a(11) = #{0+11, 1+10, 4+7, 9+2} = 4;
a(12) = #{0+12, 1+11, 4+8, 9+3} = 4;
a(13) = #{0+13, 1+12} = 2;
a(14) = #{0+14, 1+13, 4+10, 9+5} = 4;
a(15) = #{0+15, 1+14, 4+11, 9+6} = 4;
a(16) = #{1+15, 4+12, 9+7} = 3;
a(17) = #{0+17, 4+13, 9+8} = 3;
a(18) = #{0+18, 1+17, 4+14, 16+2} = 4;
a(19) = #{0+19, 1+18, 4+15, 9+10, 16+3} = 5;
a(20) = #{0+20, 1+19, 9+11} = 3.
MATHEMATICA
sQ[n_] := sQ[n] = IntegerQ[Sqrt[n]];
a[n_] := Sum[Boole[sQ[k] && !sQ[n-k] || !sQ[k] && sQ[n-k]], {k, 0, Quotient[n, 2]}];
Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Aug 10 2022 *)
PROG
(Haskell)
a247367 n = sum $ map ((1 -) . a010052 . (n -)) $
takeWhile (<= n) a000290_list
CROSSREFS
Sequence in context: A052253 A271453 A247749 * A305321 A346798 A340274
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Sep 14 2014
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 April 25 13:43 EDT 2024. Contains 371972 sequences. (Running on oeis4.)