login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A291290 a(n) = n/3 if n == 0 mod 3, floor((n+1)/2) if n == 1 mod 3, otherwise n-2. 2
0, 1, 0, 1, 2, 3, 2, 4, 6, 3, 5, 9, 4, 7, 12, 5, 8, 15, 6, 10, 18, 7, 11, 21, 8, 13, 24, 9, 14, 27, 10, 16, 30, 11, 17, 33, 12, 19, 36, 13, 20, 39, 14, 22, 42, 15, 23, 45, 16, 25, 48, 17, 26, 51, 18, 28, 54, 19, 29, 57, 20, 31, 60, 21, 32, 63, 22, 34, 66, 23, 35, 69, 24, 37, 72, 25, 38, 75, 26, 40, 78 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,5

LINKS

Colin Barker, Table of n, a(n) for n = 0..1000

Lucilla Baldini, Josef Eschgfäller, Random functions from coupled dynamical systems, arXiv preprint arXiv:1609.01750 [math.CO], 2016. See Example 3.3.

FORMULA

Conjectures from Colin Barker, Aug 30 2017: (Start)

G.f.: x*(1 + x^2 + x^3 + 3*x^4 + x^5 + x^6 + 3*x^7) / ((1 - x)^2*(1 + x)*(1 - x + x^2)*(1 + x + x^2)^2).

a(n) = a(n-3) + a(n-6) - a(n-9) for n>8. (End)

MAPLE

f:=proc(n)

if n mod 3 = 0 then n/3

elif n mod 3 = 1 then floor((n+1)/2)

else n-2 fi; end;

[seq(f(n), n=0..100)];

MATHEMATICA

a[n_] := Switch[Mod[n, 3], 0, n/3, 1, Floor[(n + 1)/2], _, n - 2];

Array[a, 100, 0] (* Jean-François Alcover, Nov 28 2017 *)

PROG

(MAGMA) a:=func<n | n mod 3 eq 0 select n/3 else n mod 3 eq 1 select Floor((n+1)/2) else n-2>; [a(n): n in [0..100]]; // Bruno Berselli, Aug 30 2017

(PARI) a(n) = if(n%3==0, n\3, if(n%3==1, floor((n+1)/2), n-2)). - Colin Barker, Aug 30 2017

CROSSREFS

Cf. A291291.

Sequence in context: A215190 A214943 A202864 * A006047 A285712 A062068

Adjacent sequences:  A291287 A291288 A291289 * A291291 A291292 A291293

KEYWORD

nonn

AUTHOR

N. J. A. Sloane, Aug 29 2017

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 July 24 02:56 EDT 2019. Contains 325290 sequences. (Running on oeis4.)