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.

A008854 Numbers that are congruent to {0, 1, 4} mod 5.

This page as a plain text file.
%I A008854 #83 Dec 27 2023 11:20:06
%S A008854 0,1,4,5,6,9,10,11,14,15,16,19,20,21,24,25,26,29,30,31,34,35,36,39,40,
%T A008854 41,44,45,46,49,50,51,54,55,56,59,60,61,64,65,66,69,70,71,74,75,76,79,
%U A008854 80,81,84,85,86,89,90,91,94,95,96,99,100,101,104,105,106,109
%N A008854 Numbers that are congruent to {0, 1, 4} mod 5.
%C A008854 n^3 and n have the same last digit.
%C A008854 Partial sums of (0, 1, 3, 1, 1, 3, 1, 1, 3, 1, ...). - _Gary W. Adamson_, Jun 19 2008
%C A008854 Row sum of a triangle where every "triple" contains 1,2,2. - _Craig Knecht_, Jul 30 2015
%C A008854 Nonnegative m such that floor(k*m^2/5) = k*floor(m^2/5), where k = 2, 3 or 4. - _Bruno Berselli_, Dec 03 2015
%D A008854 L. E. Dickson, History of the Theory of Numbers. Carnegie Institute Public. 256, Washington, DC, Vol. 1, 1919; Vol. 2, 1920; Vol. 3, 1923, see vol. 1, p. 459.
%H A008854 Vincenzo Librandi, <a href="/A008854/b008854.txt">Table of n, a(n) for n = 1..1000</a>
%H A008854 Craig Knecht, <a href="/A008854/a008854.jpg">Triangle where every "triple" contains 1,2,2</a>.
%H A008854 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,1,-1).
%F A008854 G.f.: x^2*(1+3*x+x^2) / ((1+x+x^2)*(x-1)^2). - _R. J. Mathar_, Oct 08 2011
%F A008854 a(n) = A047217(n+1)-1. - _R. J. Mathar_, Aug 04 2015
%F A008854 E.g.f: (5/3)*(x-1)*exp(x) + (2/3)*exp(-x/2)*cos(sqrt(3)*x/2) + (2/9)*exp(-x/2)*sin(sqrt(3)*x/2) + 1. - _Robert Israel_, Aug 04 2015
%F A008854 From _Wesley Ivan Hurt_, Jun 14 2016: (Start)
%F A008854 a(n) = a(n-1) + a(n-3) - a(n-4) for n>4.
%F A008854 a(n) = (15*n-15+6*cos(2*n*Pi/3)+2*sqrt(3)*sin(2*n*Pi/3))/9.
%F A008854 a(3k) = 5k-1, a(3k-1) = 5k-4, a(3k-2) = 5k-5. (End)
%F A008854 a(n) = 5*n/3 - 2*(n mod 3)/3 - 1. - _Ammar Khatab_, Aug 26 2020
%F A008854 Sum_{n>=2} (-1)^n/a(n) = 3*log(2)/5 - arccoth(3/sqrt(5))/sqrt(5). - _Amiram Eldar_, Dec 10 2021
%F A008854 From _Peter Bala_, Aug 04 2022: (Start)
%F A008854 a(n) = a(floor(n/2)) + a(1 + ceiling(n/2)) for n >= 4 with a(1) = 0, a(2) = 1 and a(3) = 4.
%F A008854 a(2*n) = a(n) + a(n+1); a(2*n+1) = a(n) + a(n+2).  Cf. A047222 and A042965. (End)
%p A008854 for n to 1000 do if n^3 - n mod 10 = 0 then print(n); fi; od;
%t A008854 Select[Range[0, 150], MemberQ[{0, 1, 4}, Mod[#, 5]] &] (* or *) LinearRecurrence[{1, 0, 1, -1}, {0, 1, 4, 5}, 91] (* _Vladimir Joseph Stephan Orlovsky_, Jan 21 2012 *)
%t A008854 CoefficientList[Series[x (1 + 3 x + x^2) / ((1 + x + x^2) (x - 1)^2), {x, 0, 70}], x] (* _Vincenzo Librandi_, Jun 11 2013 *)
%o A008854 (PARI) concat(0, Vec(x^2*(1+3*x+x^2)/((1+x+x^2)*(x-1)^2) + O(x^100))) \\ _Altug Alkan_, Dec 03 2015
%o A008854 (PARI) a(n) = vecsum(divrem(5*n-7,3)); \\ _Kevin Ryde_, Aug 08 2022
%o A008854 (Magma) [n : n in [0..150] | n mod 5 in [0, 1, 4]]; // _Wesley Ivan Hurt_, Jun 14 2016
%o A008854 (Python)
%o A008854 def a(n): return sum(divmod(5*n-7, 3))
%o A008854 print([a(n) for n in range(1, 67)]) # _Michael S. Branicky_, Aug 08 2022 after _Kevin Ryde_
%Y A008854 Cf. A047217, A047222, A042965.
%K A008854 nonn,easy
%O A008854 1,3
%A A008854 _N. J. A. Sloane_