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 20 results. Next

A057147 a(n) = n times sum of digits of n.

Original entry on oeis.org

0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 10, 22, 36, 52, 70, 90, 112, 136, 162, 190, 40, 63, 88, 115, 144, 175, 208, 243, 280, 319, 90, 124, 160, 198, 238, 280, 324, 370, 418, 468, 160, 205, 252, 301, 352, 405, 460, 517, 576, 637, 250, 306, 364, 424, 486, 550, 616
Offset: 0

Views

Author

N. J. A. Sloane, Sep 13 2000

Keywords

Comments

A056992(n) = A010888(a(n)). - Reinhard Zumkeller, Mar 19 2014

Crossrefs

Iterations: A047892 (start=2), A047912 (start=3), A047897 (start=5), A047898 (start=6), A047899 (start=7), A047900 (start=8), A047901 (start=9), A047902 (start=11).

Programs

  • Haskell
    a057147 n = a007953 n * n  -- Reinhard Zumkeller, Mar 19 2014
    
  • Maple
    for n from 0 to 150 do printf(`%d,`,n*add(convert(n, base, 10)[i], i=1..nops(convert(n,base, 10)))) od:
  • Mathematica
    Table[n*Total[IntegerDigits[n]], {n, 0, 100}]
  • PARI
    a(n) = n*sumdigits(n) \\ Franklin T. Adams-Watters, Aug 03 2014
    
  • Python
    [n*sum([int(d) for d in str(n)]) for n in range(10**5)] # Chai Wah Wu, Aug 05 2014

Formula

a(n) = n*A007953(n). - Michel Marcus, Aug 10 2014
G.f.: x * (d/dx) (1/(1 - x))*Sum_{k>=1} (x^k - x^(10^k+k) - 9*x^(10^k))/(1 - x^(10^k)). - Ilya Gutkovskiy, Mar 27 2018

Extensions

More terms from James Sellers and Larry Reeves (larryr(AT)acm.org), Sep 13 2000

A058898 Inconsummate numbers in base 2: no number is this multiple of the sum of its digits (in base 2).

Original entry on oeis.org

13, 19, 25, 26, 35, 38, 47, 49, 50, 52, 55, 67, 70, 76, 94, 95, 97, 98, 100, 103, 104, 109, 110, 115, 117, 131, 134, 140, 151, 152, 157, 159, 171, 175, 179, 183, 185, 187, 188, 190, 193, 194, 196, 199, 200, 203, 206, 208, 217, 218, 220, 227, 229
Offset: 1

Views

Author

N. J. A. Sloane, Jan 09 2001

Keywords

Comments

Equivalently, these are the natural numbers that cannot be written as the arithmetic mean of distinct powers of 2. - Brian Kell, Feb 28 2009

Crossrefs

Programs

  • Maple
    For Maple code see A058906.
  • Mathematica
    Do[k = n; While[ Apply[ Plus, IntegerDigits[k, 2] ]*n != k && k < 250n, k += n]; If[k == 250n, Print[n] ], {n, 1, 10^3} ]
  • Python
    from itertools import count, islice, combinations_with_replacement
    def A058898_gen(startvalue=1): # generator of terms >= startvalue
        for n in count(max(startvalue,1)):
            for l in count(1):
                if l*n < 1<0 and sorted(bin(s*n)[2:]) == [str(e) for e in d]:
                        break
                else:
                    continue
                break
    A058898_list = list(islice(A058898_gen(),20)) # Chai Wah Wu, May 09 2023

Formula

n such that A065413(n) = 0. - Brian Kell, Mar 01 2009

A052491 Smallest "inconsummate number" in base n: smallest number such that in base n, no number is this multiple of the sum of its digits.

Original entry on oeis.org

13, 17, 29, 16, 27, 30, 42, 46, 62, 68, 86, 92, 114, 122, 147, 154, 182, 192, 222, 232, 266, 278, 314, 326, 367, 380, 422, 436, 482, 498, 546, 562, 614, 632, 688, 704, 762, 782, 842, 862, 926, 948, 1014, 1036, 1107, 1130, 1202, 1226, 1302, 1328, 1406, 1432
Offset: 2

