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.

Previous Showing 11-20 of 25 results. Next

A138530 Triangle read by rows: T(n,k) = sum of digits of n in base k representation, 1<=k<=n.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Mar 26 2008

Keywords

Comments

A131383(n) = sum of n-th row;
A000027(n) = T(n,1);
A000120(n) = T(n,2) for n>1;
A053735(n) = T(n,3) for n>2;
A053737(n) = T(n,4) for n>3;
A053824(n) = T(n,5) for n>4;
A053827(n) = T(n,6) for n>5;
A053828(n) = T(n,7) for n>6;
A053829(n) = T(n,8) for n>7;
A053830(n) = T(n,9) for n>8;
A007953(n) = T(n,10) for n>9;
A053831(n) = T(n,11) for n>10;
A053832(n) = T(n,12) for n>11;
A053833(n) = T(n,13) for n>12;
A053834(n) = T(n,14) for n>13;
A053835(n) = T(n,15) for n>14;
A053836(n) = T(n,16) for n>15;
A007395(n) = T(n,n-1) for n>1;
A000012(n) = T(n,n).

Examples

			Start of the triangle for n in base k representation:
......................1
....................11....10
......... ........111....11...10
................1111...100...11..10
..............11111...101...12..11..10
............111111...110...20..12..11..10
..........1111111...111...21..13..12..11..10
........11111111..1000...22..20..13..12..11..10
......111111111..1001..100..21..14..13..12..11..10
....1111111111..1010..101..22..20..14..13..12..11..10
..11111111111..1011..102..23..21..15..14..13..12..11..10
111111111111..1100..110..30..22..20..15..14..13..12..11..10,
and the triangle of sums of digits starts:
......................1
.....................2...1
......... ..........3...2...1
...................4...1...2...1
..................5...2...3...2...1
.................6...2...2...3...2...1
................7...3...3...4...3...2...1
...............8...1...4...2...4...3...2...1
..............9...2...1...3...5...4...3...2...1
............10...2...2...4...2...5...4...3...2...1
...........11...3...3...5...3...6...5...4...3...2...1
..........12...2...2...3...4...2...6...5...4...3...2...1.
		

Crossrefs

Cf. A007953. See A240236 for another version.
Cf. A002260.

Programs

  • Haskell
    a138530 n k = a138530_tabl !! (n-1) !! (k-1)
    a138530_row n = a138530_tabl !! (n-1)
    a138530_tabl = zipWith (map . flip q) [1..] a002260_tabl where
       q 1 n = n
       q b n = if n < b then n else q b n' + d where (n', d) = divMod n b
    -- Reinhard Zumkeller, Apr 29 2015
  • Mathematica
    T[n_, k_] := If[k == 1, n, Total[IntegerDigits[n, k]]];
    Table[T[n, k], {n, 1, 14}, {k, 1, n}] // Flatten (* Jean-François Alcover, Oct 25 2021 *)

A010067 Base 6 self or Colombian numbers (not of form k + sum of base 6 digits of k).

Original entry on oeis.org

1, 3, 5, 12, 19, 26, 33, 40, 42, 49, 56, 63, 70, 77, 79, 86, 93, 100, 107, 114, 116, 123, 130, 137, 144, 151, 153, 160, 167, 174, 181, 188, 190, 197, 204, 211, 218, 229, 236, 243, 250, 257, 259, 266, 273, 280, 287, 294, 296, 303, 310, 317, 324, 331, 333, 340, 347
Offset: 1

Views

Author

Keywords

References

  • Steven R. Finch, Mathematical Constants, Cambridge, 2003, Section 2.24, pp. 179-180.
  • József Sándor and Borislav Crstici, Handbook of Number theory II, Kluwer Academic Publishers, 2004, Chapter 4, p. 384-386.

Crossrefs

Programs

  • Mathematica
    s[n_] := n + Plus @@ IntegerDigits[n, 6]; m = 350; Complement[Range[m], Array[s, m]] (* Amiram Eldar, Nov 28 2020 *)

Extensions

More terms from Amiram Eldar, Nov 28 2020

A054895 a(n) = Sum_{k>0} floor(n/6^k).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 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, 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, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 16, 16, 16
Offset: 0

