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

A007471 Sum of digits of n a(n) is n ( = A003634/n), or 0 if no such number exists.

Original entry on oeis.org

1, 9, 9, 3, 9, 9, 3, 9, 9, 1, 18, 9, 9, 9, 9, 9, 9, 9, 6, 9, 18, 6, 9, 9, 6, 9, 9, 4, 9, 9, 12, 18, 18, 3, 9, 9, 3, 9, 9, 3, 18, 18, 12, 18, 9, 5, 9, 9, 9, 9, 18, 6, 18, 18, 2, 9, 9, 9, 9, 9, 12, 0, 0, 5, 0, 18, 3, 9, 9, 3, 18, 18, 7, 27, 0, 12, 18
Offset: 1

Views

Author

Keywords

References

  • J. H. Conway, personal communication.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Extensions

Zeros inserted for consistency with A003634 by Sean A. Irvine, Jan 04 2018

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

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

Original entry on oeis.org

62, 63, 65, 75, 84, 95, 161, 173, 195, 216, 261, 266, 272, 276, 326, 371, 372, 377, 381, 383, 386, 387, 395, 411, 416, 422, 426, 431, 432, 438, 441, 443, 461, 466, 471, 476, 482, 483, 486, 488, 491, 492, 493, 494, 497, 498, 516, 521, 522, 527, 531, 533, 536
Offset: 1

Views

Author

Keywords

References

  • J. H. Conway, personal communication.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Maple
    For Maple code see A058906.
  • Mathematica
    nmax = 1000; Reap[ Do[k = n; kmax = 100*n; While[ Tr[ IntegerDigits[k]]*n != k && k < kmax, k = k + n]; If[k == kmax, Sow[n]], {n, 1, nmax}]][[2, 1]] (* Jean-François Alcover, Jul 12 2012 *)
  • Python
    from itertools import count, islice, combinations_with_replacement
    def A003635_gen(startvalue=1): # generator of terms >= startvalue
        for n in count(max(startvalue,1)):
            for l in count(1):
                if 9*l*n < 10**(l-1):
                    yield n
                    break
                for d in combinations_with_replacement(range(10),l):
                    if (s:=sum(d))>0 and sorted(str(s*n)) == [str(e) for e in d]:
                        break
                else:
                    continue
                break
    A003635_list = list(islice(A003635_gen(),20)) # 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

A072081 Numbers divisible by the square of the sum of their digits in base 10.

Original entry on oeis.org

1, 10, 20, 50, 81, 100, 112, 162, 200, 243, 324, 392, 400, 405, 500, 512, 605, 648, 810, 972, 1000, 1053, 1100, 1120, 1134, 1183, 1215, 1296, 1400, 1620, 1701, 1900, 1944, 2000, 2025, 2106, 2156, 2240, 2268, 2300, 2401, 2430, 2511, 2592, 2704, 2800, 2916
Offset: 1

Views

Author

Labos Elemer, Jun 14 2002

Keywords

Comments

If k is a term, then 10 * k is a term. There are an infinite number of terms that are not divisible by 10. The numbers m = 24 * 10^(42 * k - 40) +1, k >= 1, are divisible by 7^2 = digsum(m)^2. Also, the numbers s = 491 * 10^(42 * k - 8) + 3, k >= 1, are divisible by 17^2 = digsum(s)^2. - Marius A. Burtea, Mar 19 2020
The numbers 2^A095412(n), n >= 5, are terms. - Marius A. Burtea, Apr 02 2020

Examples

			k=9477, sumdigits(9477)=27, q=9477=27*27*13.
		

Crossrefs

