login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A008851 Congruent to 0 or 1 mod 5. 37

%I #76 Oct 12 2022 05:20:21

%S 0,1,5,6,10,11,15,16,20,21,25,26,30,31,35,36,40,41,45,46,50,51,55,56,

%T 60,61,65,66,70,71,75,76,80,81,85,86,90,91,95,96,100,101,105,106,110,

%U 111,115,116,120,121,125,126,130,131,135,136,140,141,145,146,150,151

%N Congruent to 0 or 1 mod 5.

%C Numbers k that have the same last digit as k^2.

%D L. E. Dickson, History of the Theory of Numbers, I, p. 459.

%H Reinhard Zumkeller, <a href="/A008851/b008851.txt">Table of n, a(n) for n = 1..10000</a>

%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (1,1,-1).

%F a(n) = 5*n - a(n-1) - 9, n >= 2. - _Vincenzo Librandi_, Nov 18 2010 [Corrected for offset by _David Lovler_, Oct 10 2022]

%F G.f.: x^2*(1+4*x) / ( (1+x)*(x-1)^2 ). - _R. J. Mathar_, Oct 07 2011

%F a(n+1) = Sum_{k>=0} A030308(n,k)*A146523(k). - _Philippe Deléham_, Oct 17 2011

%F a(n) = floor((5/3)*floor(3*(n-1)/2)). - _Clark Kimberling_, Jul 04 2012

%F a(n) = (10*n - 13 - 3*(-1)^n)/4. - _Robert Israel_, Nov 17 2014 [Corrected by _David Lovler_, Sep 21 2022]

%F E.g.f.: 4 + ((10*x - 13)*exp(x) - 3*exp(-x))/4. - _David Lovler_, Sep 11 2022

%F Sum_{n>=2} (-1)^n/a(n) = sqrt(1+2/sqrt(5))*Pi/10 + log(phi)/(2*sqrt(5)) + log(5)/4, where phi is the golden ratio (A001622). - _Amiram Eldar_, Oct 12 2022

%p a[0]:=0:a[1]:=1:for n from 2 to 100 do a[n]:=a[n-2]+5 od: seq(a[n], n=0..61); # _Zerinvary Lajos_, Mar 16 2008

%t Select[Range[0, 151], MemberQ[{0, 1}, Mod[#, 5]] &] (* _T. D. Noe_, Mar 31 2013 *)

%o (Haskell)

%o a008851 n = a008851_list !! (n-1)

%o a008851_list = [10*n + m | n <- [0..], m <- [0,1,5,6]]

%o -- _Reinhard Zumkeller_, Jul 27 2011

%o (PARI) a(n) = 5*(n\2)+bitand(n,1); /* _Joerg Arndt_, Mar 31 2013 */

%o (PARI) a(n) = floor((5/3)*floor(3*(n-1)/2)); /* _Joerg Arndt_, Mar 31 2013 */

%o (Magma) [n: n in [0..200] | n mod 5 in {0, 1}]; // _Vincenzo Librandi_, Nov 17 2014

%Y Cf. A001622, A003226, A045953, A046831, A046851, A086457.

%K nonn,easy

%O 1,3

%A _N. J. A. Sloane_

%E Offset corrected by _Reinhard Zumkeller_, Jul 27 2011

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 19:02 EDT 2024. Contains 371798 sequences. (Running on oeis4.)