login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 


A079624
a(1) = a(2) = 1, a(3) = 6, a(n) = abs(a(n-1) - a(n-2) - a(n-3)).
6
1, 1, 6, 4, 3, 7, 0, 10, 3, 7, 6, 4, 9, 1, 12, 2, 11, 3, 10, 4, 9, 5, 8, 6, 7, 7, 6, 8, 5, 9, 4, 10, 3, 11, 2, 12, 1, 13, 0, 14, 1, 13, 2, 12, 3, 11, 4, 10, 5, 9, 6, 8, 7, 7, 8, 6, 9, 5, 10, 4, 11, 3, 12, 2, 13, 1, 14, 0, 15, 1, 14, 2, 13, 3, 12, 4, 11, 5, 10, 6, 9, 7, 8, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3
OFFSET
1,3
LINKS
FORMULA
For n >= 5, a(n^2 + 24*n - 13) = 0.
For n >= 38, Max( a(k) : 1<=k<=n) = floor(sqrt(n+156)).
MATHEMATICA
a[n_]:= a[n]= If[n<4, 6^Floor[(n-1)/2], Abs[a[n-1] -a[n-2] -a[n-3]]];
Table[a[n], {n, 100}] (* G. C. Greubel, Sep 11 2024 *)
PROG
(Haskell)
a079624 n = a079624_list !! (n-1)
a079624_list = 1 : 1 : 6 : zipWith3 (\u v w -> abs (w - v - u))
a079624_list (tail a079624_list) (drop 2 a079624_list)
-- Reinhard Zumkeller, Oct 11 2014
(Magma)
m:=120;
A079624:=[n le 3 select 6^Floor((n-1)/2) else Abs(Self(n-1) - Self(n-2) - Self(n-3)): n in [1..m+5]];
[A079624[n]: n in [1..m]]; // G. C. Greubel, Sep 11 2024
(SageMath)
@CachedFunction
def a(n): # a = A079624
if n<4: return 6^((n-1)//2)
else: return abs(a(n-1)-a(n-2)-a(n-3))
[a(n) for n in range(1, 101)] # G. C. Greubel, Sep 11 2024
CROSSREFS
KEYWORD
nonn,changed
AUTHOR
Benoit Cloitre, Jan 30 2003
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 20 13:10 EDT 2024. Contains 376072 sequences. (Running on oeis4.)