Views

Author

J. H. Conway, Dec 30 2000

Keywords

Examples

			a(10) = 62, from A003635.
		

Crossrefs

Programs

  • Mathematica
    Do[n = 1; While[k = n; While[ Apply[ Plus, IntegerDigits[k, b] ]*n != k && k < 100n, k += n ]; k != 100n, n++ ]; Print[n], {b, 2, 54} ]
  • Python
    from itertools import count, combinations_with_replacement
    from sympy.ntheory import digits
    def A052491(n):
        for k in count(1):
            for l in count(1):
                if (n-1)*l*k < n**(l-1):
                    return k
                for d in combinations_with_replacement(range(n),l):
                    if (s:=sum(d)) > 0 and sorted(digits(s*k,n)[1:]) == list(d):
                        break
                else:
                    continue
                break # Chai Wah Wu, May 09 2023

Extensions

Corrected and extended by David Radcliffe, Jan 08 2001
More terms from David W. Wilson, Jan 10 2001

A003634 Smallest positive integer that is n times its digit sum, or 0 if no such number exists.

Original entry on oeis.org

1, 18, 27, 12, 45, 54, 21, 72, 81, 10, 198, 108, 117, 126, 135, 144, 153, 162, 114, 180, 378, 132, 207, 216, 150, 234, 243, 112, 261, 270, 372, 576, 594, 102, 315, 324, 111, 342, 351, 120, 738, 756, 516, 792, 405, 230, 423, 432, 441, 450, 918, 312, 954, 972
Offset: 1

Views

Author

Keywords

Comments

a(n) = 0 for n = 62, 63, 65, ... (A003635). - Robert G. Wilson v, Aug 15 2000

Examples

			a(3) = 27 because no number less than 27 has a digit sum equal to 3 times the number.
		

