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.

A292351 a(1) = a(2) = 1, a(3) = 3, a(4) = a(5) = 4; a(n) = a(n-a(n-1)) + a(n-a(n-2)) + a(n-a(n-3)) for n > 5.

Original entry on oeis.org

1, 1, 3, 4, 4, 5, 7, 8, 6, 8, 10, 10, 10, 12, 11, 13, 13, 15, 14, 16, 16, 18, 18, 18, 21, 20, 18, 23, 21, 23, 24, 24, 20, 28, 28, 29, 20, 29, 30, 34, 27, 29, 31, 34, 35, 31, 33, 34, 39, 36, 34, 38, 38, 42, 36, 43, 39, 43, 42, 44, 42, 47, 43, 47, 48, 47, 46, 50, 50, 50, 48, 54, 53, 52, 52, 54, 60, 53, 55, 55, 63
Offset: 1

Views

Author

Altug Alkan, Dec 12 2017

Keywords

Comments

With five initial conditions, this sequence has the longest chaotic life for the recurrence a(n) = a(n-a(n-1)) + a(n-a(n-2)) + a(n-a(n-3)) where 1 <= a(i) <= 5 with 1 <= i <= 5. It is not known if this sequence is defined for all positive n. See plot of this sequence in Links section.

Crossrefs

Programs

  • PARI
    q=vector(10^5); q[1]=1; q[2]=1; q[3]=3; q[4]=4; q[5]=4; for(n=6, #q, q[n] = q[n-q[n-1]]+q[n-q[n-2]]+q[n-q[n-3]]); q
    
  • Scheme
    ;; With memoization-macro definec.
    (definec (A292351 n) (cond ((<= n 2) 1) ((= 3 n) 3) ((<= n 5) 4) (else (+ (A292351 (- n (A292351 (- n 1)))) (A292351 (- n (A292351 (- n 2)))) (A292351 (- n (A292351 (- n 3)))))))) ;; Antti Karttunen, Dec 13 2017