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!)
A132162 a(2n+1) = 3*a(2*n) - 4*n with a(0) = 1, a(1) = 3. 2
1, 3, 5, 11, 7, 13, 9, 15, 17, 35, 19, 37, 21, 39, 23, 41, 25, 43, 27, 45, 29, 47, 31, 49, 33, 51, 53, 107, 55, 109, 57, 111, 59, 113, 61, 115, 63, 117, 65, 119, 67, 121, 69, 123, 71, 125, 73, 127, 75, 129, 77, 131, 79, 133, 81, 135, 83, 137, 85, 139, 87, 141, 89, 143, 91 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
LINKS
FORMULA
Note (a(2*n+1)-a(2*n))/2 gives A132171.
From Robert Israel, Feb 24 2017: (Start)
a(2*n) = 2*n + A132171(n) = 2*n + 3^floor(log[3](2*n+1)).
a(2*n+1) = 2*n + 3*A132171(n) = 2*n + 3*3^floor(log[3](2*n+1)).
a(6*n+2) = 4*n+2+a(2*n+1).
a(6*n+3) = 2+3*a(2*n+1).
a(6*n+4) = 4*n+4+a(2*n+1).
a(6*n+5) = 4+3*a(2*n+1).
a(6*n+6) = 4*n+6+a(2*n+1).
a(6*n+7) = 6+3*a(2*n+1).
(End)
MAPLE
f:= proc(n) option remember; local j;
j:= (n-2) mod 6 + 2;
if n::odd then j-1 + 3*procname(1+(n-j)/3)
else (2*n+j)/3 + procname(1+(n-j)/3)
fi
end proc:
f(0):= 1: f(1):= 3:
map(f, [$0..100]); # Robert Israel, Feb 24 2017
MATHEMATICA
f[n_] := f[n] = With[{j = Mod[n-2, 6]+2}, If[OddQ[n], j-1 + 3*f[1+(n-j)/3], (2n+j)/3 + f[1+(n-j)/3]]];
f[0] = 1; f[1] = 3;
f /@ Range[0, 100] (* Jean-François Alcover, Jun 22 2020, after Maple *)
CROSSREFS
Cf. A132171.
Sequence in context: A151885 A137656 A046228 * A168323 A154561 A073653
KEYWORD
nonn,look
AUTHOR
Paul Curtz, Nov 04 2007
STATUS
approved

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 May 7 08:44 EDT 2024. Contains 372300 sequences. (Running on oeis4.)