References

  • J. H. Conway, personal communication.
  • Anthony Gardiner, Mathematical Puzzling, Dover Publications, Inc., Mineola, NY, 1987, Page 11.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Mathematica
    Do[k = n; While[Apply[Plus, RealDigits[k][[1]]]*n != k, k += n]; Print[k], {n, 1, 61}]
    With[{ll=Select[Table[{n,n/Total[IntegerDigits[n]]},{n,1000}],IntegerQ[ #[[2]]]&]},Table[Select[ll,#[[2]]==i&,1][[1,1]],{i,60}]] (* Harvey P. Dale, Mar 09 2012 *)
  • Python
    def sd(n): return sum(map(int, str(n)))
    def a(n):
      m = 1
      while m != n*sd(m): m += 1
      return m
    print([a(n) for n in range(1,62)]) # Michael S. Branicky, Jan 18 2021
    
  • Python
    from itertools import count, combinations_with_replacement
    def A003634(n):
        for l in count(1):
            if 9*l*n < 10**(l-1): return 0
            c = 10**l
            for d in combinations_with_replacement(range(10),l):
                if sorted(str(a:=sum(d)*n)) == [str(e) for e in d] and a>0:
                    c = min(c,a)
            if c < 10**l:
                return c # Chai Wah Wu, May 09 2023

A052489 Largest number that is n times sum of its decimal digits.

Original entry on oeis.org

0, 9, 18, 27, 48, 45, 54, 84, 72, 81, 90, 198, 108, 195, 126, 135, 288, 153, 162, 399, 180, 378, 396, 207, 216, 375, 468, 486, 588, 261, 270, 558, 576, 594, 408, 315, 648, 999, 684, 351, 480, 738, 756, 774, 792, 405, 966, 846, 864, 882, 450, 918, 936, 954
Offset: 0

Views

Author

Henry Bottomley, Mar 16 2000

Keywords

Comments

It is infinite, as pointed out by Dr. Geoffrey Landis: Clearly if you have one integer that is N times the sum of its decimal digits, then when you add a 0 to the end, you have an integer that is 10N times the sum of its decimal digits. - Jonathan Vos Post, Feb 06 2011
There are, however, positive n for which no positive number is n times the sum of its digits, in which case a(n) = 0, as for n = 62, 63, 65, 75, 84, ..., cf. A003635. - M. F. Hasler, Aug 24 2025

Crossrefs

Programs

  • Mathematica
    p[n_] := 10(Length[IntegerDigits[n]]+1); a[0]=0; a[n_] := Catch[For[k = p[n]*n, k >= 0, k--, If[k == n*Total[IntegerDigits[k]], If[k == 0, Print["a(", n, ") not found"]]; Throw[k]]]]; Table[a[n], {n, 0, 1000}]  (* Jean-François Alcover, Jul 19 2012 updated Oct 06 2016 after Daniel Mondot's observations *)
  • PARI
    a(n) = {nbd = 1; while (9*nbd*n > 10^nbd, nbd++); forstep(k=9*nbd*n, 1, -1, if (sumdigits(k)*n == k, return(k));); 0;} \\ Michel Marcus, Oct 05 2016

A058907 Inconsummate numbers in base 12: no number is this multiple of the sum of its digits (in base 12).

Original entry on oeis.org

86, 87, 88, 90, 99, 101, 102, 112, 113, 114, 125, 126, 138, 229, 235, 244, 245, 246, 256, 258, 269, 270, 282, 307, 373, 379, 385, 391, 392, 400, 402, 426, 451, 464, 530, 535, 536, 542, 543, 547, 548, 607, 608, 620, 667, 673, 674, 679, 680, 685
Offset: 1

Views

Author

N. J. A. Sloane, Jan 09 2001

Keywords

Crossrefs

Programs

  • Maple
    For Maple code see A058906.
  • Mathematica
    base=12; Do[k=n; While[Apply[Plus, IntegerDigits[k, base]] n!=k&&k<250n, k+=n]; If[k==250 n, Print[n]], {n, 1, 10^3}] (* Vincenzo Librandi, Sep 23 2017; after N. J. A. Sloane in A058906 *)
  • Python
    from itertools import count, islice, combinations_with_replacement
    from sympy.ntheory import digits
    def A058907_gen(startvalue=1): # generator of terms >= startvalue
        for n in count(max(startvalue,1)):
            for l in count(1):
                if 11*l*n < 12**(l-1):
                    yield n
                    break
                for d in combinations_with_replacement(range(12),l):
                    if (s:=sum(d)) > 0 and sorted(digits(s*n,12)[1:]) == list(d):
                        break
                else:
                    continue
                break
    A058907_list = list(islice(A058907_gen(),20)) # Chai Wah Wu, May 10 2023

A065877 Non-Niven (or non-Harshad) numbers: numbers which are not a multiple of the sum of their digits.

Original entry on oeis.org

11, 13, 14, 15, 16, 17, 19, 22, 23, 25, 26, 28, 29, 31, 32, 33, 34, 35, 37, 38, 39, 41, 43, 44, 46, 47, 49, 51, 52, 53, 55, 56, 57, 58, 59, 61, 62, 64, 65, 66, 67, 68, 69, 71, 73, 74, 75, 76, 77, 78, 79, 82, 83, 85, 86, 87, 88, 89, 91, 92, 93, 94, 95, 96, 97, 98, 99, 101
Offset: 1

Views

Author

Henry Bottomley, Nov 26 2001

Keywords

Comments

A188641(a(n)) = 0; A070635(a(n)) > 0. - Reinhard Zumkeller, Apr 07 2011

Examples

			13 is in the list because 13 is not a multiple of 1 + 3 = 4.
		

Crossrefs

Complement of A005349. Cf. A003635, A007953, A065878.
Cf. A188643.

Programs

  • Haskell
    import Data.List (findIndices)
    a065877 n = a065877_list !! (n-1)
    a065877_list = map succ $ findIndices (> 0) $ map a070635 [1..]
    -- Reinhard Zumkeller, Apr 07 2011
  • Mathematica
    Select[Range[101],!IntegerQ[#/Total[IntegerDigits[#]]] &] (* Jayanta Basu, May 05 2013 *)
  • PARI
    isok(k) = {(k % sumdigits(k)) != 0} \\ Harry J. Smith, Nov 03 2009
    

A058906 Inconsummate numbers in base 11: no number is this multiple of the sum of its digits (in base 11).

Original entry on oeis.org

68, 70, 79, 80, 82, 92, 104, 200, 202, 212, 214, 224, 225, 248, 260, 314, 320, 332, 380, 392, 452, 458, 464, 490, 502, 508, 512, 513, 514, 518, 520, 524, 530, 562, 568, 574, 578, 579, 580, 584, 585, 590, 592, 595, 598, 599, 622, 628, 634, 635
Offset: 1

Views

Author

N. J. A. Sloane, Jan 09 2001

Keywords

Crossrefs

Programs

  • Maple
    digitsum := proc (n,b) local i; add(i,i=convert(n,base,b)) end; b := 11:N := 43922; L := []: for n from 1 to N do k := digitsum(n,b): if (n mod k)=0 then L := [op(L), n/k] fi: od: M := []: for i from 1 to 1000 do if not(member(i,L)) then M := [op(M),i] fi od: lprint(M);
  • Mathematica
    base = 11; Do[k = n; While[ Apply[ Plus, IntegerDigits[k, base] ]*n != k && k < 250n, k += n]; If[k == 250n, Print[n] ], {n, 1, 10^3} ]
  • Python
    from itertools import count, islice, combinations_with_replacement
    from sympy.ntheory import digits
    def A058906_gen(startvalue=1): # generator of terms >= startvalue
        for n in count(max(startvalue,1)):
            for l in count(1):
                if 10*l*n < 11**(l-1):
                    yield n
                    break
                for d in combinations_with_replacement(range(11),l):
                    if (s:=sum(d)) > 0 and sorted(digits(s*n,11)[1:]) == list(d):
                        break
                else:
                    continue
                break
    A058906_list = list(islice(A058906_gen(),20)) # Chai Wah Wu, May 09 2023

A037478 Number of positive solutions to "numbers that are n times sum of their digits".

Original entry on oeis.org

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

Views

Author

Henry Bottomley, Sep 12 2000

Keywords

Comments

It appears that the largest terms occur when n=1 mod 9 and moderately large terms when n=4 or 7 mod 9.

Examples

			a(13)=3 since the only three solutions are 117=9*13, 156=12*13 and 195=15*13.
		

Crossrefs

Programs

  • Maple
    read("transforms"):
    A037478 := proc(n)
        local a,x,k;
        a := 0 ;
        for k from 1 do
            x := n*k ;
            if digsum(x)*n = x then
                a := a+1 ;
            end if;
            # may stop if x/digsum(x)>n, so if x/#digits(x) > 9*n
            if x/A055642(x) > 9*n then
                break;
            end if;
        end do:
        a ;
    end proc:
    seq(A037478(n),n=1..101) ; # R. J. Mathar, May 11 2016

A052490 Numbers n with only one nonzero solution to "numbers that are n times sum of their digits".

Original entry on oeis.org

2, 3, 5, 6, 8, 9, 11, 12, 14, 15, 17, 18, 20, 21, 23, 24, 29, 30, 32, 33, 35, 39, 41, 42, 44, 45, 50, 51, 53, 54, 56, 57, 59, 60, 66, 68, 69, 71, 72, 74, 77, 78, 80, 81, 83, 86, 87, 89, 90, 92, 93, 96, 98, 99, 101, 102, 104, 105, 108, 110, 111, 113, 114, 117, 119, 120, 122
Offset: 1

Views

Author

Henry Bottomley, Mar 16 2000

Keywords

Examples

			a(2)=3 since there is only one positive number which is three times the sum of its digits, namely 27=3*9
		

Crossrefs

Showing 1-10 of 20 results. Next