cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A262951 a(1) = 1, a(2) = 3, a(3) = 4 and for n>=4, a(n) = (a(n-3)+a(n-2)+a(n-1)+k) mod 10 where k = a(n/6) if n is divisible by 6, else 0.

Original entry on oeis.org

1, 3, 4, 8, 5, 7, 0, 2, 9, 1, 2, 5, 8, 5, 8, 1, 4, 7, 2, 3, 2, 7, 2, 9, 8, 9, 6, 3, 8, 2, 3, 3, 8, 4, 5, 4, 3, 2, 9, 4, 5, 8, 7, 0, 5, 2, 7, 6, 5, 8, 9, 2, 9, 9, 0, 8, 7, 5, 0, 3, 8, 1, 2, 1, 4, 9, 4, 7, 0, 1, 8, 4, 3, 5, 2, 0, 7, 7, 4, 8, 9, 1, 8, 3, 2, 3, 8
Offset: 1

Views

Author

Michel Marcus, Oct 05 2015

Keywords

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

Examples

			a(6) = 4+8+5 = (17 + a(6/6)) mod 10 = (17 + 1) mod 10 = 8.
		

Crossrefs

Cf. A130893.

Programs

  • 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;}

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.