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.

A090805 A simple recurrence with one error.

This page as a plain text file.
%I A090805 #20 Jul 29 2024 08:43:17
%S A090805 1,2,6,21,85,430,2586,18109,144880,1303929,13039300,143432311,
%T A090805 1721187744,22375440685,313256169604,4698842544075,75181480705216,
%U A090805 1278085171988689,23005533095796420,437105128820131999,8742102576402640000,183584154104455440021,4038851390298019680484
%N A090805 A simple recurrence with one error.
%C A090805 I included this in the OEIS only because was published on a web page. The explanation is my own - perhaps the original proposer had a different explanation.
%D A090805 Found on a puzzle page.
%H A090805 Hugo Delestinne, <a href="http://users.skynet.be/lch/mquiz/mquiz%202003/vragen/mquiz_2003_tafelronde_2.htm">Meerdaelquiz</a>
%H A090805 N. J. A. Sloane and Brady Haran, <a href="https://www.youtube.com/watch?v=0zT16q3p24M">A Sequence with a Mistake</a>, Numberphile video (2021)
%F A090805 a(0) = 1; a(n) = n*(a(n-1) + 1) but make an error if n = 4.
%F A090805 Hans Havermann points out that the first 7 terms could also be produced by the recurrence f[x] = f[x - 1]*(x - 1) + GCD[3*f[x - 1], (x - 1)] with f[1] = 1. (This gives the continuation 1, 2, 6, 21, 85, 430, 2586, 18103, 144825, 1303434, 13034342, ...) But given the nature of the other problems on this quiz, I think my explanation is more likely.
%e A090805 1..add.1..multiply.by 1 -> 2
%e A090805 2..add.1..multiply.by 2 -> 6
%e A090805 6......1............. 3 -> 21
%e A090805 21.....1............. 4 -> 88 but here you make a mistake and instead multiply by 4 and add 1, getting 85
%e A090805 85.....1............. 5 -> 430
%e A090805 430....1............. 6 -> 2586
%e A090805 etc
%p A090805 a:= proc(n) a(n):= n*a(n-1) + `if`(n=4, 1, n) end: a(0):= 1:
%p A090805 seq(a(n), n=0..22);  # _Alois P. Heinz_, May 14 2021
%t A090805 a={1};Do[n=Length[a];a=Append[a,If[n==4,Last[a]n+1,(Last[a]+1)n]],22];a (* _Jake L Lande_, Jul 28 2024 *)
%Y A090805 Cf. A033540, A344229.
%K A090805 nonn,easy,dumb
%O A090805 0,2
%A A090805 _N. J. A. Sloane_, Feb 12 2004