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 A051176 #79 Jul 12 2025 10:54:53 %S A051176 0,1,2,1,4,5,2,7,8,3,10,11,4,13,14,5,16,17,6,19,20,7,22,23,8,25,26,9, %T A051176 28,29,10,31,32,11,34,35,12,37,38,13,40,41,14,43,44,15,46,47,16,49,50, %U A051176 17,52,53,18,55,56,19,58,59,20,61,62,21,64,65,22,67 %N A051176 If n mod 3 = 0 then n/3 else n. %C A051176 Numerator of n/3. - _Wesley Ivan Hurt_, Jul 18 2014 %H A051176 Reinhard Zumkeller, <a href="/A051176/b051176.txt">Table of n, a(n) for n = 0..1000</a> %H A051176 <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,2,0,0,-1). %F A051176 a(n) = n / gcd(n,3). %F A051176 G.f.: x*(1+2*x+x^2+2*x^3+x^4)/(1-x^3)^2 = x*(1+2*x+x^2+2*x^3+x^4) / ( (x-1)^2*(1+x+x^2)^2 ). - _Len Smiley_, Apr 30 2001 %F A051176 Multiplicative with a(3^e) = 3^(e-1), a(p^e) = p^e otherwise. - _Mitch Harris_, Jun 09 2005 %F A051176 a(n) = A167192(n+3, 3). - _Reinhard Zumkeller_, Oct 30 2009 %F A051176 From _R. J. Mathar_, Apr 18 2011: (Start) %F A051176 a(n) = A109044(n)/3. %F A051176 Dirichlet g.f.: zeta(s-1)*(1-2/3^s). (End) %F A051176 a(n) = n/3 * (1 + 2*A011655(n)) = n*A144437(n)/3. - _Timothy Hopper_, Feb 23 2017 %F A051176 G.f.: x /(1 - x)^2 - 2 * x^3/(1 - x^3)^2. - _Michael Somos_, Mar 05 2017 %F A051176 a(n) = a(-n) for all n in Z. - _Michael Somos_, Mar 05 2017 %F A051176 a(n) = n*(7 - 4*cos((2*Pi*n)/3)) / 9. - _Colin Barker_, Mar 05 2017 %F A051176 Sum_{k=1..n} a(k) ~ (7/18) * n^2. - _Amiram Eldar_, Nov 25 2022 %F A051176 Sum_{n>=1} (-1)^(n+1)/a(n) = 5*log(2)/3. - _Amiram Eldar_, Sep 08 2023 %e A051176 G.f. = x + 2*x^2 + x^3 + 4*x^4 + 5*x^5 + 2*x^6 + 7*x^7 + 8*x^8 + 3*x^9 + ... %p A051176 A051176:=n->numer(n/3); seq(A051176(n), n=0..100); # _Wesley Ivan Hurt_, Jul 18 2014 %t A051176 If[Divisible[#,3],#/3,#]&/@Range[0,70] (* _Harvey P. Dale_, Feb 07 2011 *) %t A051176 a[n_] := Numerator[n/3]; Array[a, 100, 0] (* _Wesley Ivan Hurt_, Jul 18 2014 *) %t A051176 LinearRecurrence[{0,0,2,0,0,-1},{0,1,2,1,4,5},70] (* _Harvey P. Dale_, Jul 12 2025 *) %o A051176 (Haskell) %o A051176 a051176 n = if m == 0 then n' else n where (n',m) = divMod n 3 %o A051176 -- _Reinhard Zumkeller_, Aug 27 2012 %o A051176 (PARI) a(n) = if (n % 3, n, n/3); \\ _Michel Marcus_, Feb 02 2016 %o A051176 (Magma) [Numerator(n/3): n in [0..70]]; // _G. C. Greubel_, Feb 19 2019 %o A051176 (Sage) [numerator(n/3) for n in range(70)] # _G. C. Greubel_, Feb 19 2019 %Y A051176 Cf. A026741, A051176, A060819, A060791, A060789 for n / GCD(n,k) for k=2..6. See also A106608 thru A106612 (k = 7 thru 11), A051724 (k = 12), A106614 thru A106621 (k = 13 thru 20). %Y A051176 Cf. A109044, A011655, A144437, A167192. %K A051176 nonn,easy,mult %O A051176 0,3 %A A051176 _N. J. A. Sloane_