Programs

  • Magma
    [k:k in [1..3000]| k mod &+Intseq(k)^2 eq 0]; // Marius A. Burtea, Mar 19 2020
    
  • Mathematica
    sud[x_] := Apply[Plus, IntegerDigits[x]] Do[s=sud[n]^2; If[IntegerQ[n/s], Print[n]], {n, 1, 10000}]
    Select[Range[3000],Divisible[#,Total[IntegerDigits[#]]^2]&] (* Harvey P. Dale, May 04 2011 *)
  • PARI
    for(n=1,10^4,s=sumdigits(n);if(!(n%s^2),print1(n,", "))) \\ Derek Orr, Apr 29 2015
    
  • Python
    def ok(n): return n and n%sum(di for di in map(int, str(n)))**2 == 0
    print([k for k in range(3000) if ok(k)]) # Michael S. Branicky, Jan 10 2025

A056770 Smallest number that is n times the product of its digits or 0 if impossible.

Original entry on oeis.org

1, 36, 15, 384, 175, 12, 735, 128, 135, 0, 11, 1296, 624, 224, 0, 0, 816, 216, 1197, 0, 315, 132, 115, 0, 0, 0, 2916, 1176, 3915, 0, 93744, 0, 51975, 78962688, 0, 82944, 1184, 0, 0, 0, 31488, 0, 0, 77616, 77175, 4416, 0, 12288, 1715, 0, 612
Offset: 1

Views

Author

Robert G. Wilson v, Aug 16 2000

Keywords

Examples

			a(4) = 384 because 4*(product of digits of 384) = 4*96 = 384, and no number smaller than 384 has this property.
		

Crossrefs

Programs

  • Mathematica
    Do[k = n; If[Mod[n, 10] == 0, Print[0]; Continue[]]; While[Apply[Times, RealDigits[k][[1]]]*n != k, k += n]; Print[k], {n, 1, 14}]
  • Python
    from itertools import count, combinations_with_replacement
    from math import prod
    def A056770(n):
        if not n%10: return 0
        for l in count(1):
            if 9**l*n < 10**(l-1): return 0
            c = 10**l
            for d in combinations_with_replacement(range(1,10),l):
                if sorted(str(a:=prod(d)*n)) == list(str(e) for e in d):
                    c = min(c,a)
            if c < 10**l:
                return c # Chai Wah Wu, May 09 2023

Extensions

a(15) onwards from David W. Wilson, Jan 20 2016

A065879 a(n) is the smallest positive number that is n times the number of 1's in its binary expansion, or 0 if no such number exists.

Original entry on oeis.org

1, 2, 6, 4, 10, 12, 21, 8, 18, 20, 55, 24, 0, 42, 60, 16, 34, 36, 0, 40, 126, 110, 69, 48, 0, 0, 81, 84, 116, 120, 155, 32, 66, 68, 0, 72, 185, 0, 156, 80, 205, 252, 172, 220, 180, 138, 0, 96, 0, 0, 204, 0, 212, 162, 0, 168, 228, 232, 295, 240, 366, 310, 378, 64, 130
Offset: 1

Views

Author

Henry Bottomley, Nov 26 2001

Keywords

Comments

a(n) is bounded above by n*A272756(n), so a program only has to check values up to that point to see if a(n) is zero. - Peter Kagey, May 05 2016

Examples

			a(23) is 69 since 69 is written in binary as 1000101, 69/(1+0+0+0+1+0+1)=23 and there is no smaller possibility (neither 23 nor 46 are divisible by their number of binary 1's).
		

Crossrefs

A003634 is the base-10 equivalent.

Programs

  • Mathematica
    Table[SelectFirst[Range[2^12], # == n First@ DigitCount[#, 2] &] /. k_ /; MissingQ@ k -> 0, {n, 80}] (* Michael De Vlieger, May 05 2016, Version 10.2 *)

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

A072083 Numbers divisible by the 4th power of the sum of their digits in base 10.

Original entry on oeis.org

1, 10, 100, 1000, 2000, 2401, 5000, 10000, 13122, 20000, 24010, 50000, 100000, 110000, 131220, 140000, 190000, 200000, 230000, 234256, 240100, 280000, 320000, 370000, 390625, 400221, 410000, 460000, 500000, 512000, 550000, 614656, 640000
Offset: 1

Views

Author

Labos Elemer, Jun 14 2002

Keywords

Comments

If k is a term, then 10*k is a term. There are an infinite number of terms that are not divisible by 10. The numbers m = 24 * 10^(294*k - 292) + 1, k = 7*a - 6, a >= 1, are divisible by 7^4 = digsum(m)^4. Also, the numbers s = 491 * 10^(4624*k - 4623) + 3, k = 17*u - 11, u >= 1, are divisible by 17^4 = digsum(s)^4. - Marius A. Burtea, Mar 19 2020
The numbers 2^A095412(n), n >= 6, are terms. - Marius A. Burtea, Apr 02 2020

Examples

			k=614656: sumdigits(614656)=28, q=1, since k=28*28*28*28.
		

Crossrefs

Programs

  • Magma
    [k:k in [1..640000]| k mod &+Intseq(k)^4 eq 0]; // Marius A. Burtea, Mar 19 2020
    
  • Mathematica
    sud[x_] := Apply[Plus, IntegerDigits[x]] Do[s=sud[n]^4; If[IntegerQ[n/s], Print[n]], {n, 1, 10000}]
    Select[Range[700000],Divisible[#,Total[IntegerDigits[ #]]^4]&] (* Harvey P. Dale, Jun 28 2011 *)
  • PARI
    isok(m) = (m % sumdigits(m)^4) == 0; \\ Michel Marcus, Apr 02 2020
Showing 1-10 of 11 results. Next