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 A030140 #39 Jun 18 2024 01:30:04 %S A030140 4,9,25,36,49,64,100,121,144,169,196,225,289,324,361,400,441,484,529, %T A030140 576,676,729,784,841,900,961,1024,1089,1156,1225,1369,1444,1521,1600, %U A030140 1681,1764,1849,1936,2025,2116,2209,2304,2500,2601,2704,2809,2916,3025 %N A030140 The nonsquares squared. %C A030140 The complement of the fourth powers A000583 within the squares A000290. - _Peter Munn_, Aug 20 2019 %H A030140 Amiram Eldar, <a href="/A030140/b030140.txt">Table of n, a(n) for n = 1..10000</a> %F A030140 a(n) = A000037(n)^2. %F A030140 Sum_{n>=1} 1/a(n) = zeta(2) - zeta(4) = A013661 - A013662 = 0.5626108331... - _Amiram Eldar_, Nov 14 2020 %F A030140 {a(n) : n >= 1} = {A225546(6m+3) : m >= 0}. - _Peter Munn_, Nov 17 2022 %e A030140 a(1)=2^2, a(2)=3^2, a(3)=5^2, a(4)=6^2, a(5)=7^2, ..., a(n)=(integer which is not a perfect square)^2. %p A030140 a:=proc(n) if type(sqrt(n),integer)=false then n^2 else fi end: seq(a(n),n=1..70); # _Emeric Deutsch_, Apr 11 2007 %t A030140 a[n_] := (n + Floor[1/2 + Sqrt[n]])^2; %t A030140 Array[a, 50] (* _Jean-François Alcover_, Apr 05 2020 *) %o A030140 (Magma) [(n + Floor(1/2 + Sqrt(n)))^2: n in [1..60]]; // _Vincenzo Librandi_, Apr 06 2020 %o A030140 (Python) %o A030140 from math import isqrt %o A030140 def A030140(n): return (n+(k:=isqrt(n))+int(n>=k*(k+1)+1))**2 # _Chai Wah Wu_, Jun 17 2024 %Y A030140 Cf. A000037, A000290, A000583, A013661, A013662, A062503. %Y A030140 Positions of 2's in A352080. %Y A030140 Related to A016945 via A225546. %K A030140 nonn,easy %O A030140 1,1 %A A030140 _N. J. A. Sloane_ %E A030140 Edited by _N. J. A. Sloane_, Jul 02 2008 at the suggestion of _R. J. Mathar_