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 A024352 #77 Feb 10 2025 11:18:14 %S A024352 3,5,7,8,9,11,12,13,15,16,17,19,20,21,23,24,25,27,28,29,31,32,33,35, %T A024352 36,37,39,40,41,43,44,45,47,48,49,51,52,53,55,56,57,59,60,61,63,64,65, %U A024352 67,68,69,71,72,73,75,76,77,79,80,81,83,84,85,87,88,89,91,92,93,95,96 %N A024352 Numbers which are the difference of two positive squares, c^2 - b^2 with 1 <= b < c. %C A024352 These are the solutions to the equation x^2 + xy = n where y mod 2 = 0, y is positive and x is any positive integer. - _Andrew S. Plewe_, Oct 19 2007 %C A024352 Ordered different terms of A120070 = 3, 8, 5, 15, 12, 7, ... (which contains two 15's, two 40's, and two 48's). Complement: A139544. (See A139491.) - _Paul Curtz_, Sep 01 2009 %C A024352 A024359(a(n)) > 0. - _Reinhard Zumkeller_, Nov 09 2012 %C A024352 If a(n) mod 6 = 3, n > 1, then a(n) = c^2 - f(a(n))^2 where f(n) = (floor(4*n/3) - 3 - n)/2. For example, 171 = 30^2 - 27^2 and f(171) = 27. - _Gary Detlefs_, Jul 15 2014 %H A024352 Ray Chandler, <a href="/A024352/b024352.txt">Table of n, a(n) for n = 1..10000</a> (first 1000 terms from T. D. Noe) %H A024352 Ron Knott, <a href="http://www.maths.surrey.ac.uk/hosted-sites/R.Knott/Pythag/pythag.html">Pythagorean Triples and Online Calculators</a> %H A024352 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,1,-1). %F A024352 Consists of all positive integers except 1, 4 and numbers == 2 (mod 4). %F A024352 a(n) = a(n-3) + 4, n > 4. %F A024352 G.f.: (3 + 2*x + 2*x^2 - 2*x^3 - x^4)/(1 - x - x^3 + x^4). - _Ralf Stephan_, before May 13 2008 %F A024352 a(n) = a(n-1) + a(n-3) - a(n-4), for n > 5. - _Ant King_, Oct 03 2011 %F A024352 a(n) = 4 + floor((4*n-3)/3), n > 1. - _Gary Detlefs_, Jul 15 2014 %t A024352 Union[Flatten[Table[Select[Table[b^2 - c^2, {c, b-1}], # < 100 &], {b, 100}]]] (* _Robert G. Wilson v_, Jun 05 2004 *) %t A024352 LinearRecurrence[{1,0,1,-1},{3,5,7,8,9},70] (* _Harvey P. Dale_, Dec 20 2021 *) %o A024352 (Haskell) %o A024352 a024352 n = a024352_list !! (n-1) %o A024352 a024352_list = 3 : drop 4 a042965_list %o A024352 -- _Reinhard Zumkeller_, Nov 09 2012 %o A024352 (PARI) is(n)=(n%4!=2 && n>4) || n==3 \\ _Charles R Greathouse IV_, May 31 2013 %o A024352 (Magma) [3] cat [4 +Floor((4*n-3)/3): n in [2..100]]; // _G. C. Greubel_, Apr 22 2023 %o A024352 (SageMath) %o A024352 def A024352(n): return 4 + ((4*n-3)//3) - int(n==1) %o A024352 [A024352(n) for n in range(1,101)] # _G. C. Greubel_, Apr 22 2023 %o A024352 (Python) %o A024352 def A024352(n): return 3 if n==1 else 3+(n<<2)//3 # _Chai Wah Wu_, Feb 10 2025 %Y A024352 Same as A042965 except for initial terms. - _Michael Somos_, Jun 08 2000 %Y A024352 Different from A020884. %Y A024352 Cf. A009005, A020884, A120070, A139544, A139491. %K A024352 nonn,easy %O A024352 1,1 %A A024352 _David W. Wilson_ %E A024352 Edited by _N. J. A. Sloane_, Sep 19 2008