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.

A061762 a(n) = (sum of digits of n) + (product of digits of n).

Original entry on oeis.org

0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 2, 5, 8, 11, 14, 17, 20, 23, 26, 29, 3, 7, 11, 15, 19, 23, 27, 31, 35, 39, 4, 9, 14, 19, 24, 29, 34, 39, 44, 49, 5, 11, 17, 23, 29, 35, 41, 47, 53, 59, 6, 13, 20, 27, 34, 41, 48, 55, 62, 69, 7, 15, 23, 31, 39, 47
Offset: 0

Views

Author

Amarnath Murthy, May 20 2001

Keywords

Comments

Fixed points a(m) = m are m = {0, 19, 29, 39, 49, 59, 69, 79, 89, 99}. Is this list complete? - Zak Seidov, Aug 22 2007
The above list of fixed points is complete. If a(m) = m, then m < 10^21 and there are no other fixed points below 10^21. - Chai Wah Wu, Aug 14 2017
All numbers are in this sequence. Proof: One can create a number m whose digital sum is any number p and one can create a number k by concatenating digit "0" to m. Then this number k will be a term. - Metin Sariyar, Oct 29 2019

Examples

			a(14) = 1+4 + 1*4 = 9.
		

References

  • S. Parmeswaran, S+P numbers, Mathematics Informatics Quarterly, Vol. 9, No. 3 (Sep 1999), Bulgaria.

Crossrefs

See A130858 for the smallest inverse.

Programs

  • Magma
    [0] cat [&+Intseq(n)+&*Intseq(n): n in [1..80]];// Vincenzo Librandi, Jan 03 2020
  • Maple
    read("transforms") :
    A061762 := proc(n)
        digsum(n)+A007954(n) ;
    end proc: # R. J. Mathar, Aug 13 2012
  • Mathematica
    Table[Plus @@ IntegerDigits[n] + Times @@ IntegerDigits[n], {n, 0, 75}] (* Jayanta Basu, Apr 05 2013 *)
  • PARI
    a(n) = if (n==0, 0, my(d=digits(n)); vecsum(d) + vecprod(d)); \\ Michel Marcus, Oct 29 2019, Jan 03 2020
    
  • Python
    from operator import mul
    from functools import reduce
    def A061762(n):
        a = [int(d) for d in str(n)]
        return sum(a)+reduce(mul,a) # Chai Wah Wu, Aug 14 2017
    

Formula

a(n) = A007953(n) + A007954(n).

Extensions

Corrected and extended by Larry Reeves (larryr(AT)acm.org) and Matthew Conroy, May 23 2001

A038366 n is divisible by (product of digits) + (sum of digits).

Original entry on oeis.org

10, 19, 20, 29, 30, 39, 40, 42, 49, 50, 59, 60, 69, 70, 79, 80, 89, 90, 99, 100, 102, 108, 110, 120, 126, 132, 140, 150, 180, 190, 200, 201, 204, 207, 209, 210, 220, 230, 240, 270, 280, 285, 300, 306, 308, 312, 320, 330, 360, 370, 400, 402, 405, 407, 408, 410
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[410], Divisible[#, Plus @@ (x = IntegerDigits[#]) + Times @@ x] &] (* Jayanta Basu, Jul 14 2013 *)
  • PARI
    isok(m) = my(d=digits(m)); (m % (vecprod(d) + vecsum(d))) == 0; \\ Michel Marcus, Oct 29 2019
    
  • Python
    from math import prod
    def ok(n): d = list(map(int, str(n))); return n and n%(sum(d)+prod(d)) == 0
    print([k for k in range(411) if ok(k)]) # Michael S. Branicky, Oct 19 2021

A371337 Numbers k>0 such that k = (sum of digits of k^2) + (product of nonzero digits of k^2).

Original entry on oeis.org

127, 1467, 3052, 5860, 653230, 3483702, 43352128, 783820873, 8092385362, 622196951140, 1061882796441600145, 178949702436677222562
Offset: 1

Views

Author

René-Louis Clerc, Mar 19 2024

Keywords

Examples

			1467^2 = 2152089, (2+1+5+2+8+9) + (2*1*5*2*8*9) = 27 + 1440 = 1467.
		

Crossrefs

Programs

  • PARI
    SplusP(k,r) = my(d=select(x->(x>0),digits(k^r))); vecsum(d) + vecprod(d) == k;
            resuSplusP(p,r)=for(k=1,10^p,if(SplusP(k,r) ==1,print1(k,",")))

Extensions

a(9)-a(12) from Chai Wah Wu, Apr 20 2024

A371338 Numbers k>0 such that k = |(product of nonzero digits of k^2) - (sum of digits of k^2)|.

Original entry on oeis.org

161, 198, 1701, 604755, 629810, 4354506, 100018736, 411505847, 14869757951891, 2239397044538572646, 40766979086355529727820, 6289762487609138872319999999757
Offset: 1

Views

Author

René-Louis Clerc, Mar 19 2024

Keywords

Comments

Most often P-S is strictly positive but to always have an application of N* in N* we prefer to use |P-S| (cf. Clerc).

Examples

			1701^2 = 2893401, |(2*8*9*3*4*1) - (2+8+9+3+4+1)| = 1728 - 27 = 1701.
		

Crossrefs

Programs

  • PARI
    SmP(k,r)=my(d=select(x->(x>0),digits(k^r))); abs(vecsum(d)- vecprod(d)) == k;
     resuSmP(p,r)={for(k=1,10^p,if(SmP(k,r)==1, print1(k,";")))}

Extensions

a(9)-a(12) from Chai Wah Wu, Apr 20 2024
Showing 1-4 of 4 results.