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.
%I A064657 #28 Jul 03 2025 17:44:01 %S A064657 1,1,1,1,2,4,8,12,10,5,2,2,13,12,26,13,3,9,14,11,11,25,12,26,13,13,27, %T A064657 27,26,4,2,6,34,10,60,5,28,53,22,62,25,24,22,25,22,51,38,25,28,3,26, %U A064657 53,16,53,27,63,26,4,10,12,86,57,42,79,24,36,25,38,56,32,85,23 %N A064657 a(n) = a(|n - a(n-3)|) + a(|n - a(n-4)|) for n > 3, a(n)=1 otherwise. %C A064657 The sequence is defined only for n <= 866, see example. - _Reinhard Zumkeller_, Jul 21 2012 %H A064657 Reinhard Zumkeller, <a href="/A064657/b064657.txt">full Table of n, a(n) for n = 0..866</a> %e A064657 Last term: a(866) = a(|866 - a(866-3)|) + a(|866 - a(866-4)|) = a(|866 - a(863)|) + a(|866 - a(862)|) = a(|866 - 718|) + a(|866 - 88|) = a(148) + a(778) = 28 + 655 = 683, %e A064657 but a(867) = a(|867 - a(867-3)|) + a(|867 - a(867-4)|) = a(|867 - a(864)|) + a(|867 - a(863)|) = a(|867 - 2546|) + a(|867 - 718|) = a(1679) + a(149) = undefined + 112 = undefined. %o A064657 (Haskell) %o A064657 a064657 n = a064657_list !! n %o A064657 a064657_list = map fromJust $ takeWhile (/= Nothing) zs where %o A064657 z n = fromJust $ zs !! n %o A064657 zs = (map Just [1,1,1,1]) ++ f 4 where %o A064657 f x = y : f (x + 1) where %o A064657 y | 2*x < max i3 i4 = Nothing %o A064657 | otherwise = Just $ z (abs (x - i3)) + z (abs (x - i4)) %o A064657 where i3 = z (x - 3); i4 = z (x - 4) %o A064657 b064657 = bFile' "A064657" a064657_list 0 -- (0.03 secs, 3184228 bytes) %o A064657 -- _Reinhard Zumkeller_, Jul 21 2012 %o A064657 (PARI) A064657_vec=[1,1,1]; A064657(n)={n<4 & return(1); %o A064657 #A064657_vec<n & A064657_vec=concat(A064657_vec, vector(n-#A064657_vec)); A064657_vec[n] & return(A064657_vec[n]); A064657_vec[n]=A064657(abs(A064657(n-3)-n))+A064657(abs(A064657(n-4)-n))} \\ - _M. F. Hasler_, Aug 28 2012 %K A064657 nonn,fini,full %O A064657 0,5 %A A064657 _Roger L. Bagula_, Oct 08 2001 %E A064657 More terms from _Vladeta Jovovic_, Oct 09 2001 %E A064657 Keyword fini added by _Reinhard Zumkeller_, Jul 21 2012