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 A257088 #24 Jul 01 2025 19:58:26 %S A257088 1,1,4,3,8,5,12,7,16,9,20,11,24,13,28,15,32,17,36,19,40,21,44,23,48, %T A257088 25,52,27,56,29,60,31,64,33,68,35,72,37,76,39,80,41,84,43,88,45,92,47, %U A257088 96,49,100,51,104,53,108,55,112,57,116,59,120,61,124,63,128 %N A257088 a(2*n) = 4*n if n>0, a(2*n + 1) = 2*n + 1, a(0) = 1. %H A257088 Reinhard Zumkeller, <a href="/A257088/b257088.txt">Table of n, a(n) for n = 0..1000</a> %H A257088 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (0,2,0,-1). %F A257088 Euler transform of length 4 sequence [ 1, 3, -1, -1]. %F A257088 a(n) is multiplicative with a(2^e) = 2^(e+1) if e>0, otherwise a(p^e) = p^e. %F A257088 G.f.: (1 + x + 2*x^2 + x^3 + x^4) / (1 - 2*x^2 + x^4). %F A257088 G.f.: (1 - x^3) * (1 - x^4) / ((1 - x) * (1 - x^2)^3). %F A257088 MOBIUS transform of A215947 is [1, 4, 3, 8, 5, ...]. %F A257088 a(n) = n * A040001(n) if n>0. %F A257088 a(n) + a(n-1) = A007310(n) if n>0. %F A257088 a(n) = A001082(n+1) - A001082(n) if n>0. %F A257088 Binomial transform with a(0)=0 is A128543 if n>0. %F A257088 a(2*n) = A008574(n). a(2*n + 1) = A005408(n). %F A257088 a(n) = A022998(n) if n>0. - _R. J. Mathar_, Apr 19 2015 %F A257088 From _Amiram Eldar_, Jan 28 2025: (Start) %F A257088 Dirichlet g.f.: (1+2^(1-s)) * zeta(s-1). %F A257088 Sum_{k=1..n} a(k) ~ (3/4) * n^2. (End) %F A257088 a(n) = gcd(n^n, 2*n). - _Mia Boudreau_, Jun 27 2025 %e A257088 G.f. = 1 + x + 4*x^2 + 3*x^3 + 8*x^4 + 5*x^5 + 12*x^6 + 7*x^7 + 16*x^8 + ... %t A257088 a[ n_] := Which[ n < 1, Boole[n == 0], OddQ[n], n, True, 2 n]; %t A257088 a[ n_] := SeriesCoefficient[ (1 + x + 2*x^2 + x^3 + x^4) / (1 - 2*x^2 + x^4), {x, 0, n}]; %o A257088 (PARI) {a(n) = if( n<1, n==0, n%2, n, 2*n)}; %o A257088 (PARI) {a(n) = if( n<0, 0, polcoeff( (1 + x + 2*x^2 + x^3 + x^4) / (1 - 2*x^2 + x^4) + x * O(x^n), n))}; %o A257088 (Haskell) %o A257088 import Data.List (transpose) %o A257088 a257088 n = a257088_list !! n %o A257088 a257088_list = concat $ transpose [a008574_list, a005408_list] %o A257088 -- _Reinhard Zumkeller_, Apr 17 2015 %Y A257088 Cf. A001082, A005408, A007310, A008574, A040001, A215947. %Y A257088 CF. A257083 (partial sums), A246695. %K A257088 nonn,mult,easy %O A257088 0,3 %A A257088 _Michael Somos_, Apr 16 2015