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 21-30 of 38 results. Next

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

A239691 Base 5 sum of digits of prime(n).

Original entry on oeis.org

2, 3, 1, 3, 3, 5, 5, 7, 7, 5, 3, 5, 5, 7, 7, 5, 7, 5, 7, 7, 9, 7, 7, 9, 9, 5, 7, 7, 9, 9, 3, 3, 5, 7, 9, 3, 5, 7, 7, 9, 7, 5, 7, 9, 9, 11, 7, 11, 7, 9, 9, 11, 9, 3, 5, 7, 9, 7, 5, 5, 7, 9, 7, 7, 9, 9, 7, 9, 11, 13, 9, 11, 11, 13, 7, 7, 9, 9, 5, 9, 11, 9, 7, 9
Offset: 1

Views

Author

Tom Edgar, Mar 24 2014

Keywords

Comments

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

Examples

			The fifth prime is 11, 11 in base 5 is (2,1) so a(5)=2+1=3.
		

Crossrefs

Programs

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

Formula

a(n) = A053824(A000040(n)).

A309956 Product of digits of (n written in base 5).

Original entry on oeis.org

0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 2, 4, 6, 8, 0, 3, 6, 9, 12, 0, 4, 8, 12, 16, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 0, 2, 4, 6, 8, 0, 3, 6, 9, 12, 0, 4, 8, 12, 16, 0, 0, 0, 0, 0, 0, 2, 4, 6, 8, 0, 4, 8, 12, 16, 0, 6, 12, 18, 24, 0, 8, 16, 24, 32, 0, 0, 0, 0, 0, 0, 3, 6, 9, 12, 0, 6, 12, 18, 24, 0, 9, 18, 27, 36, 0, 12, 24, 36, 48, 0
Offset: 0

Views

Author

Ilya Gutkovskiy, Aug 24 2019

Keywords

Crossrefs

Programs

  • Magma
    [0] cat [&*Intseq(n,5):n in [1..100]]; // Marius A. Burtea, Aug 25 2019
  • Mathematica
    Table[Times @@ IntegerDigits[n, 5], {n, 0, 100}]
  • PARI
    a(n) = my(d = if (n, digits(n,5), [0])); vecprod(d); \\ Michel Marcus, Aug 25 2019
    

Formula

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

A194966 Interspersion fractally induced by A194965, a rectangular array, by antidiagonals.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 19, 20, 21, 17, 22, 25, 26, 27, 28, 23, 24, 29, 33, 34, 35, 36, 30, 31, 32, 37, 42, 43, 44, 45, 38, 39, 40, 41, 46, 52, 53, 54, 55, 47, 48, 49, 50, 51, 56, 63, 64, 65, 66, 57, 59, 60, 61, 62, 58, 67, 75, 76
Offset: 1

Views

Author

Clark Kimberling, Sep 07 2011

Keywords

Comments

See A194959 for a discussion of fractalization and the interspersion fractally induced by a sequence. Every pair of rows eventually intersperse. As a sequence, A194966 is a permutation of the positive integers, with inverse A194967.

Examples

			Northwest corner:
1...2...4...7...11..16
3...5...8...12..18..25
6...9...13..19..26..34
10..14..20..27..35..44
15..21..28..36..45..55
		

Crossrefs

Cf. A194959, A194965, A194967 (inverse).

Programs

  • Mathematica
    p[n_] := Floor[(n + 4)/5] + Mod[n - 1, 5]
    Table[p[n], {n, 1, 90}]  (* A053824(n+5), n>=0 *)
    g[1] = {1}; g[n_] := Insert[g[n - 1], n, p[n]]
    f[1] = g[1]; f[n_] := Join[f[n - 1], g[n]]
    f[20]   (* A194965 *)
    row[n_] := Position[f[30], n];
    u = TableForm[Table[row[n], {n, 1, 5}]]
    v[n_, k_] := Part[row[n], k];
    w = Flatten[Table[v[k, n - k + 1], {n, 1, 13},
    {k, 1, n}]]  (* A194966 *)
    q[n_] := Position[w, n]; Flatten[
    Table[q[n], {n, 1, 80}]]  (* A194967 *)

A053840 (Sum of digits of n written in base 5) modulo 5.

Original entry on oeis.org

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

Views

Author

Henry Bottomley, Mar 28 2000

Keywords