Views

Author

Henry Bottomley, May 23 2000

Keywords

Comments

Different from the highest power of 6 dividing n! (cf. A054861). - Hieronymus Fischer, Aug 14 2007
Partial sums of A122841. - Hieronymus Fischer, Jun 06 2012

Examples

			  a(10^0) = 0.
  a(10^1) = 1.
  a(10^2) = 18.
  a(10^3) = 197.
  a(10^4) = 1997.
  a(10^5) = 19996.
  a(10^6) = 199995.
  a(10^7) = 1999995.
  a(10^8) = 19999994.
  a(10^9) = 199999993.
		

Crossrefs

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

Programs

  • Haskell
    a054895 n = a054895_list !! n
    a054895_list = scanl (+) 0 a122841_list
    -- Reinhard Zumkeller, Nov 10 2013
    
  • Magma
    function A054895(n)
      if n eq 0 then return n;
      else return A054895(Floor(n/6)) + Floor(n/6);
      end if; return A054895;
    end function;
    [A054895(n): n in [0..100]]; // G. C. Greubel, Feb 09 2023
    
  • Mathematica
    Table[t=0; p=6; While[s=Floor[n/p]; t=t+s; s>0, p *= 6]; t, {n,0,100}]
  • SageMath
    def A054895(n):
        if (n==0): return 0
        else: return A054895(n//6) + (n//6)
    [A054895(n) for n in range(104)] # G. C. Greubel, Feb 09 2023

Formula

a(n) = floor(n/6) + floor(n/36) + floor(n/216) + floor(n/1296) + ...
a(n) = (n - A053827(n))/5.
From Hieronymus Fischer, Aug 14 2007: (Start)
a(n) = a(floor(n/6)) + floor(n/6).
a(6*n) = n + a(n).
a(n*6^m) = n*(6^m-1)/5 + a(n).
a(k*6^m) = k*(6^m-1)/5, for 0 <= k < 6, m >= 0.
Asymptotic behavior:
a(n) = (n/5) + O(log(n)).
a(n+1) - a(n) = O(log(n)); this follows from the inequalities below.
a(n) <= (n-1)/5; equality holds for powers of 6.
a(n) >= ((n-5)/5) - floor(log_6(n)); equality holds for n=6^m-1, m>0.
lim inf (n/5 - a(n)) = 1/5, for n-->oo.
lim sup (n/5 - log_6(n) - a(n)) = 0, for n-->oo.
lim sup (a(n+1) - a(n) - log_6(n)) = 0, for n-->oo.
G.f.: (1/(1-x))*Sum_{k > 0} x^(6^k)/(1-x^(6^k)). (End)

Extensions

An incorrect formula was deleted by N. J. A. Sloane, Nov 18 2008
Examples added by Hieronymus Fischer, Jun 06 2012

A053831 Sum of digits of n written in base 11.

Original entry on oeis.org

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

Examples

			a(20) = 1 + 9 = 10 because 20 is written as 19 base 11.
		

Crossrefs

Sum of digits of n written in bases 2-16: A000120, A053735, A053737, A053824, A053827, A053828, A053829, A053830, A007953, this sequence, A053832, A053833, A053834, A053835, A053836.

Programs

  • C
    int Base11DigitSum(int n) {
       int count = 0;
       while (n != 0) { count += n % 11; n = n / 11; }
       return count;
    } // Tanar Ulric, Oct 20 2021
  • Mathematica
    Table[Plus @@ IntegerDigits[n, 11], {n, 0, 86}] (* or *)
    Nest[ Flatten[ #1 /. a_Integer -> Table[a + i, {i, 0, 10}]] &, {0}, 2] (* Robert G. Wilson v, Jul 27 2006 *)
  • PARI
    a(n)=if(n<1,0,if(n%11,a(n-1)+1,a(n/11)))
    
  • PARI
    a(n)=sumdigits(n,11) \\ Charles R Greathouse IV, Oct 20 2021
    

Formula

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

A346690 Replace 6^k with (-1)^k in base-6 expansion of n.

Original entry on oeis.org

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

Views

Author

Ilya Gutkovskiy, Jul 29 2021

Keywords

Comments

If n has base-6 expansion abc..xyz with least significant digit z, a(n) = z - y + x - w + ...

Examples

			59 = 135_6, 5 - 3 + 1 = 3, so a(59) = 3.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) option remember; (n mod 6) - procname(floor(n/6)) end proc:
    f(0):= 0:
    map(f, [$1..100]); # Robert Israel, Nov 21 2022
  • Mathematica
    nmax = 104; A[] = 0; Do[A[x] = x (1 + 2 x + 3 x^2 + 4 x^3 + 5 x^4)/(1 - x^6) - (1 + x + x^2 + x^3 + x^4 + x^5) A[x^6] + O[x]^(nmax + 1) // Normal, nmax + 1]; CoefficientList[A[x], x]
    Table[n + 7 Sum[(-1)^k Floor[n/6^k], {k, 1, Floor[Log[6, n]]}], {n, 0, 104}]
  • PARI
    a(n) = subst(Pol(digits(n, 6)), 'x, -1); \\ Michel Marcus, Nov 22 2022
  • Python
    from sympy.ntheory.digits import digits
    def a(n):
        return sum(bi*(-1)**k for k, bi in enumerate(digits(n, 6)[1:][::-1]))
    print([a(n) for n in range(105)]) # Michael S. Branicky, Jul 29 2021
    

Formula

G.f. A(x) satisfies: A(x) = x * (1 + 2*x + 3*x^2 + 4*x^3 + 5*x^4) / (1 - x^6) - (1 + x + x^2 + x^3 + x^4 + x^5) * A(x^6).
a(n) = n + 7 * Sum_{k>=1} (-1)^k * floor(n/6^k).
a(6*n+j) = j - a(n) for 0 <= j <= 5. - Robert Israel, Nov 21 2022

A173525 a(n) = 1 + A053824(n-1), where A053824 = sum of digits in base 5.

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Feb 20 2010

Keywords

Comments

Also: a(n) = A053824(5^k+n-1) in the limit k->infinity, where k plays the role of a row index in A053824. (See the comment by M. F. Hasler for the proof.)
This means: if A053824 is regarded as a triangle then the rows converge to this sequence.
See conjecture in the entry A000120, and the case of base 2 in A063787.
From R. J. Mathar, Dec 09 2010: (Start)
In base b=5, A053824 starts counting up from 1 each time the index wraps around a power of b: A053824(b^k)=1.
Obvious recurrences are A053824(m*b^k+i) = m+A053824(i), 1 <= m < b-1, 0 <= i < b^(k-1).
So A053824 can be decomposed into a triangle T(k,n) = A053824(b^k+n-1), assuming that column indices start at n=1; row lengths are (b-1)*b^k.
There is a self-similarity in these sequences; a sawtooth structure of periodicity b is added algebraically on top of a sawtooth structure of periodicity b^2, on top of a periodicity b^3 etc. This leads to some "fake" finitely periodic substructures in the early parts of each row of T(.,.): often, but not always, a(n+b)=1+a(n). Often, but not always, a(n+b^2)=1+a(n) etc.
The common part of the rows T(.,.) grows with the power of b as shown in the recurrence above, and defines a(n) in the limit of large row indices k. (End)
The two definitions agree because the first 5^r terms in each row correspond to numbers 5^r, 5^r+1,...,5^r+(5^r-1), which are written in base 5 as a leading 1 plus the digits of 0,...,5^r-1. - M. F. Hasler, Dec 09 2010
From Omar E. Pol, Dec 10 2010: (Start)
In the scatter plots of these sequences, the basic structure is an element with b^2 points, where b is the associated base. (Scatter plots are created with the "graph" button of a sequence.) Sketches of these structures look as follows, the horizontal axis a squeezed version of the index n, b consecutive points packed vertically, and the vertical axis a(n):
........................................................
................................................ * .....
............................................... ** .....
..................................... * ...... *** .....
.................................... ** ..... **** .....
.......................... * ...... *** .... ***** .....
......................... ** ..... **** ... ****** .....
............... * ...... *** .... ***** ... ***** ......
.............. ** ..... **** .... **** .... **** .......
.... * ...... *** ..... *** ..... *** ..... *** ........
... ** ...... ** ...... ** ...... ** ...... ** .........
... * ....... * ....... * ....... * ....... * ..........
........................................................
... b=2 ..... b=3 ..... b=4 ..... b=5 ..... b=6 ........
........................................................
............................................. * ........
............................................ ** ........
........................... * ............. *** ........
.......................... ** ............ **** ........
........... *............ *** ........... ***** ........
.......... ** .......... **** .......... ****** ........
......... ***.......... ***** ......... ******* ........
........ **** ........ ****** ........ ******** ........
....... ***** ....... ******* ....... ********* ........
...... ****** ...... ******** ....... ******** .........
..... ******* ...... ******* ........ ******* ..........
..... ****** ....... ****** ......... ****** ...........
..... ***** ........ ***** .......... ***** ............
..... **** ......... **** ........... **** .............
..... *** .......... *** ............ *** ..............
..... ** ........... ** ............. ** ...............
..... * ............ * .............. * ................
........................................................
..... b=7 .......... b=8 ............ b=9 ..............
... A053828 ...... A053829 ........ A053830 ............
... A173527 ...... A173528 ........ A173529 ............(End)

Crossrefs

Programs

  • Haskell
    a173525 = (+ 1) . a053824 . (subtract 1) -- Reinhard Zumkeller, Jan 31 2014
  • Maple
    A053825 := proc(n) add(d, d=convert(n,base,5)) ; end proc:
    A173525 := proc(n) local b,k; b := 5 ; if n < b then n; else k := n/(b-1);   k := ceil(log(k)/log(b)) ; A053825(b^k+n-1) ; end if; end proc:
    seq(A173525(n),n=1..100) ;
  • Mathematica
    Total[IntegerDigits[#,5]]+1&/@Range[0,100] (* Harvey P. Dale, Jun 14 2015 *)
  • PARI
    A173525(n)={ my(s=1); n--; until(!n\=5, s+=n%5); s } \\ M. F. Hasler, Dec 09 2010
    
  • PARI
    A173525(n)={ my(s=1+(n=divrem(n-1,5))[2]); while((n=divrem(n[1],5))[1],s+=n[2]); s+n[2] } \\ M. F. Hasler, Dec 09 2010
    

Formula

a(n) = A053824(5^k + n - 1) where k >= ceiling(log_5(n/4)). - R. J. Mathar, Dec 09 2010

Extensions

More terms from Vincenzo Librandi, Aug 02 2010

A216789 Table read by antidiagonals: T(n,k) is the digital sum of k in base n displayed in decimal.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

T(n,k) is the least number of powers of n that add up to k. - Mohammed Yaseen, Nov 12 2022

Examples

			A000120   0, 1, 1, 2, 1, 2, 2, 3, 1, 2,  2,  3,  2,  3,  3,  4, 1, 2, 2
A053735   0, 1, 2, 1, 2, 3, 2, 3, 4, 1,  2,  3,  2,  3,  4,  3, 4, 5, 2
A053737   0, 1, 2, 3, 1, 2, 3, 4, 2, 3,  4,  5,  3,  4,  5,  6, 1, 2, 3
A053824   0, 1, 2, 3, 4, 1, 2, 3, 4, 5,  2,  3,  4,  5,  6,  3, 4, 5, 6
A053827   0, 1, 2, 3, 4, 5, 1, 2, 3, 4,  5,  6,  2,  3,  4,  5, 6, 7, 3
A053828   0, 1, 2, 3, 4, 5, 6, 1, 2, 3,  4,  5,  6,  7,  2,  3, 4, 5, 6
A053829   0, 1, 2, 3, 4, 5, 6, 7, 1, 2,  3,  4,  5,  6,  7,  8, 2, 3, 4
A053830   0, 1, 2, 3, 4, 5, 6, 7, 8, 1,  2,  3,  4,  5,  6,  7, 8, 9, 2
A007953   0, 1, 2, 3, 4, 5, 6, 7, 8, 9,  1,  2,  3,  4,  5,  6, 7, 8, 9
A053831   0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,  1,  2,  3,  4,  5, 6, 7, 8
A053832   0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,  1,  2,  3,  4, 5, 6, 7
A053833   0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,  1,  2,  3, 4, 5, 6
A053834   0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,  1,  2, 3, 4, 5
A053835   0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,  1, 2, 3, 4
A053836   0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 1, 2, 3
		

Crossrefs

Programs

  • Maple
    [seq(seq(convert(convert(n-b,base,b),`+`),b=n..2,-1),n=1..15)]; # Robert Israel, Aug 02 2020
  • Mathematica
    DigitSum[n_, b_: 10] := Total[IntegerDigits[n, b]]; Table[ DigitSum[n - b, b], {n, 2, 13}, {b, n, 2, -1}] // Flatten

Extensions

Name and offset corrected by Mohammed Yaseen, Nov 12 2022

A309957 Product of digits of (n written in base 6).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 2, 4, 6, 8, 10, 0, 3, 6, 9, 12, 15, 0, 4, 8, 12, 16, 20, 0, 5, 10, 15, 20, 25, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 0, 2, 4, 6, 8, 10, 0, 3, 6, 9, 12, 15, 0, 4, 8, 12, 16, 20, 0, 5, 10, 15, 20, 25, 0, 0, 0, 0, 0, 0, 0, 2, 4, 6, 8, 10, 0, 4, 8, 12, 16, 20, 0, 6, 12, 18, 24, 30, 0, 8, 16, 24, 32
Offset: 0

Views

Author

Ilya Gutkovskiy, Aug 24 2019

Keywords

Crossrefs

Programs

  • Magma
    [0] cat [&*Intseq(n,6):n in [1..100]]; // Marius A. Burtea, Aug 25 2019
  • Maple
    seq(convert(convert(n,base,6),`*`),n=0..100); # Robert Israel, Aug 24 2019
  • Mathematica
    Table[Times @@ IntegerDigits[n, 6], {n, 0, 100}]

Formula

G.f. A(x) satisfies: A(x) = x * (1 + 2*x + 3*x^2 + 4*x^3 + 5*x^4) * (1 + A(x^6)).

A239692 Base 6 sum of digits of prime(n).

Original entry on oeis.org

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

Views

Author

Tom Edgar, Mar 24 2014

Keywords

Comments

a(n) is the rank of prime(n) in the base-6 dominance order on the natural numbers.

Examples

			The sixth prime is 13, 13 in base 6 is (2,1) so a(6)=2+1=3.
		

Crossrefs

Programs

  • Magma
    [&+Intseq(NthPrime(n),6): n in [1..100]]; // Vincenzo Librandi, Mar 25 2014
    
  • Mathematica
    Table[Plus @@ IntegerDigits[Prime[n], 6], {n, 1, 100}] (* Vincenzo Librandi, Mar 25 2014 *)
  • PARI
    a(n) = sumdigits(prime(n), 6); \\ Michel Marcus, Mar 04 2023
  • Sage
    [sum(i.digits(base=6)) for i in primes_first_n(200)]
    

Formula

a(n) = A053827(A000040(n)).

A053841 (Sum of digits of n written in base 6) modulo 6.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 0, 2, 3, 4, 5, 0, 1, 3, 4, 5, 0, 1, 2, 4, 5, 0, 1, 2, 3, 5, 0, 1, 2, 3, 4, 1, 2, 3, 4, 5, 0, 2, 3, 4, 5, 0, 1, 3, 4, 5, 0, 1, 2, 4, 5, 0, 1, 2, 3, 5, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 5, 2, 3, 4, 5, 0, 1, 3, 4, 5, 0, 1, 2, 4, 5, 0, 1, 2, 3, 5, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 5, 1, 2, 3
Offset: 0

Views

Author

Henry Bottomley, Mar 28 2000

Keywords

Comments

a(n) is the fifth row of the array in A141803. - Andrey Zabolotskiy, May 18 2016

Crossrefs

Programs

  • Mathematica
    Mod[DigitSum[Range[0, 100], 6], 6] (* Paolo Xausa, Aug 09 2024 *)
  • PARI
    a(n) = vecsum(digits(n, 6)) % 6; \\ Michel Marcus, May 18 2016

Formula

a(n) = A010875(A053827(n)). - Andrey Zabolotskiy, May 18 2016
Previous Showing 11-20 of 25 results. Next