login
This site is supported by donations 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
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, 29, 15, 31, 8, 33, 17, 35, 10, 37, 19, 39, 10, 41, 21, 43, 12, 45, 23, 47, 12, 49, 25, 51, 14, 53, 27, 55, 14, 57, 29, 59, 16, 61, 31, 63, 16 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,4

COMMENTS

A permutation of A004526 (n > 0).

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).

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.

LINKS

G. C. Greubel, Table of n, a(n) for n = 0..5000

Index entries for linear recurrences with constant coefficients, signature (0,0,0,1,0,0,0,1,0,0,0,-1).

FORMULA

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

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

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

a(2n) = A212831(n).

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

a(n) = a(n-4) + a(n-8) - a(n-12). - Charles R Greathouse IV, Sep 14 2014

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

MAPLE

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

MATHEMATICA

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 *)

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 *)

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 *)

PROG

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

(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

CROSSREFS

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

Sequence in context: A166477 A124332 A295311 * A165342 A076605 A318516

Adjacent sequences:  A246413 A246414 A246415 * A246417 A246418 A246419

KEYWORD

nonn,easy,less

AUTHOR

Paul Curtz, Sep 14 2014

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 19 04:06 EDT 2019. Contains 323377 sequences. (Running on oeis4.)