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!)
A069018 Smallest square k > 0 such that n*k + 1 is also a square or 0 if no such term exists, i.e., when n is a square. 2

%I

%S 0,4,1,0,16,4,9,1,0,36,9,4,32400,16,1,0,64,16,1521,4,144,1764,25,1,0,

%T 100,25,576,3312400,4,74529,9,16,36,1,0,144,36,16,9,102400,4,281961,

%U 900,576,12873744,49,1,0,196,49,8100,82810000,4356,144,4,400,6625476

%N Smallest square k > 0 such that n*k + 1 is also a square or 0 if no such term exists, i.e., when n is a square.

%C Terms from _Robert G. Wilson v_.

%H Robert Israel, <a href="/A069018/b069018.txt">Table of n, a(n) for n = 1..10000</a>

%p f:= proc(n) local x,y,t,z,k,r;

%p if issqr(n) then return 0 fi;

%p t:= [isolve(n*x^2+1=y^2)];

%p z:= (indets(t,name) minus {x,y})[1];

%p for k from 0 do

%p r:= select(`>`, map(s -> eval(x,s), eval(t, z=k)),0);

%p if nops(r) >= 1 then return min(r)^2 fi

%p od

%p end proc:

%p map(f, [$1..100]); # _Robert Israel_, Jun 29 2018

%t Do[k = 0; If[ !IntegerQ[ Sqrt[n]], k = 1; While[ !IntegerQ[ Sqrt[n*k^2 + 1]], k++ ]]; Print[k^2], {n, 1, 35}] (* _Robert G. Wilson v_ *)

%K nonn

%O 1,2

%A _Amarnath Murthy_, Apr 02 2002

%E Offset corrected by _Robert Israel_, Jun 29 2018

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 23 06:38 EST 2022. Contains 350504 sequences. (Running on oeis4.)