login
A121911
First four terms are decimal digits of 1979. Rest are found by adding four previous terms modulo 10.
1
1, 9, 7, 9, 6, 1, 3, 9, 9, 2, 3, 3, 7, 5, 8, 3, 3, 9, 3, 8, 3, 3, 7, 1, 4, 5, 7, 7, 3, 2, 9, 1, 5, 7, 2, 5, 9, 3, 9, 6, 7, 5, 7, 5, 4, 1, 7, 7, 9, 4, 7, 7, 7, 5, 6, 5, 3, 9, 3, 0, 5, 7, 5, 7, 4, 3, 9, 3, 9, 4, 5, 1, 9, 9, 4, 3, 5, 1, 3, 2, 1, 7, 3, 3, 4, 7, 7, 1, 9, 4, 1, 5, 9, 9, 4, 7, 9, 9, 9, 4, 1, 3, 7, 5, 6
OFFSET
1,2
COMMENTS
Sequence is periodic with period length 1560. a(n) is even iff n is a multiple of 5. - Klaus Brockhaus, Sep 06 2006
FORMULA
a(1) = 1, a(2) = 9, a(3) = 7, a(4) = 9; for n >= 5, a(n) = (a(n-1) + a(n-2) + a(n-3) + a(n-4)) (mod 10)
a(n+1560) = a(n). - Michael S. Branicky, Oct 25 2024
MATHEMATICA
s={1, 9, 7, 9}; Do[AppendTo[s, Mod[Total[s[[-4;; ]]], 10]], {n, 101}]; s (* James C. McMahon, Oct 24 2024 *)
PROG
(Python)
from itertools import islice
def agen(): # generator of terms
a = [1, 9, 7, 9]
yield from a
while True:
an = sum(a)%10
yield an
a = a[1:] + [an]
print(list(islice(agen(), 105))) # Michael S. Branicky, Oct 25 2024
CROSSREFS
Sequence in context: A094132 A243263 A244691 * A358030 A010547 A011405
KEYWORD
easy,nonn,base
AUTHOR
Stephen J Sugden (ssugden(AT)gmail.com), Sep 02 2006
EXTENSIONS
Extended by Klaus Brockhaus, Sep 06 2006
STATUS
approved