cp's OEIS Frontend

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.

A298950 Numbers k such that 5*k - 4 is a square.

This page as a plain text file.
%I A298950 #38 Sep 16 2022 17:44:14
%S A298950 1,4,8,17,25,40,52,73,89,116,136,169,193,232,260,305,337,388,424,481,
%T A298950 521,584,628,697,745,820,872,953,1009,1096,1156,1249,1313,1412,1480,
%U A298950 1585,1657,1768,1844,1961,2041,2164,2248,2377,2465,2600,2692,2833,2929,3076,3176,3329,3433
%N A298950 Numbers k such that 5*k - 4 is a square.
%C A298950 a(n) is a member of A140612. Proof: a(n) = n^2 + (n/2-1)^2 for even n, otherwise a(n) = (n-1)^2 + ((n+1)/2)^2; also, a(n) + 1 = (n-1)^2 + (n/2+1)^2 for even n, otherwise a(n) + 1 = n^2 + ((n-3)/2)^2. Therefore, both a(n) and a(n) + 1 belong to A001481.
%C A298950 Primes in sequence are listed in A245042.
%C A298950 Squares in sequence are listed in A081068.
%H A298950 Colin Barker, <a href="/A298950/b298950.txt">Table of n, a(n) for n = 1..1000</a>
%H A298950 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (1,2,-2,-1,1).
%F A298950 G.f.: x*(1 + x^2)*(1 + 3*x + x^2)/((1 - x)^3*(1 + x)^2).
%F A298950 a(n) = a(1-n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5).
%F A298950 a(n) = (10*n*(n-1) + (2*n-1)*(-1)^n + 9)/8.
%F A298950 a(n) = A036666(n) + 1.
%t A298950 Table[(10 n (n - 1) + (2 n - 1) (-1)^n + 9)/8, {n, 1, 60}]
%t A298950 LinearRecurrence[{1,2,-2,-1,1},{1,4,8,17,25},60] (* _Harvey P. Dale_, Sep 16 2022 *)
%o A298950 (PARI) Vec((1+x^2)*(1+3*x+x^2)/((1-x)^3*(1+x)^2)+O(x^60))
%o A298950 (PARI) vector(60, n, nn; (10*n*(n-1)+(2*n-1)*(-1)^n+9)/8)
%o A298950 (Sage) [(10*n*(n-1)+(2*n-1)*(-1)^n+9)/8 for n in (1..60)]
%o A298950 (Maxima) makelist((10*n*(n-1)+(2*n-1)*(-1)^n+9)/8, n, 1, 60);
%o A298950 (Magma) [(10*n*(n-1)+(2*n-1)*(-1)^n+9)/8: n in [1..60]];
%o A298950 (GAP) List([1..60], n -> (10*n*(n-1)+(2*n-1)*(-1)^n+9)/8);
%o A298950 (Python) [(10*n*(n-1)+(2*n-1)*(-1)**n+9)/8 for n in range(1, 60)]
%Y A298950 Cf. A195162: numbers k such that 5*k + 4 is a square.
%Y A298950 Subsequence of A001481, A020668, A036404, A140612.
%Y A298950 Cf. A036666, A081068, A106833 (first differences), A245042.
%K A298950 nonn,easy
%O A298950 1,2
%A A298950 _Bruno Berselli_, Jan 30 2018