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-3 of 3 results.

A053832 Sum of digits of n written in base 12.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 7, 8
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,6,7,8,9,10,11}, 1->{1,2,3,4,5,6,7,8,9,10,11,12}, 2->{2,3,4,5,6,7,8,9,10,11,12,13}, etc. - Robert G. Wilson v, Jul 27 2006

Examples

			a(20) = 1 + 8 = 9 because 20 is written as 18 base 12.
		

Crossrefs

Programs

  • Haskell
    a053832 n = q 0 $ divMod n 12 where
       q r (0, d) = r + d
       q r (m, d) = q (r + d) $ divMod m 12
    -- Reinhard Zumkeller, May 15 2011
  • Mathematica
    Table[Plus @@ IntegerDigits[n, 12], {n, 0, 85}] (* or *)
    Nest[ Flatten[ #1 /. a_Integer -> Table[a + i, {i, 0, 11}]] &, {0}, 2] (* Robert G. Wilson v, Jul 27 2006 *)
  • PARI
    a(n)=if(n<1,0,if(n%12,a(n-1)+1,a(n/12)))
    

Formula

From Benoit Cloitre, Dec 19 2002: (Start)
a(0) = 0, a(12n+i) = a(n)+i for 0 <= i <= 11.
a(n) = n-11*(Sum_{k>0} floor(n/12^k)) = n-11*A064459(n). (End)
a(n) = A138530(n,12) for n > 11. - Reinhard Zumkeller, Mar 26 2008
Sum_{n>=1} a(n)/(n*(n+1)) = 12*log(12)/11 (Shallit, 1984). - Amiram Eldar, Jun 03 2021

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

A342696 a(n) = floor(n/12).

Original entry on oeis.org

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

Views

Author

Wesley Ivan Hurt, May 18 2021

Keywords

Comments

Agrees with A064459 for n < 144, but a(144) = 12 whereas A064459(144) = 13.

Crossrefs

Cf. A064459, A221912 (partial sums), A344420 (floor n/11).

Programs

  • Mathematica
    Floor[Range[0, 200]/12]

Formula

G.f.: x^12 / ( (1+x)*(1+x^2)*(x^4-x^2+1)*(x^2-x+1)*(1+x+x^2)*(x-1)^2 ). - R. J. Mathar, Jul 08 2021
a(n) = a(n-1) + a(n-12) - a(n-13). - Wesley Ivan Hurt, Oct 29 2022
Showing 1-3 of 3 results.