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!)
A246416 A permutation of essentially the duplicate nonnegative numbers: a(4n) = n + 1/2 - (-1)^n/2, a(2n+1) = a(4n+2) = 2n+1. 2

%I #60 Sep 08 2022 08:46:09

%S 0,1,1,3,2,5,3,7,2,9,5,11,4,13,7,15,4,17,9,19,6,21,11,23,6,25,13,27,8,

%T 29,15,31,8,33,17,35,10,37,19,39,10,41,21,43,12,45,23,47,12,49,25,51,

%U 14,53,27,55,14,57,29,59,16,61,31,63,16

%N A permutation of essentially the duplicate nonnegative numbers: a(4n) = n + 1/2 - (-1)^n/2, a(2n+1) = a(4n+2) = 2n+1.

%C A permutation of A004526 (n > 0).

%C 0 is at its own place. Distance between the two (2*k+1)'s: 2*k+1 terms. 0 is in position 0, the first 1 in position 1, the second 1 in position 2, the first 2 in position 4, the second 2 in position 8. Hence, r(n) = 0, 1, 2, 4, 8, 3, 6, 12, 16, 5, 10, 20, 24, ..., a permutation of A001477. See A225055. The recurrence r(n) = r(n-4) + r(n-8) - r(n-12) is the same as for a(n).

%C A061037(n+3) is divisible by a(n+5) (= 5, 3, 7, 1, 9, 5, 11, 3, 13, 7, 15, 3, ...). Hence a link, via A212831 and A214282, between the Catalan numbers A000108 and the Balmer series.

%H G. C. Greubel, <a href="/A246416/b246416.txt">Table of n, a(n) for n = 0..5000</a>

%H <a href="/index/Rec#order_12">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,1,0,0,0,1,0,0,0,-1).

%F a(n) = 3*a(n-8) - 3*a(n-16) + a(n-24).

%F a(n+4) = a(n) + period 8: repeat [2, 4, 2, 4, 0, 4, 2, 4].

%F a(n+8) = a(n) + period 4: repeat [2, 8, 4, 8] (= 2 * A176895).

%F a(2n) = A212831(n).

%F a(n) = n*(1+floor((2-n)/4)+floor((n-2)/4))/2+n*(1+floor((1-n)/2)+floor((n-1)/2))+(-n-2+2*(-1)^(n/4))*(ceiling(n/4)-floor(n/4)-1)/4. - _Wesley Ivan Hurt_, Sep 14 2014

%F a(n) = a(n-4) + a(n-8) - a(n-12). - _Charles R Greathouse IV_, Sep 14 2014

%F G.f.: x*(x^10+x^9+3*x^8+4*x^6+2*x^5+4*x^4+2*x^3+3*x^2+x+1) / ((x-1)^2*(x+1)^2*(x^2+1)^2*(x^4+1)). - _Colin Barker_, Sep 15 2014

%p A246416:=n->n*(1+floor((2-n)/4)+floor((n-2)/4))/2+n*(1+floor((1-n)/2)+floor((n-1)/2))+(-n-2+2*(-1)^(n/4))*(ceil(n/4)-floor(n/4)-1)/4: seq(A246416(n), n=0..50); # _Wesley Ivan Hurt_, Sep 14 2014

%t Table[n (1 + Floor[(2 - n)/4] + Floor[(n - 2)/4])/2 + n (1 + Floor[(1 - n)/2] + Floor[(n - 1)/2]) + (-n - 2 + 2 (-1)^(n/4)) (Ceiling[n/4] - Floor[n/4] - 1)/4, {n, 0, 50}] (* _Wesley Ivan Hurt_, Sep 14 2014 *)

%t a[n_] := Switch[Mod[n, 4], 0, n/4-(-1)^(n/4)/2+1/2, 1|3, n, 2, n/2]; Table[a[n], {n, 0, 64}] (* _Jean-François Alcover_, Oct 09 2014 *)

%t LinearRecurrence[{0,0,0,1,0,0,0,1,0,0,0,-1},{0,1,1,3,2,5,3,7,2,9,5,11},70] (* _Harvey P. Dale_, Mar 23 2015 *)

%o (PARI) a(n)=if(n%4,n/(2-n%2),if(n%8,1,0)+n/4) \\ _Charles R Greathouse IV_, Sep 14 2014

%o (Magma) I:=[0,1,1,3,2,5,3,7,2,9,5,11,4,13,7,15,4,17,9,19,6,21,11,23]; [n le 24 select I[n] else 3*Self(n-8)-3*Self(n-16)+Self(n-24): n in [1..80]]; // _Vincenzo Librandi_, Oct 15 2014

%Y Cf. A000108, A004526, A052928, A061037, A176895, A212831, A214282, A226279, A225055, A247617.

%K nonn,easy,less

%O 0,4

%A _Paul Curtz_, Sep 14 2014

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 August 9 09:32 EDT 2024. Contains 375035 sequences. (Running on oeis4.)