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

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A064552 a(0) = 1, a(n) = a(n-1) + 2*q(n) - n for n > 0, where q(n) = A064657(n) = q(|n-q(n-3)|) + q(|n-q(n-4)|) for n > 3, q(n) = 1 for n = 0, 1, 2, 3. 4

%I #22 Dec 05 2022 05:50:45

%S 1,2,2,1,1,4,14,31,43,44,38,31,45,56,94,105,95,96,106,109,111,140,142,

%T 171,173,174,202,229,253,232,206,187,223,210,296,271,291,360,366,451,

%U 461,468,470,477,477,534,564,567,575,532,534,589,569,622,622,693,689,640,602,567,679

%N a(0) = 1, a(n) = a(n-1) + 2*q(n) - n for n > 0, where q(n) = A064657(n) = q(|n-q(n-3)|) + q(|n-q(n-4)|) for n > 3, q(n) = 1 for n = 0, 1, 2, 3.

%C Ill defined beyond n=866. - _M. F. Hasler_, Aug 28 2012

%H Jinyuan Wang, <a href="/A064552/b064552.txt">Table of n, a(n) for n = 0..866</a>

%t a[0] = q[0] = q[1] = q[2] = q[3] = 1;

%t q[n_] := q[n] = q[Abs[n - q[n - 3]]] + q[Abs[n - q[n - 4]]];

%t a[n_] := a[n] = a[n - 1] + 2*(q[n] - n/2);

%t Table[a[n], {n, 0, 70} ]

%o (ARIBAS): function qfunc(n: integer): integer; var r: integer; begin if n < 4 then r := 1; else r := qfunc(abs(n - qfunc(n - 3))) + qfunc(abs(n - qfunc( n - 4))); end; return r; end; function a064552(n: integer); var k,r: integer; begin if n = 0 then r := 1; else r := a064552(n - 1) + round(2*(qfunc(n) - n/2)); end; return r; end; for n := 1 to 60 do write(a064552(n)," "); end;.

%Y Cf. A064550, A064551, A064657.

%K nonn,fini,full

%O 0,2

%A _Roger L. Bagula_, Oct 08 2001

%E Corrected and extended by _Vladeta Jovovic_, _Matthew Conroy_ and _Klaus Brockhaus_, Oct 09 2001

%E Sequence A064657, and thus the present one, is ill defined beyond n=866. Keyword 'fini' added by _M. F. Hasler_, Aug 28 2012

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | 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 April 24 08:13 EDT 2024. Contains 371922 sequences. (Running on oeis4.)