login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons 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 (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

Table of n, a(n) for n=0..20.

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

Cf. A245575, A245585, A002620.

Sequence in context: A271975 A186729 A226373 * A221749 A055967 A317447

Adjacent sequences:  A240949 A240950 A240951 * A240953 A240954 A240955

KEYWORD

nonn,more

AUTHOR

Reinhard Zumkeller, Aug 04 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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified January 26 08:18 EST 2020. Contains 331278 sequences. (Running on oeis4.)