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

A062998 Numbers whose sum of digits is less than or equal to its product of digits.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 22, 23, 24, 25, 26, 27, 28, 29, 32, 33, 34, 35, 36, 37, 38, 39, 42, 43, 44, 45, 46, 47, 48, 49, 52, 53, 54, 55, 56, 57, 58, 59, 62, 63, 64, 65, 66, 67, 68, 69, 72, 73, 74, 75, 76, 77, 78, 79, 82, 83, 84, 85, 86, 87, 88, 89, 92, 93, 94, 95, 96, 97, 98, 99, 123, 124, 125, 126, 127, 128, 129, 132, 133, 134, 135
Offset: 1

Views

Author

Henry Bottomley, Jun 29 2001

Keywords

Crossrefs

Not the same as A037344 (contains 124).

Programs

  • Maple
    isA062998 := proc(n)
            local dgs,s,p ;
            dgs := convert(n,base,10) ;
            s := add(i,i=dgs) ;
            p := mul(i,i=dgs) ;
            if s <= p then
                    true;
            else
                    false;
            end if;
    end proc:
    for n from 2 to 150 do
            if isA062998(n) then
                    printf("%d,",n) ;
            end if;
    end do:   # R. J. Mathar, Aug 14 2025
  • Mathematica
    Select[Range[100],Total[IntegerDigits[#]]<=Times@@IntegerDigits[#]&] (* Harvey P. Dale, Feb 21 2017 *)
  • PARI
    isok(k)={my(d=digits(k)); vecsum(d) <= vecprod(d)} \\ Harry J. Smith, Aug 15 2009
    
  • PARI
    is_A062998(n)={normlp(n=digits(n),1)<=prod(i=1,#n,n[i])} \\ M. F. Hasler, Oct 29 2014

A062996 Numbers whose sum of digits is greater than or equal to its product of digits.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 30, 31, 40, 41, 50, 51, 60, 61, 70, 71, 80, 81, 90, 91, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 130, 131, 132
Offset: 1

Views

Author

Henry Bottomley, Jun 29 2001

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[150],Total[IntegerDigits[#]]>=Times@@IntegerDigits[#]&] (* Harvey P. Dale, Sep 27 2023 *)
  • PARI
    isok(k)={my(d=digits(k)); vecsum(d) >= vecprod(d)} \\ Harry J. Smith, Aug 15 2009

A070565 n - product of digits of n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 30, 28, 26, 24, 22, 20, 18, 16, 14, 12, 40, 37, 34, 31, 28, 25, 22, 19, 16, 13, 50, 46, 42, 38, 34, 30, 26, 22, 18, 14, 60, 55, 50, 45, 40, 35, 30, 25, 20, 15, 70, 64, 58
Offset: 0

Views

Author

N. J. A. Sloane, May 07 2002

Keywords

Examples

			a(20) = 20 - 2*0 = 20, a(22) = 22 - 2*2 = 18.
		

Crossrefs

Programs

  • Mathematica
    Table[n - Times @@ IntegerDigits[n], {n, 0, 75}]
  • PARI
    for(n=1,100,s=ceil(log(n)/log(10)); print1(n-prod(i=0,s-1,floor(n/10^i*1.)-10*floor(n/10^(i+1)*1.)),", "))
    
  • PARI
    a(n) = if (n==0, 0, n - vecprod(digits(n))); \\ Michel Marcus, Jul 22 2025

Extensions

More terms from Benoit Cloitre and Robert G. Wilson v, May 09 2002

A062997 Numbers whose sum of digits is strictly greater than its product of digits.

Original entry on oeis.org

10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 30, 31, 40, 41, 50, 51, 60, 61, 70, 71, 80, 81, 90, 91, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 130, 131, 140, 141, 150, 151, 160, 161, 170
Offset: 1

Views

Author

Amarnath Murthy, Jun 27 2001

Keywords

Comments

Every multiple of 10 is a term.

Examples

			118 is a term as 1 + 1 + 8 = 10, 10 > 8 and 8 = 1 * 1 * 8.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[170], (Plus @@ IntegerDigits[ # ]) > (Times @@ IntegerDigits[ # ]) &] (* Alonso del Arte, May 16 2005 *)
  • PARI
    isok(k)={my(d=digits(k)); vecsum(d) > vecprod(d)} \\ Harry J. Smith, Aug 15 2009

Extensions

Extended by Larry Reeves (larryr(AT)acm.org) and Henry Bottomley, Jun 29 2001

A062999 Numbers whose sum of the digits is strictly less than its product of digits.

Original entry on oeis.org

23, 24, 25, 26, 27, 28, 29, 32, 33, 34, 35, 36, 37, 38, 39, 42, 43, 44, 45, 46, 47, 48, 49, 52, 53, 54, 55, 56, 57, 58, 59, 62, 63, 64, 65, 66, 67, 68, 69, 72, 73, 74, 75, 76, 77, 78, 79, 82, 83, 84, 85, 86, 87, 88, 89, 92, 93, 94, 95, 96, 97, 98, 99, 124, 125, 126, 127
Offset: 1

Views

Author

Henry Bottomley, Jun 29 2001

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[128], (Plus @@ IntegerDigits[ # ]) < (Times @@ IntegerDigits[ # ]) &] (* Alonso del Arte, May 16 2005 *)
  • PARI
    isok(k)={my(d=digits(k)); vecsum(d) < vecprod(d)} \\ Harry J. Smith, Aug 15 2009

A070566 "Compact" numbers: see reference for definition.

Original entry on oeis.org

2, 3, 5, 7, 9, 11, 13, 17, 19, 23, 25, 29, 31, 37, 41, 43, 47, 49, 53, 57, 59, 61, 67, 71, 73, 79, 83, 87, 89, 93, 97, 101, 103, 107, 109, 113, 117, 121, 127, 131, 137, 139, 145, 149, 151, 157, 163, 167, 169, 173, 177, 179, 181, 189, 191, 193, 197, 199
Offset: 1

Views

Author

N. J. A. Sloane, Sep 22 2008

Keywords

Comments

The old entry with this sequence number was a duplicate of A062329.

Crossrefs

A274126 Numbers with digits larger than 1 sorted by product of digits minus sum of digits, then by size.

Original entry on oeis.org

2, 3, 4, 5, 6, 7, 8, 9, 22, 23, 24, 222, 25, 33, 26, 27, 34, 223, 28, 29, 35, 44, 224, 2222, 36, 233, 37, 45, 225, 38, 46, 226, 39, 55, 234, 2223, 47, 227, 333, 56, 48, 228, 235, 244, 2224, 22222, 49, 57, 229, 66, 236, 334, 2233, 58, 67, 245, 2225, 237, 59, 68, 335
Offset: 1

Views

Author

David A. Corneth, Jun 10 2016

Keywords

Comments

Let PS(n) be product of digits of n minus sum of digits of n (=-A062329(n)). Then a(n) is PS(A037344(m)) ordered by PS(n) for values of m such that A037344 has its digits in nondecreasing order. If PS(m) some nonzero term m of A002276 exceed some bound, all positive integers t larger than that term without zeros and ones exceed have a larger value for PS(t).
Prepending -A062329(a(n)) or more ones before a(n) gives terms of A274125.
Permuting digits of A274125 gives A254621. Permutations of digits can be found in A261370. The union of A254621 and A011540 is A062996. The b-file lists terms having PS(n) <= 10^6.

Examples

			Suppose we want to order the nondecreasing integers without zeros and ones up to PS(m) = 50. We see that 222222 has PS(222222) = 52, so we only have to check such nondecreasing integers up to 222222. Not all of those must be checked, which is used in the program.
25 is a term. Prepending PS(25) = -A062329(25) = 3 ones before 25 gives 11125, which is a term of A274125. Permuting digits of 11125 gives for example 12511, which is a term of A254621.
		

Crossrefs

Programs

  • PARI
    See program in link "PARI program".
Showing 1-7 of 7 results.