This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A049240 #41 Jun 15 2022 20:24:24 %S A049240 0,1,1,0,1,1,1,1,0,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1, %T A049240 1,0,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1, %U A049240 1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1 %N A049240 Smallest nonnegative value taken on by x^2 - n*y^2 for an infinite number of integer pairs (x, y). %C A049240 Encodes to 1,2,1,4,1,6,1,8,1,10,...: unsigned version of A009531. - _Paul Barry_, Oct 12 2005 %C A049240 Parity of inverse Moebius transform of Jacobsthal numbers J(k) less J(n). - _Paul Barry_, Oct 12 2005 %H A049240 Antti Karttunen, <a href="/A049240/b049240.txt">Table of n, a(n) for n = 1..65537</a> %H A049240 <a href="/index/Ch#char_fns">Index entries for characteristic functions</a> %H A049240 <a href="/index/Eu#epf">Index entries for sequences computed from exponents in factorization of n</a> %F A049240 a(n) = 0 if n is square, 1 otherwise. %F A049240 a(n) = (A001045(n) - Sum_{k|n} A001045(k)) mod 2. - _Paul Barry_, Oct 12 2005 %F A049240 a(n) = 1 - A010052(n). - _R. J. Mathar_, Jul 04 2009 %F A049240 a(n) = floor(1+ceiling(sqrt(n))-floor(sqrt((n)))/2). - _Wesley Ivan Hurt_, Sep 27 2014 %F A049240 G.f.: (1+x)/(2-2*x) - (1/2)*theta_3(0,x) where theta_3 is a Jacobi theta function. - _Robert Israel_, Oct 02 2014 %p A049240 A049240:=n->`if`(issqr(n),0,1): seq(A049240(n), n=1..100); # _Wesley Ivan Hurt_, Sep 27 2014 %t A049240 Differences[Table[n - Ceiling[Sqrt[n]], {n, 105}]] (* _Arkadiusz Wesolowski_, Oct 30 2012 *) %t A049240 Table[Floor[(1 + Ceiling[Sqrt[n]] - Floor[Sqrt[n]])/2], {n, 70}] (* _Wesley Ivan Hurt_, Sep 27 2014 *) %o A049240 (Magma) [Floor((1 + Ceiling(Sqrt(n)) - Floor(Sqrt(n)))/2) : n in [1..100]]; // _Wesley Ivan Hurt_, Sep 27 2014 %o A049240 (Python) %o A049240 from math import isqrt %o A049240 def A049240(n): return int(isqrt(n)**2!=n) # _Chai Wah Wu_, Jun 14 2022 %Y A049240 Cf. A001045, A005931, A010052. %Y A049240 Characteristic function of A000037 (the nonsquares). %K A049240 nonn,easy %O A049240 1,1 %A A049240 _David W. Wilson_