[go: up one dir, main page]

login
A131737
Essentially even numbers followed by duplicated odd numbers.
3
0, 1, 1, 1, 2, 3, 3, 4, 5, 5, 6, 7, 7, 8, 9, 9, 10, 11, 11, 12, 13, 13, 14, 15, 15, 16, 17, 17, 18, 19, 19, 20, 21, 21, 22, 23, 23, 24, 25, 25, 26, 27, 27, 28, 29, 29, 30, 31, 31, 32, 33, 33, 34, 35, 35, 36, 37, 37, 38, 39, 39, 40, 41, 41, 42, 43, 43, 44, 45
OFFSET
0,5
FORMULA
a(0)=0. a(1)=a(2)=1. a(3*n)=A005408(n-1). a(3*n+1)=a(3*n)+1. a(3*n+2)=a(3*n)+2, n>0.
O.g.f.: x*(1+x^4)/((1-x)^2*(x^2+x+1)). a(n)=(2*n-2-A057078(n))/3, n>1. - R. J. Mathar, Jul 16 2008
Euler transform of length 8 sequence [ 1, 0, 1, 1, 0, 0, 0, -1]. - Michael Somos, Jan 11 2011
0 = a(n) - a(n+1) - a(n+3) + a(n+4) if n>1. - Michael Somos, Nov 11 2015
a(n) = floor((2*n-1)/3) for n > 1. - Werner Schulte, Feb 27 2019
EXAMPLE
G.f. = x + x^2 + x^3 + 2*x^4 + 3*x^5 + 3*x^6 + 4*x^7 + 5*x^8 + 5*x^9 + 6*x^10 + ...
MAPLE
A131737 := proc(n): (1/9)*add(5*(k mod 3)+2*((k+1) mod 3)-((k+2) mod 3), k=0..n)-1+(binomial(2*n, n) mod 2)+(binomial((n+1)^2, n+3) mod 2) end: seq( A131737(n), n=0..74); # Johannes W. Meijer, Jun 27 2011
MATHEMATICA
Join[{0, 1}, LinearRecurrence[{1, 0, 1, -1}, {1, 1, 2, 3}, 68]] (* Georg Fischer, Feb 27 2019 *)
Insert[Flatten[Table[If[EvenQ[n], n, {n, n}], {n, 0, 70}]], 1, 2] (* Harvey P. Dale, Sep 04 2020 *)
PROG
(PARI) {a(n) = (n==0) + (n==1) + (n\3)*2 + (n%3) - 1}; /* Michael Somos, Jan 11 2011 */
CROSSREFS
Cf. A004396.
Sequence in context: A317686 A156689 A168052 * A004396 A066481 A248103
KEYWORD
nonn,easy,less
AUTHOR
Paul Curtz, Sep 19 2007
EXTENSIONS
Edited by R. J. Mathar, Jul 16 2008
STATUS
approved