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-10 of 11 results. Next

A054861 Greatest k such that 3^k divides n!.

Original entry on oeis.org

0, 0, 0, 1, 1, 1, 2, 2, 2, 4, 4, 4, 5, 5, 5, 6, 6, 6, 8, 8, 8, 9, 9, 9, 10, 10, 10, 13, 13, 13, 14, 14, 14, 15, 15, 15, 17, 17, 17, 18, 18, 18, 19, 19, 19, 21, 21, 21, 22, 22, 22, 23, 23, 23, 26, 26, 26, 27, 27, 27, 28, 28, 28, 30, 30, 30, 31, 31, 31, 32, 32, 32, 34, 34, 34, 35, 35
Offset: 0

Views

Author

Henry Bottomley, May 22 2000

Keywords

Comments

Also the number of trailing zeros in the base-3 representation of n!. - Hieronymus Fischer, Jun 18 2007
Also the highest power of 6 dividing n!. - Hieronymus Fischer, Aug 14 2007
A column of A090622. - Alois P. Heinz, Oct 05 2012
The 'missing' values are listed in A096346. - Stanislav Sykora, Jul 16 2014

Examples

			a(100) = 48.
a(10^3) = 498.
a(10^4) = 4996.
a(10^5) = 49995.
a(10^6) = 499993.
a(10^7) = 4999994.
a(10^8) = 49999990.
a(10^9) = 499999993.
		

Crossrefs

Cf. A011371 (for analog involving powers of 2). See also A027868.
Cf. A004128 (for a(3n)).

Programs

Formula

a(n) = floor(n/3) + floor(n/9) + floor(n/27) + floor(n/81) + ... .
a(n) = (n - A053735(n))/2.
a(n+1) = Sum_{k=1..n} A007949(k). - Benoit Cloitre, Mar 24 2002
From Hieronymus Fischer, Jun 18, Jun 25 and Aug 14 2007: (Start)
G.f.: (1/(1-x))*Sum_{k>0} x^(3^k)/(1-x^(3^k)).
a(n) = Sum_{k=3..n} Sum_{j>=3, j|k} (floor(log_3(j)) - floor(log_3(j-1))).
G.f.: L[b(k)](x)/(1-x), where L[b(k)](x) = Sum_{k>=0} b(k)*x^k/(1-x^k) is a Lambert series with b(k) = 1, if k>1 is a power of 3, otherwise b(k)=0.
G.f.: (1/(1-x))*Sum_{k>0} c(k)*x^k, where c(k) = Sum_{j>1, j|k} (floor(log_3(j)) - floor(log_3(j-1))).
Recurrence:
a(n) = floor(n/3) + a(floor(n/3));
a(3*n) = n + a(n);
a(n*3^m) = n*(3^m-1)/2 + a(n).
a(k*3^m) = k*(3^m-1)/2, for 0 <= k < 3, m >= 0.
Asymptotic behavior:
a(n) = n/2 + O(log(n)),
a(n+1) - a(n) = O(log(n)); this follows from the inequalities below.
a(n) <= (n-1)/2; equality holds for powers of 3.
a(n) >= (n-2)/2 - floor(log_3(n)); equality holds for n = 3^m - 1, m > 0.
lim inf (n/2 - a(n)) = 1/2 for n->oo.
lim sup (n/2 - log_3(n) - a(n)) = 0 for n->oo.
lim sup (a(n+1) - a(n) - log_3(n)) = 0 for n->oo. (End)
a(n) = A007949(n!). - R. J. Mathar, Sep 03 2016
From R. J. Mathar, Jul 08 2021: (Start)
a(n) = A122841(n!).
Partial sums of A007949. (End)
a(n) = A007949(A000142(n)). - David A. Corneth, Nov 02 2023

Extensions

Examples added by Hieronymus Fischer, Jun 06 2012
New name by David A. Corneth, Nov 02 2023

A122841 Greatest k such that 6^k divides n.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0
Offset: 1

Views

Author

Reinhard Zumkeller, Sep 13 2006

Keywords

Comments

See A054895 for the partial sums. - Hieronymus Fischer, Jun 08 2012

