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

A135100 Numbers which divide their digital sumorial (see A131383).

Original entry on oeis.org

1, 3, 4, 15, 26, 2573, 17226, 19786, 22083, 58133, 67693, 223657, 376460, 464713, 497068, 2621204, 4553376, 6000136, 7671158, 13975944, 14074903, 52731198, 82594577
Offset: 1

Views

Author

Hieronymus Fischer, Dec 24 2007

Keywords

Examples

			a(5)=26, since 26 divides its digital sumorial, which is A131383(26)=182.
		

Crossrefs

Programs

  • PARI
    a=1;for(n=2,10^6,if(a%(n-1)==0,print1(n-1","));x=divisors(n);L=numdiv(n);a+=n; for(i=2,L-1,d=x[i];k=n;while(k%d==0,a-=d-1;k\=d))) \\ Robert Gerbicz, May 09 2008

Extensions

a(12)-a(15) from Robert Gerbicz, May 09 2008
a(16)-a(23) from Hieronymus Fischer, Jul 31 2008

A037123 a(n) = a(n-1) + sum of digits of n.

Original entry on oeis.org

0, 1, 3, 6, 10, 15, 21, 28, 36, 45, 46, 48, 51, 55, 60, 66, 73, 81, 90, 100, 102, 105, 109, 114, 120, 127, 135, 144, 154, 165, 168, 172, 177, 183, 190, 198, 207, 217, 228, 240, 244, 249, 255, 262, 270, 279, 289, 300, 312, 325, 330, 336, 343, 351, 360, 370, 381
Offset: 0

Views

Author

Vasiliy Danilov (danilovv(AT)usa.net), Jun 15 1998

Keywords

Comments

Sum of digits of A007908(n). - Franz Vrabec, Oct 22 2007
Also digital sum of A138793(n) for n > 0. - Bruno Berselli, May 27 2011
Sum of the digital sum of i for i from 0 to n. - N. J. A. Sloane, Nov 13 2013

References

  • N. Agronomof, Sobre una función numérica, Revista Mat. Hispano-Americana 1 (1926), 267-269.
  • Maurice d'Ocagne, Sur certaines sommations arithmétiques, J. Sciencias Mathematicas e Astronomicas 7 (1886), 117-128.

Crossrefs

Cf. also A074784, A231688, A231689.
Partial sums of A007953.

Programs

  • Magma
    [ n eq 0 select 0 else &+[&+Intseq(k): k in [0..n]]: n in [0..56] ];  // Bruno Berselli, May 27 2011
  • Maple
    # From N. J. A. Sloane, Nov 13 2013:
    digsum:=proc(n,B) local a; a := convert(n, base, B):
    add(a[i], i=1..nops(a)): end;
    f:=proc(n,k,B) global digsum; local i;
    add( digsum(i,B)^k,i=0..n); end;
    lprint([seq(digsum(n,10),n=0..100)]); # A007953
    lprint([seq(f(n,1,10),n=0..100)]); #A037123
    lprint([seq(f(n,2,10),n=0..100)]); #A074784
    lprint([seq(f(n,3,10),n=0..100)]); #A231688
    lprint([seq(f(n,4,10),n=0..100)]); #A231689
  • Mathematica
    Table[Plus@@Flatten[IntegerDigits[Range[n]]], {n, 0, 200}] (* Enrique Pérez Herrero, Oct 12 2015 *)
    a[0] = 0; a[n_] := a[n - 1] + Plus @@ IntegerDigits@ n; Array[a, 70, 0] (* Robert G. Wilson v, Jul 06 2018 *)
  • PARI
    a(n)=n*(n+1)/2-9*sum(k=1,n,sum(i=1,ceil(log(k)/log(10)),floor(k/10^i)))
    
  • PARI
    a(n)={n++;my(t,i,s);c=n;while(c!=0,i++;c\=10);for(j=1,i,d=(n\10^(i-j))%10;t+=(10^(i-j)*(s*d+binomial(d,2)+d*9*(i-j)/2));s+=d);t} \\ David A. Corneth, Aug 16 2013
    
  • Perl
    for $i (0..100){ @j = split "", $i; for (@j){ $sum += $; } print "$sum,"; } __END_ # gamo(AT)telecable.es
    

Formula

a(n) = Sum_{k=0..n} s(k) = Sum_{k=0..n} A007953(k), where s(k) denote the sum of the digits of k in decimal representation. Asymptotic expression: a(n-1) = Sum_{k=0..n-1} s(k) = 4.5*n*log_10(n) + O(n). - Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), Sep 07 2002
a(n) = n*(n+1)/2 - 9*Sum_{k=1..n} Sum_{i=1..ceiling(log_10(k))} floor(k/10^i). - Benoit Cloitre, Aug 28 2003
From Hieronymus Fischer, Jul 11 2007: (Start)
G.f.: Sum_{k>=1} ((x^k - x^(k+10^k) - 9x^(10^k))/(1-x^(10^k)))/(1-x)^2.
a(n) = (1/2)*((n+1)*(n - 18*Sum_{k>=1} floor(n/10^k)) + 9*Sum_{k>=1} (1 + floor(n/10^k))*floor(n/10^k)*10^k).
a(n) = (1/2)*((n+1)*(2*A007953(n)-n) + 9*Sum_{k>=1} (1+floor(n/10^k))*floor(n/10^k)*10^k). (End)
a(n) = A007953(A053064(n)). - Reinhard Zumkeller, Oct 10 2008
From Wojciech Raszka, Jun 14 2019: (Start)
a(10^k - 1) = 10*a(10^(k - 1) - 1) + 45*10^(k - 1) for k > 0.
a(n) = a(n mod m) + MSD*a(m - 1) + (MSD*(MSD - 1)/2)*m + MSD*((n mod m) + 1), where m = 10^(A055642(n) - 1), MSD = A000030(n). (End)

Extensions

More terms from Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), Sep 07 2002

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 *)

A131384 Product of the digital sums of n for all the bases 2 to n (a 'digital-sum factorial').

Original entry on oeis.org

1, 1, 2, 2, 12, 24, 216, 192, 720, 3840, 97200, 69120, 2721600, 14515200, 130636800, 30965760, 3810240000, 3762339840, 384072192000, 445906944000, 10184771520000, 123605404876800, 12674382336000000, 2542739757465600
Offset: 1

Views

Author

Hieronymus Fischer, Jul 05 2007

Keywords

Comments

Definition changed to run from bases 2 to n instead of 1 to n, in order to reflect the sequence numbers, correctly. - suggested by Michel Marcus and changed by the author, Jul 19 2013

Examples

			5 = 11111_1 = 101_2 = 12_3 = 11_4 = 10_5. Thus a(5) = ds_1(5)*ds_2(5)*ds_3(5)*ds_4(5)*ds_5(5) = 5*2*3*2*1 = 60. - _Michel Marcus_, Jul 15 2013
		

Crossrefs

Cf. A131383.

Programs

  • Mathematica
    Table[Times @@ Map[Total@ IntegerDigits[n, #] &, Range[2, n]], {n, 24}] (* Michael De Vlieger, Jan 03 2017 *)
  • PARI
    a(n) = prod(k=2, n, sumdigits(n,k)); \\ Michel Marcus, Jun 13 2022

Formula

a(n) = Product_{p=2..n} ds_p(n) where ds_p = digital sum base p.
a(n) = Product_{p=2..n} (n-(p-1)*Sum_{k>0} floor(n/p^k)).
[Both formulas corrected in accordance with the changed definition by the author; Jul 19 2013]
Showing 1-4 of 4 results.