This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A257143 #22 Jan 03 2023 09:22:13 %S A257143 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, %T A257143 39,27,42,29,45,31,48,33,51,35,54,37,57,39,60,41,63,43,66,45,69,47,72, %U A257143 49,75,51,78,53,81,55,84,57,87,59,90,61,93,63,96,65,99 %N A257143 a(2*n) = 3*n if n>0, a(2*n + 1) = 2*n + 1, a(0) = 1. %H A257143 Reinhard Zumkeller, <a href="/A257143/b257143.txt">Table of n, a(n) for n = 0..1000</a> %H A257143 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (0,2,0,-1). %F A257143 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. %F A257143 Euler transform of length 5 sequence [ 1, 2, 0, 0, -1]. %F A257143 G.f.: (1 - x^5) / ((1 - x) * (1 - x^2)^2). %F A257143 G.f.: (1 + x + x^2 + x^3 + x^4) / (1 - 2*x^2 + x^4). %F A257143 a(n) = A080512(n) if n>0. %F A257143 First difference of A111711. %F A257143 A188626(n) = p(-1) where p(x) is the unique degree-n polynomial such that p(k) = a(k) for k = 0, 1, ..., n. %F A257143 From _Amiram Eldar_, Jan 03 2023: (Start) %F A257143 Dirichlet g.f.: zeta(s-1)*(1+1/2^s). %F A257143 Sum_{k=1..n} a(k) ~ (5/8) * n^2. (End) %e A257143 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 + ... %t A257143 a[ n_] := Which[ n < 1, Boole[n == 0], OddQ[n], n, True, 3 n/2]; %t A257143 a[ n_] := SeriesCoefficient[ (1 + x + x^2 + x^3 + x^4) / (1 - 2*x^2 + x^4), {x, 0, n}]; %o A257143 (PARI) {a(n) = if( n<1, n==0, n%2, n, 3*n/2)}; %o A257143 (PARI) {a(n) = if( n<0, 0, polcoeff( (1 - x^5) / ((1 - x) * (1 - x^2)^2) + x * O(x^n), n))}; %o A257143 (Haskell) %o A257143 import Data.List (transpose) %o A257143 a257143 n = a257143_list !! n %o A257143 a257143_list = concat $ transpose [a008486_list, a005408_list] %o A257143 -- _Reinhard Zumkeller_, Apr 17 2015 %Y A257143 Cf. A080512, A111711 (partial sums), A188626. %Y A257143 Cf. A005408, A008486. %K A257143 nonn,mult,easy %O A257143 0,3 %A A257143 _Michael Somos_, Apr 16 2015