OFFSET
1,2
COMMENTS
This sequence is similar to A130893. Every term of index k is the sum of the 3 preceding terms modulo 10, except that for every sixth term the sum includes also the term of index k/6.
Lambert gave this sequence in Anlage zur Architectonic as a kind of early pseudorandom sequence. - Charles R Greathouse IV, Oct 05 2015
LINKS
Maarten Bullynck, L’histoire de l’informatique et l’histoire des mathématiques : rencontres, opportunités et écueils, Images des Mathématiques, CNRS, 2015 (in French).
Johann Heinrich Lambert, Anlage zur Architectonic, oder Theorie des Einfachen und des Ersten in der philosophischen und mathematischen Erkenntniß, 1771.
FORMULA
a(n) = (a(n-3) + a(n-2) + a(n-1)) mod 10 if n is not a multiple of 6.
a(n) = (a(n-3) + a(n-2) + a(n-1) + a(n/6)) mod 10 if n is a multiple of 6.
EXAMPLE
a(6) = 4+8+5 = (17 + a(6/6)) mod 10 = (17 + 1) mod 10 = 8.
PROG
(PARI) lista(nn) = {va = vector(nn); va[1] = 1; va[2] = 3; va[3] = 4; for (k=4, nn, va[k] = va[k-3] + va[k-2] + va[k-1]; if (! (k % 6) && (k > 6), va[k] += va[k/6]); va[k] = va[k] % 10; ); va; }
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Marcus, Oct 05 2015
STATUS
approved