

A253203


The least square larger than n with same parity as n.


0



9, 4, 9, 16, 9, 16, 9, 16, 25, 16, 25, 16, 25, 16, 25, 36, 25, 36, 25, 36, 25, 36, 25, 36, 49, 36, 49, 36, 49, 36, 49, 36, 49, 36, 49, 64, 49, 64, 49, 64, 49, 64, 49, 64, 49, 64, 49, 64, 81, 64, 81, 64, 81, 64, 81, 64, 81, 64, 81, 64, 81, 64, 81, 100, 81, 100, 81, 100, 81, 100, 81, 100, 81, 100, 81, 100, 81, 100, 81, 100
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,1


LINKS

Table of n, a(n) for n=1..80.


FORMULA

a(n) = A256244(n)^2 = n + 2*A256243(n)).


EXAMPLE

9 is the least odd square > 1;
4 is the least even square > 2;
9 is the least odd square > 3.


MATHEMATICA

f[n_] := Block[{s = If[n == 1, Range[3]^2, Range[2 Ceiling@ Sqrt@ n]^2]}, If[EvenQ@ n, SelectFirst[s, EvenQ@ # && # > n &], SelectFirst[s, OddQ@ # && # > n &]]]; Array[f, 120] (* Michael De Vlieger, Mar 25 2015 *)


PROG

(Sage)
A=[]
for i in [1..100]:
....for x in [y^2 for y in [1..100]]:
........if x>i and (xi)%2==0:
............A.append(x)
............break
A


CROSSREFS

Cf. A256243, A256244.
Sequence in context: A258414 A237185 A154201 * A255642 A088701 A153698
Adjacent sequences: A253200 A253201 A253202 * A253204 A253205 A253206


KEYWORD

nonn,easy


AUTHOR

Tom Edgar and Zak Seidov, Mar 25 2015


STATUS

approved



