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 10 results.

A277223 a(n) = A052489(n)/n.

Original entry on oeis.org

9, 9, 9, 12, 9, 9, 12, 9, 9, 9, 18, 9, 15, 9, 9, 18, 9, 9, 21, 9, 18, 18, 9, 9, 15, 18, 18, 21, 9, 9, 18, 18, 18, 12, 9, 18, 27, 18, 9, 12, 18, 18, 18, 18, 9, 21, 18, 18, 18, 9, 18, 18, 18, 18, 18, 9, 9, 15, 9, 9, 18, 0, 0, 17, 0, 18, 12, 9, 9, 12, 18, 18, 26, 27, 0
Offset: 1

Views

Author

Michel Marcus, Oct 06 2016

Keywords

Comments

a(n) is the largest multiplier k such that m = k*n is n times the sum of its decimal digits.
a(n) is never 1, 2, 3, 4, 5 or 6. Conjecture: if a(n) < 12 then a(n) = 0 or 9. - Robert Israel, Oct 06 2016

Examples

			a(2)=9 because m=2*9=18 is the largest m that is twice the sum of its decimal digits.
a(4)=12 because m=4*12=48 is the largest m that is four times the sum of its decimal digits.
		

Crossrefs

Programs

  • Maple
    N:= 200: # to get a(1) .. a(N)
    A:= Vector(N):
    for t from 1 while 9*(1+ilog10(t))*N >= t do
       k:= convert(convert(t,base,10),`+`);
       if t mod k = 0 and t <= N*k then
          A[t/k]:= max(A[t/k],k)
       fi
    od:
    convert(A,list); # Robert Israel, Oct 06 2016
  • Mathematica
    Table[Last[Select[Range[10^(IntegerLength@ n + 2)], n Total@ IntegerDigits@ # == # &] /. {} -> {0}]/n, {n, 75}] (* Michael De Vlieger, Oct 06 2016 *)
  • 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/n));); 0;}

Formula

a(n) = 0 for n in A003635.
a(n) = A007953(A052489(n)). - Altug Alkan, Oct 06 2016

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

A065880 Largest 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

0, 1, 2, 6, 4, 10, 12, 21, 8, 18, 20, 55, 24, 0, 42, 60, 16, 34, 36, 0, 40, 126, 110, 115, 48, 0, 0, 108, 84, 116, 120, 155, 32, 66, 68, 0, 72, 222, 0, 156, 80, 246, 252, 172, 220, 180, 230, 0, 96, 0, 0, 204, 0, 318, 216, 0, 168, 285, 232, 295, 240, 366, 310, 378, 64, 130
Offset: 0

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)=115 since 115 is written in binary as 1110011 and 115/(1+1+1+0+0+1+1)=23 and there is no higher possibility (if k is more than 127 then k divided by its number of binary 1's is more than 26).
		

Crossrefs

A052489 is the base 10 equivalent.

Programs

  • Mathematica
    Table[SelectFirst[Reverse@ Range@ #, First@ DigitCount[#, 2] == #/n &] &[n SelectFirst[Range[2^12], # > IntegerLength[n #, 2] &]], {n, 80}] /. k_ /; MissingQ@ k -> 0 (* 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

A138770 Triangle read by rows: T(n,k) is the number of permutations of {1,2,...,n} such that there are exactly k entries between the entries 1 and 2 (n>=2, 0<=k<=n-2).

Original entry on oeis.org

2, 4, 2, 12, 8, 4, 48, 36, 24, 12, 240, 192, 144, 96, 48, 1440, 1200, 960, 720, 480, 240, 10080, 8640, 7200, 5760, 4320, 2880, 1440, 80640, 70560, 60480, 50400, 40320, 30240, 20160, 10080, 725760, 645120, 564480, 483840, 403200, 322560, 241920, 161280, 80640
Offset: 2

Views

Author

Emeric Deutsch, Apr 06 2008

Keywords

Comments

Sum of row n = n! = A000142(n).
The expected value of k is (n-2)/3. [Geoffrey Critzer, Dec 19 2009]

Examples

			T(4,2)=4 because we have 1342, 1432, 2341 and 2431.
Triangle starts:
  2;
  4,2;
  12,8,4;
  48,36,24,12;
  240,192,144,96,48;
  ...
		

Crossrefs

Programs

  • Maple
    T:=proc(n,k) if n-2 < k then 0 else (2*n-2*k-2)*factorial(n-2) end if end proc; for n from 2 to 10 do seq(T(n, k),k=0..n-2) end do; # yields sequence in triangular form
  • Mathematica
    Table[Table[2 (n - r) (n - 2)!, {r, 1, n - 1}], {n, 1, 10}] // Grid (* Geoffrey Critzer, Dec 19 2009 *)

Formula

T(n,k) = 2*(n-k-1)*(n-2)!.
T(n,0) = 2(n-1)! = A052849(n-1).
T(n,1) = A052582(n-2).
T(n,2) = A052609(n-2).
T(n,3) = 12*A005990(n-3).
T(n,4) = 48*A061206(n-5).
T(n,n-2) = 2(n-2)! (A052849).
Sum_{k=0..n-2} k*T(n,k) = n!*(n-2)/3 = A090672(n-1).

A277249 Largest number that is n times sum of its digits when written in base 3.

Original entry on oeis.org

0, 2, 8, 6, 16, 25, 24, 35, 32, 18, 80, 77, 48, 78, 56, 75, 64, 0, 72, 152, 160, 105, 132, 115, 96, 150, 156, 54, 224, 232, 240, 186, 0, 231, 204, 210, 144, 296, 228, 234, 320, 287, 168, 172, 0, 225, 368, 376, 192, 392, 400, 0, 312, 371, 216, 440, 448, 456
Offset: 0

Views

Author

Daniel Mondot, Oct 06 2016

Keywords

Crossrefs

Formula

a(n) = 0 for n in A058899. - Michel Marcus, Oct 09 2016

A277250 Largest number that is n times sum of its digits when written in base 4.

Original entry on oeis.org

0, 3, 6, 9, 12, 30, 18, 63, 24, 54, 60, 33, 36, 91, 126, 90, 48, 102, 108, 190, 120, 189, 154, 207, 72, 250, 234, 243, 252, 0, 180, 248, 96, 198, 204, 315, 216, 148, 228, 351, 240, 0, 378, 430, 132, 270, 506, 423, 144, 490, 300, 459, 364, 477, 486, 440, 504
Offset: 0

Views

Author

Daniel Mondot, Oct 06 2016

Keywords

Crossrefs

Formula

a(n) = 0 for n in A058900. - Michel Marcus, Oct 09 2016

A277291 Largest number that is n times sum of its digits when written in base 5.

Original entry on oeis.org

0, 4, 8, 24, 16, 20, 48, 42, 64, 99, 40, 88, 96, 117, 112, 120, 0, 102, 144, 76, 80, 189, 0, 184, 192, 100, 208, 324, 0, 348, 240, 372, 128, 363, 272, 210, 288, 444, 304, 624, 320, 574, 336, 258, 352, 495, 0, 564, 384, 588, 200, 612, 416, 583, 432, 440, 0, 570
Offset: 0

Views

Author

Daniel Mondot, Oct 09 2016

Keywords

Crossrefs

Formula

a(n) = 0 for n in A058901. - Michel Marcus, Oct 09 2016
Showing 1-10 of 10 results.