A090805 A simple recurrence with one error.
1, 2, 6, 21, 85, 430, 2586, 18109, 144880, 1303929, 13039300, 143432311, 1721187744, 22375440685, 313256169604, 4698842544075, 75181480705216, 1278085171988689, 23005533095796420, 437105128820131999, 8742102576402640000, 183584154104455440021, 4038851390298019680484
Offset: 0
Examples
1..add.1..multiply.by 1 -> 2 2..add.1..multiply.by 2 -> 6 6......1............. 3 -> 21 21.....1............. 4 -> 88 but here you make a mistake and instead multiply by 4 and add 1, getting 85 85.....1............. 5 -> 430 430....1............. 6 -> 2586 etc
References
- Found on a puzzle page.
Links
- Hugo Delestinne, Meerdaelquiz
- N. J. A. Sloane and Brady Haran, A Sequence with a Mistake, Numberphile video (2021)
Programs
-
Maple
a:= proc(n) a(n):= n*a(n-1) + `if`(n=4, 1, n) end: a(0):= 1: seq(a(n), n=0..22); # Alois P. Heinz, May 14 2021
-
Mathematica
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 *)
Formula
a(0) = 1; a(n) = n*(a(n-1) + 1) but make an error if n = 4.
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.
Comments