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 A080512 #60 Jan 01 2024 09:08:44 %S A080512 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 A080512 39,27,42,29,45,31,48,33,51,35,54,37,57,39,60,41,63,43,66,45,69,47,72, %U A080512 49,75,51,78,53,81,55,84,57,87,59,90,61,93,63,96,65,99,67,102 %N A080512 a(n) = n if n is odd, a(n) = 3*n/2 if n is even. %C A080512 First differences of the generalized heptagonal numbers A085787. - _Omar E. Pol_, Sep 10 2011 %C A080512 Last term in n-th row of A080511. %C A080512 Also A005408 and positive terms of A008585 interleaved. - _Omar E. Pol_, May 28 2012 %C A080512 a(n) is also the length of the n-th line segment of the rectangular spiral whose vertices are the generalized heptagonal numbers. - _Omar E. Pol_, Jul 27 2018 %H A080512 Vincenzo Librandi, <a href="/A080512/b080512.txt">Table of n, a(n) for n = 1..10000</a> %H A080512 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (0,2,0,-1). %F A080512 a(n) = n if n is odd, a(n) = 3*n/2 if n is even. %F A080512 a(n)*a(n+3) = -3 + a(n+1)*a(n+2). %F A080512 From _Paul Barry_, Sep 04 2003: (Start) %F A080512 G.f.: (1+3*x+x^2)/((1-x^2)^2); %F A080512 a(n) = n*(5 + (-1)^n)/4. (End) %F A080512 Multiplicative with a(2^e) = 3*2^(e-1), a(p^e) = p^e otherwise. - _Christian G. Bower_, May 17 2005 %F A080512 Equals A126988 * (1, 1, 0, 0, 0, ...) - _Gary W. Adamson_, Apr 17 2007 %F A080512 Dirichlet g.f.: zeta(s-1) * (1 + 1/2^s). - _Amiram Eldar_, Oct 25 2023 %F A080512 Sum_{d divides n} mu(n/d)*a(d) = A126246(n), where mu(n) = A008683(n) is the Möbius function. - _Peter Bala_, Dec 31 2023 %t A080512 Table[If[EvenQ[n],3n/2,n],{n,68}] (* _Jayanta Basu_, May 20 2013 *) %o A080512 (Magma) [n*(5+(-1)^n)/4: n in [1..60]]; // _Vincenzo Librandi_, Sep 11 2011 %o A080512 (Haskell) %o A080512 import Data.List (transpose) %o A080512 a080512 n = if m == 0 then 3 * n' else n where (n', m) = divMod n 2 %o A080512 a080512_list = concat $ transpose [[1, 3 ..], [3, 6 ..]] %o A080512 -- _Reinhard Zumkeller_, Apr 06 2015 %Y A080512 Cf. A080511, A008619, A126988. %Y A080512 Cf. A005408, A008585, A064455, A085787, A126246 %K A080512 nonn,easy,mult %O A080512 1,2 %A A080512 _Amarnath Murthy_, Mar 20 2003