[go: up one dir, main page]

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!)
A257143 a(2*n) = 3*n if n>0, a(2*n + 1) = 2*n + 1, a(0) = 1. 4
1, 1, 3, 3, 6, 5, 9, 7, 12, 9, 15, 11, 18, 13, 21, 15, 24, 17, 27, 19, 30, 21, 33, 23, 36, 25, 39, 27, 42, 29, 45, 31, 48, 33, 51, 35, 54, 37, 57, 39, 60, 41, 63, 43, 66, 45, 69, 47, 72, 49, 75, 51, 78, 53, 81, 55, 84, 57, 87, 59, 90, 61, 93, 63, 96, 65, 99 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
FORMULA
a(n) is multiplicative with a(2^e) = 3 * 2^(e-1) if e>0, a(p^e) = p^e otherwise and a(0) = 1.
Euler transform of length 5 sequence [ 1, 2, 0, 0, -1].
G.f.: (1 - x^5) / ((1 - x) * (1 - x^2)^2).
G.f.: (1 + x + x^2 + x^3 + x^4) / (1 - 2*x^2 + x^4).
a(n) = A080512(n) if n>0.
First difference of A111711.
A188626(n) = p(-1) where p(x) is the unique degree-n polynomial such that p(k) = a(k) for k = 0, 1, ..., n.
From Amiram Eldar, Jan 03 2023: (Start)
Dirichlet g.f.: zeta(s-1)*(1+1/2^s).
Sum_{k=1..n} a(k) ~ (5/8) * n^2. (End)
EXAMPLE
G.f. = 1 + x + 3*x^2 + 3*x^3 + 6*x^4 + 5*x^5 + 9*x^6 + 7*x^7 + 12*x^8 + ...
MATHEMATICA
a[ n_] := Which[ n < 1, Boole[n == 0], OddQ[n], n, True, 3 n/2];
a[ n_] := SeriesCoefficient[ (1 + x + x^2 + x^3 + x^4) / (1 - 2*x^2 + x^4), {x, 0, n}];
PROG
(PARI) {a(n) = if( n<1, n==0, n%2, n, 3*n/2)};
(PARI) {a(n) = if( n<0, 0, polcoeff( (1 - x^5) / ((1 - x) * (1 - x^2)^2) + x * O(x^n), n))};
(Haskell)
import Data.List (transpose)
a257143 n = a257143_list !! n
a257143_list = concat $ transpose [a008486_list, a005408_list]
-- Reinhard Zumkeller, Apr 17 2015
CROSSREFS
Cf. A080512, A111711 (partial sums), A188626.
Sequence in context: A165606 A295220 A280167 * A080512 A225441 A102245
KEYWORD
nonn,mult,easy
AUTHOR
Michael Somos, Apr 16 2015
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 August 29 15:03 EDT 2024. Contains 375517 sequences. (Running on oeis4.)