Crossrefs

Programs

  • Haskell
    a122841 = f 0 where
       f y x = if r > 0 then y else f (y + 1) x'
               where (x', r) = divMod x 6
    -- Reinhard Zumkeller, Nov 10 2013
    
  • Mathematica
    Table[IntegerExponent[n, 6], {n, 1, 100}] (* Amiram Eldar, Sep 14 2020 *)
  • PARI
    a(n) = valuation(n, 6); \\ Michel Marcus, Jan 17 2022

Formula

From Hieronymus Fischer, Jun 03 2012: (Start)
With m = floor(log_6(n)), frac(x) = x-floor(x):
a(n) = Sum_{j=1..m} (1 - ceiling(frac(n/6^j))).
a(n) = m + Sum_{j=1..m} (floor(-frac(n/6^j))).
a(n) = A054895(n) - A054895(n-1).
G.f.: Sum_{j>0} x^6^j/(1-x^6^j). (End)
a(A047253(n)) = 0; a(A008588(n)) > 0; a(A044102(n)) > 1. - Reinhard Zumkeller, Nov 10 2013
6^a(n) = A234959(n), n >= 1. - Wolfdieter Lang, Jun 30 2014
Asymptotic mean: lim_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 1/5. - Amiram Eldar, Jan 17 2022
a(n) = min(A007814(n), A007949(n)). - Jianing Song, Jul 23 2022

A053827 Sum of digits of (n written in base 6).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 6, 2, 3, 4, 5, 6, 7, 3, 4, 5, 6, 7, 8, 4, 5, 6, 7, 8, 9, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 2, 3, 4, 5, 6, 7, 3, 4, 5, 6, 7, 8, 4, 5, 6, 7, 8, 9, 5, 6, 7, 8, 9, 10, 6, 7, 8, 9, 10, 11, 2, 3, 4, 5, 6, 7, 3, 4, 5, 6, 7, 8, 4, 5, 6, 7, 8, 9, 5, 6, 7, 8, 9, 10, 6, 7, 8, 9, 10
Offset: 0

Views

Author

Henry Bottomley, Mar 28 2000

Keywords

Comments

Also the fixed point of the morphism 0->{0,1,2,3,4,5}, 1->{1,2,3,4,5,6}, 2->{2,3,4,5,6,7}, etc. - Robert G. Wilson v, Jul 27 2006
Sum of six consecutive terms is (15,21,27,33,39,45; 21,27,33,39,45,51; 27,33,39,45,51,57; and so on). - Vincenzo Librandi, Aug 02 2010

Examples

			a(20)=3+2=5 because 20 is written as 32 base 6.
From _Omar E. Pol_, Feb 21 2010: (Start)
It appears that this can be written as a triangle :
  0,
  1,2,3,4,5,
  1,2,3,4,5,6,2,3,4,5,6,7,3,4,5,6,7,8,4,5,6,7,8,9,5,6,7,8,9,10,
  1,2,3,4,5,6,2,3,4,5,6,7,3,4,5,6,7,8,4,5,6,7,8,9,5,6,7,8,9,10,6,7,8,9,10,11,2...
where the rows converge to A173526.
See the conjecture in the entry A000120. (End)
		

Crossrefs

Sum of digits of n written in bases 2-16: A000120, A053735, A053737, A053824, this sequence, A053828, A053829, A053830, A007953, A053831, A053832, A053833, A053834, A053835, A053836.
Cf. A173526. - Omar E. Pol, Feb 21 2010

Programs

  • Magma
    [&+Intseq(n,6):n in [0..105]]; // Marius A. Burtea, Aug 24 2019
  • Mathematica
    Table[Plus @@ IntegerDigits[n, 6], {n, 0, 100}] (* or *)
    Nest[ Flatten[ #1 /. a_Integer -> Table[a + i, {i, 0, 5}]] &, {0}, 4] (* Robert G. Wilson v, Jul 27 2006 *)
  • PARI
    a(n)=if(n<1,0,if(n%6,a(n-1)+1,a(n/6)))
    
  • PARI
    a(n) = sumdigits(n, 6); \\ Michel Marcus, Aug 24 2019
    

Formula

From Benoit Cloitre, Dec 19 2002: (Start)
a(0) = 0, a(6n+i) = a(n)+i for 0 <= i <= 5.
a(n) = n-5*(Sum_{k>0} floor(n/6^k)) = n-5*A054895(n). (End)
a(n) = A138530(n,6) for n > 5. - Reinhard Zumkeller, Mar 26 2008
a(n) = Sum_{k>=0} A030567(n,k). - Philippe Deléham, Oct 21 2011
a(0) = 0; a(n) = a(n - 6^floor(log_6(n))) + 1. - Ilya Gutkovskiy, Aug 23 2019
Sum_{n>=1} a(n)/(n*(n+1)) = 6*log(6)/5 (Shallit, 1984). - Amiram Eldar, Jun 03 2021

A054896 a(n) = Sum_{k>0} floor(n/7^k).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13
Offset: 0

Views

Author

Henry Bottomley, May 23 2000

Keywords

Comments

Exponent of the highest power of 7 dividing n!.

Examples

			  a(10^0) = 0.
  a(10^1) = 1.
  a(10^3) = 16.
  a(10^3) = 164.
  a(10^4) = 1665.
  a(10^5) = 16662.
  a(10^6) = 166664.
  a(10^7) = 1666661.
  a(10^8) = 16666662.
  a(10^9) = 166666661
		

Crossrefs

Cf. A011371 and A054861 for analogs involving powers of 2 and 3.

Programs

Formula

a(n) = floor(n/7) + floor(n/49) + floor(n/343) + floor(n/2401) + ...
a(n) = (n - A053828(n))/6.
From Hieronymus Fischer, Aug 14 2007: (Start)
a(n) = a(floor(n/7)) + floor(n/7).
a(7*n) = n + a(n).
a(n*7^m) = a(n) + n*(7^m-1)/6.
a(k*7^m) = k*(7^m-1)/6, for 0 <= k < 7, m >= 0.
Asymptotic behavior:
a(n) = n/6 + O(log(n)).
a(n+1) - a(n) = O(log(n)); this follows from the inequalities below.
a(n) <= (n-1)/6; equality holds for powers of 7.
a(n) >= (n-6)/6 - floor(log_7(n)); equality holds for n=7^m-1, m>0. -
lim inf (n/6 - a(n)) = 1/6, for n-->oo.
lim sup (n/6 - log_7(n) - a(n)) = 0, for n-->oo.
lim sup (a(n+1) - a(n) - log_7(n)) = 0, for n-->oo.
G.f.: (1/(1-x))*Sum_{k > 0} x^(7^k)/(1-x^(7^k)). (End)
Partial sums of A214411. - R. J. Mathar, Jul 08 2021
a(n) = A214411(A000142(n)). - Michel Marcus, Oct 07 2024

Extensions

Examples added by Hieronymus Fischer, Jun 06 2012

A132270 a(n) = floor((n^7-1)/(7*n^6)), which is the same as integers repeated 7 times.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10
Offset: 1

Views

Author

Mohammad K. Azarian, Nov 06 2007

Keywords

Crossrefs

Cf. A004526 ([n/2]), A002264 ([n/3]), A002265 ([n/4]), A002266 ([n/5]), A054895.
Cf. A152467 ([n/6]), A132292 ([(n-1)/8]).
Cf. A002162.

Programs

Formula

a(n) = floor((n^7-n^6)/(7*n^6-6*n^5)). - Mohammad K. Azarian, Nov 08 2007
G.f.: x^8/(1-x-x^7+x^8). - Robert Israel, Feb 02 2015
a(n) = a(n-1)+a(n-7)-a(n-8). - Wesley Ivan Hurt, May 03 2021
a(n) = floor((n-1)/7). - M. F. Hasler, May 19 2021
Sum_{n>=8} (-1)^n/a(n) = log(2) (A002162). - Amiram Eldar, Sep 30 2022

Extensions

Offset corrected by Mohammad K. Azarian, Nov 19 2008

A132292 Integers repeated 8 times: a(n) = floor((n-1)/8).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10
Offset: 1

Views

Author

Mohammad K. Azarian, Nov 06 2007

Keywords

Comments

Also floor((n^8-1)/(8*n^7)).

Crossrefs

Programs

Formula

Also, a(n) = floor((n^8-n^7)/(8n^7-7n^6)). - Mohammad K. Azarian, Nov 18 2007
a(n) = A180969(3,n).
a(n) = (r - 8 + 4*sin(r*Pi/8))/16 where r = 2*n - 1 - 2*cos(n*Pi/2) - cos(n*Pi) + 2*sin(n*Pi/2). - Wesley Ivan Hurt, Oct 04 2018

Extensions

Offset corrected by Mohammad K. Azarian, Nov 20 2008
New name from Wesley Ivan Hurt, Jun 17 2013

A090623 Triangle of T(n,k) = [n/k] + [n/k^2] + [n/k^3] + [n/k^4] + ... for n, k > 1.

Original entry on oeis.org

1, 1, 1, 3, 1, 1, 3, 1, 1, 1, 4, 2, 1, 1, 1, 4, 2, 1, 1, 1, 1, 7, 2, 2, 1, 1, 1, 1, 7, 4, 2, 1, 1, 1, 1, 1, 8, 4, 2, 2, 1, 1, 1, 1, 1, 8, 4, 2, 2, 1, 1, 1, 1, 1, 1, 10, 5, 3, 2, 2, 1, 1, 1, 1, 1, 1, 10, 5, 3, 2, 2, 1, 1, 1, 1, 1, 1, 1, 11, 5, 3, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 11, 6, 3, 3, 2, 2, 1, 1, 1
Offset: 2

Views

Author

Henry Bottomley, Dec 06 2003

Keywords

Examples

			Rows start:
  1;
  1,1;
  3,1,1;
  3,1,1,1;
  4,2,1,1,1;
  4,2,1,1,1,1;
  7,2,2,1,1,1,1;
  7,4,2,1,1,1,1,1;
  8,4,2,2,1,1,1,1,1;
  ...
		

Crossrefs

Programs

  • Mathematica
    A090623[n_, k_] := Quotient[n - DigitSum[n, k], k - 1];
    Table[A090623[n, k], {n, 2, 15}, {k, 2, n}] (* Paolo Xausa, Sep 02 2025 *)
  • PARI
    T(n,k) = {my(s = 0, j = 1); while(p=n\k^j, s += p; j++); s;} \\ Michel Marcus, Feb 02 2016
    
  • PARI
    T(n,k) = (n - sumdigits(n,k))/(k-1) \\ Zhuorui He, Aug 25 2025

Formula

For p prime, T(n, p) = A090622(n, p) is the number of times that p is a factor of n!.
T(n,k) = (n - A240236(n, k))/(k - 1). - Zhuorui He, Aug 25 2025

Extensions

a(41) onward corrected by Zhuorui He, Aug 25 2025

A097992 G.f.: 1/((1-x)*(1-x^6)) = 1/ ( (1+x)*(x^2-x+1)*(1+x+x^2)*(x-1)^2 ).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15
Offset: 0

Views

Author

N. J. A. Sloane, Sep 07 2004

Keywords

Crossrefs

Apart from initial terms, same as A054895.

Programs

  • Mathematica
    CoefficientList[Series[1/((1-x)(1-x^6)),{x,0,90}],x] (* or *) LinearRecurrence[{1,0,0,0,0,1,-1},{1,1,1,1,1,1,2},90] (* Harvey P. Dale, Oct 29 2023 *)

Formula

Molien series is 1/((1-x^2)*(1-x^12)).
a(n)=1+floor(n/6)
a(n)=1+(6*n-15+3*(-1)^n+12*sin[(2*n+1)*Pi/6]+4*sqrt(3)*sin[(2*n+1)*Pi/3])/36

A243758 a(n) = Product_{i=1..n} A234959(i).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 6, 6, 6, 6, 6, 6, 36, 36, 36, 36, 36, 36, 216, 216, 216, 216, 216, 216, 1296, 1296, 1296, 1296, 1296, 1296, 7776, 7776, 7776, 7776, 7776, 7776, 279936, 279936, 279936, 279936, 279936, 279936, 1679616, 1679616, 1679616, 1679616, 1679616, 1679616, 10077696
Offset: 0

Views

Author

Tom Edgar, Jun 10 2014

Keywords

Comments

This is the generalized factorial for A234959.
a(0) = 1 as it represents the empty product.

Crossrefs

Programs

  • Haskell
    a243758 n = a243758_list !! n
    a243758_list = scanl (*) 1 a234959_list
    -- Reinhard Zumkeller, Feb 09 2015
    
  • Mathematica
    Table[Product[6^IntegerExponent[k, 6], {k, 1, n}], {n, 0, 20}] (* G. C. Greubel, Dec 24 2016 *)
  • PARI
    valp(n,p)=my(s); while(n\=p, s+=n); s
    a(n)=6^valp(n,6) \\ Charles R Greathouse IV, Oct 03 2016
  • Sage
    S=[0]+[6^valuation(i,6) for i in [1..100]]
    [prod(S[1:i+1]) for i in [0..99]]
    

Formula

a(n) = Product_{i=1..n} A234959(i).
a(n) = 6^(A054895(n)).

A103215 Numbers congruent to {1, 2, 5, 10, 13, 17} mod 24.

Original entry on oeis.org

1, 2, 5, 10, 13, 17, 25, 26, 29, 34, 37, 41, 49, 50, 53, 58, 61, 65, 73, 74, 77, 82, 85, 89, 97, 98, 101, 106, 109, 113, 121, 122, 125, 130, 133, 137, 145, 146, 149, 154, 157, 161, 169, 170, 173, 178, 181, 185, 193, 194, 197, 202, 205, 209, 217, 218, 221, 226
Offset: 1

Views

Author

Ralf Stephan, Jan 28 2005

Keywords

Crossrefs

Union of A008784 and A103216.
Cf. A054895.

Programs

  • Haskell
    a103215 n = a103215_list !! (n-1)
    a103215_list = [1,2,5,10,13,17] ++ map (+ 24) a103215_list
    -- Reinhard Zumkeller, Jul 05 2013
    
  • Magma
    [n : n in [0..300] | n mod 24 in [1, 2, 5, 10, 13, 17]]; // Wesley Ivan Hurt, Jul 22 2016
  • Maple
    A103215:=n->24*floor(n/6)+[1, 2, 5, 10, 13, 17][(n mod 6)+1]: seq(A103215(n), n=0..100); # Wesley Ivan Hurt, Jul 22 2016
  • Mathematica
    Select[Range[300], MemberQ[{1,2,5,10,13,17}, Mod[#,24]]&] (* or *) LinearRecurrence[{1,0,0,0,0,1,-1}, {1,2,5,10,13,17,25}, 60] (* Harvey P. Dale, Feb 19 2015 *)

Formula

G.f.: x*(1+x+3*x^2+5*x^3+3*x^4+4*x^5+7*x^6) / ( (1+x)*(1+x+x^2)*(x^2-x+1)*(x-1)^2 ). - R. J. Mathar, Jul 02 2011
a(1)=1, a(2)=2, a(3)=5, a(4)=10, a(5)=13, a(6)=17, a(7)=25, a(n) = a(n-1)+ a(n-6)-a(n-7) for n>7. - Harvey P. Dale, Feb 19 2015
From Wesley Ivan Hurt, Jul 22 2016: (Start)
a(n) = a(n-6) + 24 for n>6.
a(n) = (12*n - 18 + cos(n*Pi/3) - 3*cos(2*n*Pi/3) - cos(n*Pi) + 2*sqrt(3)*sin(n*Pi/3) + 2*sqrt(3)*sin(2*n*Pi/3))/3.
a(6k) = 24k-7, a(6k-1) = 24k-11, a(6k-2) = 24k-14, a(6k-3) = 24k-19, a(6k-4) = 24k-22, a(6k-5) = 24k-23. (End)
Showing 1-10 of 11 results. Next