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!)
A240952 Smallest number that can be written in exactly n ways as sum of two quarter-squares. 2
19, 0, 1, 2, 6, 18, 36, 72, 106, 450, 562, 2312, 1156, 9522, 1381, 8712, 4930, 16562, 13812, 35912, 14862, 233928, 53316, 361250, 40056, 211250, 55981, 1678112, 51106, 1216800, 305256, 610512, 255531 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
COMMENTS
A245575(a(n)) = n and A245575(a(m)) <> n for m < a(n).
LINKS
EXAMPLE
a(0) = A245585(1) = 19, A245575(19) = 0;
a(1) = 0: A245575(0) = #{0+0} = 1;
a(2) = 1: A245575(1) = #{1+0, 0+1} = 2;
a(3) = 2: A245575(2) = #{2+0, 1+1, 0+2} = 3;
a(4) = 6: A245575(6) = #{6+0, 4+2, 2+4, 0+6} = 4;
a(5) = 18: A245575(18) = #{16+2, 12+6, 9+9, 6+12, 2+16} = 5;
a(6) = 36: A245575(36) = #{36+0, 30+6, 20+16, 16+20, 6+30, 0+36} = 6.
MATHEMATICA
nmax = 36000;
qsQ[n_] := qsQ[n] = With[{s = Sqrt[n]}, Which[IntegerQ[s], True, n == Floor[s] (Floor[s]+1), True, True, False]];
A245575[n_] := Count[Range[0, n], k_ /; qsQ[k] && qsQ[n-k]];
Table[{A245575[n], n}, {n, 0, nmax}] // Sort // SplitBy[#, First]& // #[[All, 1, 2]]& (* Jean-François Alcover, May 08 2017 *)
PROG
(Haskell)
import Data.List (elemIndex); import Data.Maybe (fromJust)
a240952 = fromJust . (`elemIndex` a245575_list)
CROSSREFS
Sequence in context: A186729 A340650 A226373 * A221749 A055967 A366110
KEYWORD
nonn,more
AUTHOR
Reinhard Zumkeller, Aug 04 2014
EXTENSIONS
a(21)-a(32) from Jinyuan Wang, Jul 08 2021
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 24 07:35 EDT 2024. Contains 371922 sequences. (Running on oeis4.)