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!)
A191759 Least significant decimal digit of (2n-1)^2. 0
1, 9, 5, 9, 1, 1, 9, 5, 9, 1, 1, 9, 5, 9, 1, 1, 9, 5, 9, 1, 1, 9, 5, 9, 1, 1, 9, 5, 9, 1, 1, 9, 5, 9, 1, 1, 9, 5, 9, 1, 1, 9, 5, 9, 1, 1, 9, 5, 9, 1, 1, 9, 5, 9, 1, 1, 9, 5, 9, 1, 1, 9, 5, 9, 1, 1, 9, 5, 9, 1, 1, 9, 5, 9, 1, 1, 9, 5, 9, 1, 1, 9, 5, 9, 1, 1, 9 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Bisection of A008959.
This sequence is periodic with repeating part <1,9,5,9,1> of length five. Hence, as the members of each cycle sum to 25, the terms satisfy the fifth-order homogeneous recurrence a(n) = a(n-5) and the fourth-order inhomogeneous recurrence a(n) = 25 - a(n-1) - a(n-2) - a(n-3) - a(n-4).
LINKS
FORMULA
a(n) = (2n-1)^2 mod 10.
G.f.: x*(1+9*x+5*x^2+9*x^3+x^4)/(1-x^5) (note that the coefficients of x in the numerator are precisely the terms that constitute the periodic cycle of the sequence).
a(n) = 5 + 4*A080891(n+2). - R. J. Mathar, Jun 16 2011
Continued fraction of (97+17*sqrt(3077))/938. - R. J. Mathar, Jun 25 2011
a(n) = (-n^2 + n + 1) mod 10. - Arkadiusz Wesolowski, Jul 03 2012
EXAMPLE
The fifth odd square number is 81 which has least significant digit 1. Hence a(5)=1.
MATHEMATICA
Mod[(2#-1)^2, 10]&/@Range[50]
LinearRecurrence[{0, 0, 0, 0, 1}, {1, 9, 5, 9, 1}, 87] (* Ray Chandler, Aug 25 2015 *)
PadRight[{}, 120, {1, 9, 5, 9, 1}] (* Harvey P. Dale, Aug 04 2019 *)
PROG
(PARI) a(n)=[1, 9, 5, 9, 1][n%5+1] \\ Charles R Greathouse IV, Jun 15 2011
CROSSREFS
Cf. A016754 (odd squares).
Sequence in context: A090463 A272795 A246765 * A289505 A371528 A334427
KEYWORD
nonn,easy,base
AUTHOR
Ant King, Jun 15 2011
EXTENSIONS
More terms from Arkadiusz Wesolowski, Jul 03 2012
STATUS
approved

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 25 11:39 EDT 2024. Contains 371969 sequences. (Running on oeis4.)