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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A373099 Last digit of n*2^n + 1. 2
 1, 3, 9, 5, 5, 1, 5, 7, 9, 9, 1, 9, 3, 7, 7, 1, 7, 5, 3, 3, 1, 3, 9, 5, 5, 1, 5, 7, 9, 9, 1, 9, 3, 7, 7, 1, 7, 5, 3, 3, 1, 3, 9, 5, 5, 1, 5, 7, 9, 9, 1, 9, 3, 7, 7, 1, 7, 5, 3, 3, 1, 3, 9, 5, 5, 1, 5, 7, 9, 9, 1, 9, 3, 7, 7, 1, 7, 5, 3, 3 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,2 COMMENTS This is a cyclic sequence of 20 numbers, using only 1,3,5,7 and 9 (4 times each). REFERENCES James Cullen, Question 15897, Educational Times, Vol. 58 (December 1905), p. 534. Richard K. Guy (2004), Unsolved Problems in Number Theory (3rd ed.), New York: Springer Verlag, pp. section B20, ISBN 0-387-20860-7. LINKS Table of n, a(n) for n=0..79. Wikipedia, Cullen number. Index entries for linear recurrences with constant coefficients, signature (0,1,0,-1,1,1,-1,-1,1,0,-1,0,1). FORMULA a(n) = A010879(A002064(n)). From Chai Wah Wu, Jul 06 2024: (Start) a(n) = a(n-2) - a(n-4) + a(n-5) + a(n-6) - a(n-7) - a(n-8) + a(n-9) - a(n-11) + a(n-13) for n > 12. G.f.: (-3*x^12 - 3*x^11 - 2*x^10 - 4*x^9 + x^8 - 5*x^6 + 2*x^5 + 3*x^4 - 2*x^3 - 8*x^2 - 3*x - 1)/((x - 1)*(x^4 + x^3 + x^2 + x + 1)*(x^8 - x^6 + x^4 - x^2 + 1)). (End) MAPLE lastDigit := proc(n) return (n * 2^n + 1) mod 10; end proc: # Example usage minN := 1; maxN := 10; lastDigits := [seq(lastDigit(n), n = minN .. maxN)]; print(lastDigits); MATHEMATICA lastDigit[n_] := Mod[n * 2^n + 1, 10] (* Example usage *) minN = 1; maxN = 10; lastDigits = Table[lastDigit[n], {n, minN, maxN}] Print[lastDigits] PROG (Python) def last_digit(n): return (n * 2**n + 1) % 10 # Example usage min_n, max_n = 1, 10 last_digits = [last_digit(n) for n in range(min_n, max_n + 1)] print(last_digits) (PARI) a(n) = lift(Mod(n*2^n + 1, 10)) CROSSREFS Cf. A010879, A002064. Cf. A373098, A373100. Sequence in context: A070341 A245719 A085851 * A212321 A306552 A092041 Adjacent sequences: A373096 A373097 A373098 * A373100 A373101 A373102 KEYWORD nonn,base,easy AUTHOR Javier Rodríguez Ríos, May 23 2024 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.

Last modified September 12 09:16 EDT 2024. Contains 375850 sequences. (Running on oeis4.)