cp's OEIS Frontend

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.

Showing 1-6 of 6 results.

A004128 a(n) = Sum_{k=1..n} floor(3*n/3^k).

Original entry on oeis.org

0, 1, 2, 4, 5, 6, 8, 9, 10, 13, 14, 15, 17, 18, 19, 21, 22, 23, 26, 27, 28, 30, 31, 32, 34, 35, 36, 40, 41, 42, 44, 45, 46, 48, 49, 50, 53, 54, 55, 57, 58, 59, 61, 62, 63, 66, 67, 68, 70, 71, 72, 74, 75, 76, 80, 81, 82, 84, 85, 86, 88, 89, 90, 93, 94, 95, 97, 98, 99, 101, 102
Offset: 0

Views

Author

Keywords

Comments

3-adic valuation of (3n)!; cf. A054861.
Denominators of expansion of (1-x)^{-1/3} are 3^a(n). Numerators are in |A067622|.

References

  • Gary W. Adamson, in "Beyond Measure, A Guided Tour Through Nature, Myth and Number", by Jay Kappraff, World Scientific, 2002, p. 356.

Crossrefs

Programs

  • Haskell
    a004128 n = a004128_list !! (n-1)
    a004128_list = scanl (+) 0 a051064_list
    -- Reinhard Zumkeller, May 23 2013
    
  • Magma
    [n + Valuation(Factorial(n), 3): n in [0..70]]; // Vincenzo Librandi, Jun 12 2019
    
  • Maple
    A004128 := proc(n)
        A054861(3*n) ;
    end proc:
    seq(A004128(n),n=0..100) ; # R. J. Mathar, Nov 04 2017
  • Mathematica
    Table[Total[NestWhileList[Floor[#/3] &, n, # > 0 &]], {n, 0, 70}] (* Birkas Gyorgy, May 20 2012 *)
    A004128 = Log[3, CoefficientList[ Series[1/(1+x)^(1/3), {x, 0, 100}], x] // Denominator] (* Jean-François Alcover, Feb 19 2015 *)
    Flatten[{0, Accumulate[Table[IntegerExponent[3*n, 3], {n, 1, 100}]]}] (* Vaclav Kotesovec, Oct 17 2019 *)
  • PARI
    {a(n) = my(s, t=1); while(t<=n, s += n\t; t*=3);s}; /* Michael Somos, Feb 26 2004 */
    
  • PARI
    a(n) = (3*n-sumdigits(n,3))/2; \\ Christian Krause, Jun 10 2025
    
  • Python
    def A007949(n):
        c = 0
        while not (a:=divmod(n,3))[1]:
            c += 1
            n = a[0]
        return c
    def A004128(n): return n+sum(A007949(i) for i in range(3,n+1)) # Chai Wah Wu, Feb 28 2025
  • Sage
    A004128 = lambda n: A004128(n//3) + n if n > 0 else 0
    [A004128(n) for n in (0..70)]  # Peter Luschny, Nov 16 2012
    

Formula

A051064(n) = a(n+1) - a(n). - Alford Arnold, Jul 19 2000
a(n) = n + floor(n/3) + floor(n/9) + floor(n/27) + ... = n + a(floor(n/3)) = n + A054861(n) = A054861(3n) = (3*n - A053735(n))/2. - Henry Bottomley, May 01 2001
a(n) = Sum_{k>=0} floor(n/3^k). a(n) = Sum_{k=0..floor(log_3(n))} floor(n/3^k), n >= 1. - Hieronymus Fischer, Aug 14 2007
Recurrence: a(n) = n + a(floor(n/3)); a(3n) = 3*n + a(n); a(n*3^m) = 3*n*(3^m-1)/2 + a(n). - Hieronymus Fischer, Aug 14 2007
a(k*3^m) = k*(3^(m+1)-1)/2, 0 <= k < 3, m >= 0. - Hieronymus Fischer, Aug 14 2007
Asymptotic behavior: a(n) = (3/2)*n + O(log(n)), a(n+1) - a(n) = O(log(n)); this follows from the inequalities below. - Hieronymus Fischer, Aug 14 2007
a(n) <= (3n-1)/2; equality holds for powers of 3. - Hieronymus Fischer, Aug 14 2007
a(n) >= (3n-2)/2 - floor(log_3(n)); equality holds for n = 3^m - 1, m > 0. - Hieronymus Fischer, Aug 14 2007
Lim inf (3n/2 - a(n)) = 1/2, for n->oo. - Hieronymus Fischer, Aug 14 2007
Lim sup (3n/2 - log_3(n) - a(n)) = 0, for n->oo. - Hieronymus Fischer, Aug 14 2007
Lim sup (a(n+1) - a(n) - log_3(n)) = 1, for n->oo. - Hieronymus Fischer, Aug 14 2007
G.f.: (Sum_{k>=0} x^(3^k)/(1-x^(3^k)))/(1-x). - Hieronymus Fischer, Aug 14 2007
a(n) = Sum_{k>=0} A030341(n,k)*A003462(k+1). - Philippe Deléham, Oct 21 2011
a(n) ~ 3*n/2 - log(n)/(2*log(3)). - Vaclav Kotesovec, Oct 17 2019

Extensions

Current definition suggested by Jason Earls, Jul 04 2001

A067623 Consider the power series (x+1)^(1/3)=1+x/3-x^2/9+5x^3/81+...; sequence gives denominators of coefficients.

Original entry on oeis.org

1, 3, 9, 81, 243, 729, 6561, 19683, 59049, 1594323, 4782969, 14348907, 129140163, 387420489, 1162261467, 10460353203, 31381059609, 94143178827, 2541865828329, 7625597484987, 22876792454961, 205891132094649, 617673396283947
Offset: 0

Views

Author

Benoit Cloitre, Feb 02 2002

Keywords

Comments

All terms are powers of 3.

Crossrefs

Cf. A004128, A046161, A067622 (numerators), A123854.

Programs

Formula

a(n) = 3^A004128(n).
a(n) = 3^n*a(floor(n/3)). - Vladeta Jovovic, Mar 01 2004
a(n) = denominator(binomial(1/3, n)). - Peter Luschny, Apr 07 2016

A364660 Numerators of coefficients in expansion of (1 + x)^(1/4).

Original entry on oeis.org

1, 1, -3, 7, -77, 231, -1463, 4807, -129789, 447051, -3129357, 11094993, -159028233, 574948227, -4188908511, 15359331207, -906200541213, 3358272593907, -25000473754641, 93422822977869, -1401342344668035, 5271716439465465, -39777496770512145, 150462705175415505, -4564035390320936985
Offset: 0

Views

Author

Ilya Gutkovskiy, Aug 01 2023

Keywords

Examples

			(1 + x)^(1/4) = 1 + x/4 - 3*x^2/32 + 7*x^3/128 - 77*x^4/2048 + 231*x^5/8192 - 1463*x^6/65536 + ...
Coefficients are 1, 1/4, -3/32, 7/128, -77/2048, 231/8192, -1463/65536, ...
		

Crossrefs

Denominators are A088802, A123854.

Programs

  • Mathematica
    nmax = 24; CoefficientList[Series[(1 + x)^(1/4), {x, 0, nmax}], x] // Numerator
    Table[Binomial[1/4, n], {n, 0, 24}] // Numerator
  • PARI
    my(x='x+O('x^30)); apply(numerator, Vec((1 + x)^(1/4))) \\ Michel Marcus, Aug 02 2023

A364658 Numerators of coefficients in expansion of (1 + x)^(2/3).

Original entry on oeis.org

1, 2, -1, 4, -7, 14, -91, 208, -494, 10868, -27170, 69160, -535990, 1401820, -3704810, 29638480, -79653415, 215532770, -5280552865, 14452039420, -39743108405, 329300041070, -913059204785, 2540686482880, -21278249294120, 59579098023536, -167279775219928, 12713262916714528
Offset: 0

Views

Author

Ilya Gutkovskiy, Aug 01 2023

Keywords

Examples

			(1 + x)^(2/3) = 1 + 2*x/3 - x^2/9 + 4*x^3/81 - 7*x^4/243 + 14*x^5/729 - 91*x^6/6561 + ...
Coefficients are 1, 2/3, -1/9, 4/81, -7/243, 14/729, -91/6561, ...
		

Crossrefs

Denominators are A067623.

Programs

  • Mathematica
    nmax = 27; CoefficientList[Series[(1 + x)^(2/3), {x, 0, nmax}], x] // Numerator
    Table[Binomial[2/3, n], {n, 0, 27}] // Numerator
  • PARI
    my(x='x+O('x^30)); apply(numerator, Vec((1 + x)^(2/3))) \\ Michel Marcus, Aug 02 2023

A259367 E.g.f.: exp(x-(1-x^3)^(1/3)+1).

Original entry on oeis.org

1, 1, 1, 3, 9, 21, 161, 911, 3473, 48329, 406241, 2150171, 44216921, 491897693, 3327845249, 90934644711, 1257256962081, 10352273016081, 353351881109313, 5836715156967219, 56621346170765481, 2319460179075419941, 44545835926727113441, 497433851743810193983, 23782590451590763744689
Offset: 0

Views

Author

Karol A. Penson and Katarzyna Gorska, Jun 25 2015

Keywords

Crossrefs

Programs

  • Mathematica
    nmax = 30; CoefficientList[Series[E^(x-(1-x^3)^(1/3)+1), {x, 0, nmax}], x] * Range[0, nmax]! (* Vaclav Kotesovec, Jun 08 2021 *)

Formula

a(n) ~ n! * (exp(2) + 2*exp(1/2) * cos((4*Pi*n - 3*sqrt(3))/6)) / (3^(2/3)*Gamma(2/3)*n^(4/3)) * (1 - 3^(5/6)*Gamma(2/3)^2 / (2*Pi*n^(1/3))). - Vaclav Kotesovec, Jun 08 2021

A364713 a(n) is the numerator of coefficient of x^n in expansion of (1 + x)^(1/n).

Original entry on oeis.org

1, -1, 5, -77, 399, -124729, 81549, -23960365, 283583443, -478398640447, 19740912828, -11911591259019739, 18262332208600, -4514446693068714225, 142267808222130386191, -1912831808055538077885, 39773048560156838355, -43025628065750129034887540875, 86435429204640847578555
Offset: 1

Views

Author

Ilya Gutkovskiy, Aug 04 2023

Keywords

Examples

			1, -1/8, 5/81, -77/2048, 399/15625, -124729/6718464, 81549/5764801, ...
		

Crossrefs

Denominators are A145921.

Programs

  • Mathematica
    Table[SeriesCoefficient[(1 + x)^(1/n), {x, 0, n}], {n, 1, 21}] // Numerator
    Table[Binomial[1/n, n], {n, 1, 21}] // Numerator
  • PARI
    a(n) = numerator(binomial(1/n, n)); \\ Michel Marcus, Aug 05 2023
Showing 1-6 of 6 results.