Comments

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

Crossrefs

Programs

  • Mathematica
    Mod[Total@ IntegerDigits[#, 5], 5] & /@ Range[0, 120] (* Michael De Vlieger, May 17 2016 *)
  • PARI
    a(n) = vecsum(digits(n,5)) % 5; \\ Michel Marcus, May 16 2016

Formula

a(n) = A010874(A053824(n)). - Andrey Zabolotskiy, May 18 2016

A183226 Sum of digits of (2^n) in base 5, also sum of digits of (10^n) in base 5.

Original entry on oeis.org

1, 2, 4, 4, 4, 4, 8, 4, 4, 8, 12, 12, 12, 12, 8, 12, 16, 20, 20, 20, 16, 12, 20, 24, 28, 20, 32, 32, 24, 32, 40, 40, 32, 24, 28, 32, 32, 40, 28, 36, 36, 40, 44, 40, 36, 40, 36, 44, 44, 44, 44, 48, 52, 52, 48, 56, 40, 56, 68, 60, 52, 52, 48, 60, 56, 64, 60, 48, 56, 60, 60, 64, 60, 60, 60, 64, 52, 48, 64, 68, 56, 80, 80
Offset: 0

Views

Author

Washington Bomfim, Jan 01 2011

Keywords

Comments

If i >= 2, a(n) mod 4 = 0. (Cf. A053824)

Examples

			a(9) = 8 because 10^9 = 4022000000000_5, and 2^9 = 512 = 4022_5.
		

Crossrefs

Programs

  • Maple
    a:= n-> add(i, i=convert (2^n, base, 5)):
    seq(a(n), n=0..82);  # Alois P. Heinz, Jan 06 2011
  • Mathematica
    Table[Plus@@IntegerDigits[2^n, 5], {n, 0, 49}] (* Either that one or this one *) Table[Plus@@IntegerDigits[10^n, 5], {n, 0, 49}] (* Alonso del Arte, Jan 06 2011 *)
  • PARI
    \\  L is the list of the N digits of 2^n in quinary.
         \\ L[1] = a_0 , ..., L[N] = a_(N-1).
    convert(n)={n=2^n; x=n; N=floor(log(n)/log(5))+1;
    L = listcreate(N);
    while(x, n=floor(n/5); r=x-5*n; listput(L, r); x=n; );
    L; N};
    for(n=0,100,convert(n);an=0;for(i=1,N,an+=L[i];); print1(an,", "));
    
  • PARI
    t(n) = if(n<1, 0, if(n%5, t(n-1)+1, t(n/5)));
    vector(200, n, n--; t(2^n)) \\ Altug Alkan, Oct 28 2015

A183227 a(n) is the base-5 digit sum of 10^n-1.

Original entry on oeis.org

0, 5, 11, 15, 19, 23, 31, 31, 35, 43, 51, 55, 59, 63, 63, 71, 79, 87, 91, 95, 95, 95, 107, 115, 123, 119, 135, 139, 135, 147, 159, 163, 159, 155, 163, 171, 175, 187, 179, 191, 195, 203, 211, 211, 211, 219, 219, 231, 235, 239
Offset: 0

Views

Author

Washington Bomfim, Jan 01 2011

Keywords

Examples

			a(9) = 43 because 10^9 - 1 is written as 4021444444444_5, and 2^9 - 1 = 511 is written as 4021_5.
		

Crossrefs

Programs

  • Maple
    A053824 := proc(n) add(d,d=convert(n,base,5)) ; end proc:
    A183227 := proc(n) A053824(10^n-1) ; end proc: # R. J. Mathar, Jan 09 2011
  • PARI
    \\L is a list of the N digits of 2^n - 1 in  quinary
    convert(n)={n = 2^n - 1; x=n; N=floor(log(n)/log(5))+1;
    L = listcreate(N);
    while(x, n=floor(n/5); r=x-5*n; listput(L, r); x=n; );
    L; N};
    print1("0, "); for(n = 1,100, convert(n); s = 0; for(i = 1, N, s += L[i];); print1(s+4*n, ", "));

Formula

a(n) = A053824(10^n-1) = 4*n + A053824(2^n-1).

A183228 a(n) is the base-5 digit sum of 10^n+1.

Original entry on oeis.org

2, 3, 5, 5, 5, 5, 9, 5, 5, 9, 13, 13, 13, 13, 9, 13, 17, 21, 21, 21, 17, 13, 21, 25, 29, 21, 33, 33, 25, 33, 41, 41, 33, 25, 29, 33, 33, 41, 29, 37, 37, 41, 45, 41, 37, 41, 37, 45, 45, 45, 45, 49, 53, 53, 49, 57, 41, 57, 69
Offset: 0

Views

Author

Washington Bomfim, Jan 02 2011

Keywords

Examples

			a(9) = 9 because 10^9 + 1 is written as 4022000000001_5, and 2^9 = 512 is written as 4022_5.
		

Crossrefs

Programs

  • Maple
    A053824 := proc(n) add(d,d=convert(n,base,5)) ; end proc:
    A183228 := proc(n) A053824(10^n+1) ; end proc: # R. J. Mathar, Jan 09 2011
  • Mathematica
    Table[Total[IntegerDigits[10^n+1,5]],{n,0,60}] (* Harvey P. Dale, Jun 10 2018 *)
  • PARI
    \\ L is the list of the N digits of 2^n in quinary.
    convert(n)={ n = 2^n; x = n; N = floor(log(n)/log(5))+1;
    L = listcreate(N);
    while(x, n=floor(n/5); r= x-5*n; listput(L, r); x = n; );
    L; N};
    for(n=0,100,convert(n); s=0;for(i=1,N, s+=L[i];); print1(s+1,", "));
    
  • PARI
    a(n) = sumdigits(10^n+1, 5); \\ Michel Marcus, Sep 20 2019

Formula

a(n) = A053824(10^n+1) = 1 + A053824(2^n).

Extensions

Formula corrected by Robert Israel, Sep 19 2019

A230865 a(n) = n + (sum of digits in base-5 representation of n).

Original entry on oeis.org

0, 2, 4, 6, 8, 6, 8, 10, 12, 14, 12, 14, 16, 18, 20, 18, 20, 22, 24, 26, 24, 26, 28, 30, 32, 26, 28, 30, 32, 34, 32, 34, 36, 38, 40, 38, 40, 42, 44, 46, 44, 46, 48, 50, 52, 50, 52, 54, 56, 58, 52, 54, 56, 58, 60, 58, 60, 62, 64, 66, 64, 66, 68, 70, 72, 70, 72, 74, 76, 78, 76, 78, 80, 82, 84, 78, 80, 82, 84, 86, 84
Offset: 0

Views

Author

N. J. A. Sloane, Nov 05 2013

Keywords

Comments

The image of this sequence is the set of nonnegative even numbers (A005843). Joshi (1973) proved that the sequence of base-q self numbers (analogous to A003052) is the sequence of odd numbers (A005408) for all odd q. - Amiram Eldar, Nov 28 2020

References

  • V. S. Joshi, Ph.D. dissertation, Gujarat Univ., Ahmedabad (India), October, 1973.
  • József Sándor and Borislav Crstici, Handbook of Number theory II, Kluwer Academic Publishers, 2004, Chapter 4, p. 384-386.

Crossrefs

Programs

  • Mathematica
    Table[n + Plus @@ IntegerDigits[n, 5], {n, 0, 100}] (* Amiram Eldar, Nov 28 2020 *)

Formula

a(n) = n + A053824(n). - Amiram Eldar, Nov 28 2020

A096289 Sum of digits of n in bases 2 and 5.

Original entry on oeis.org

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

Views

Author

Miklos Kristof, Peter Boros, Jun 24 2004

Keywords

Comments

Let n = Sum(c(k)*2^k), c(k) = 0,1, be the binary form of n, n = Sum(d(k)*5^k), d(k) = 0,1,2,3,4 the base 5 form; then a(n) = Sum(c(k)+d(k)).
a(n) mod 2 = doubled Thue-Morse sequence A095190.

Examples

			n=13: 13=1*2^3+1*2^2+1*2^0, 1+1+1=3, 13=2*5^1+3*5^0, 2+3=5, so a(13)=3+5=8.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Total[Flatten@ IntegerDigits[n, {2, 5}]]; Array[a, 100, 0] (* Amiram Eldar, Jul 28 2023 *)

Formula

a(n) = A000120(n) + A053824(n). - Amiram Eldar, Jul 28 2023
Previous Showing 21-30 of 38 results. Next