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

A229184 Numbers decremented by their digit product produce a cube.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 71, 145, 167, 264, 361, 757, 1000, 1439, 1791, 2233, 3525, 3627, 3959, 4096, 4864, 4995, 6677, 8000, 8128, 8672, 9575, 10648, 14848, 23488, 24976, 25199, 25829, 26549, 27000, 27224, 35648, 39304, 43235, 50653, 53893, 64000, 74088, 79507, 91215, 93285, 94365
Offset: 1

Views

Author

Derek Orr, Sep 15 2013

Keywords

Comments

4 is the only zeroless number < 10^7 that is a member of this sequence and A229185 (Numbers incremented by their digit product produce a cube).

Examples

			167 - 1*6*7 = 125 = 5^3.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[0,100000], IntegerQ[(# - Times @@ IntegerDigits[#])^(1/3)] &] (* T. D. Noe, Sep 16 2013 *)
  • PARI
    for(n=0,10^5,d=digits(n);P=n-prod(i=1,#d,d[i]);if(ispower(P,3),print1(n,", "))) \\ Derek Orr, Mar 12 2015
  • Python
    def DP(n):
      p = 1
      for i in str(n):
        p *= int(i)
      return p
    for n in range(10**4):
      k = 0
      P = n - DP(n)
      while P >= k**3:
        if P == k**3:
          print(n, end=', ')
          break
        k += 1
    # Simplified by Derek Orr, Mar 12 2015
    

Extensions

More terms and prepended a(1) = 0 from Derek Orr, Mar 12 2015

A256065 Zeroless numbers that when incremented or decremented by the product of their digits produce a square.

Original entry on oeis.org

2, 8, 46692, 58896, 59949, 186633, 186673, 949968, 1587616, 2989584, 58988961, 245878784, 914457625, 2439577764, 2754991369, 4161798288, 4161798468, 4629457984, 4897936656, 29859851664, 34828536976, 41664977536, 59998484736, 96745892625, 134994579556
Offset: 1

Views

Author

Derek Orr, Mar 13 2015

Keywords

Comments

If a term has a zero in it, its digit product is 0. Thus it is trivial to include cubes with one or more zeros.
Intersection of A066567, A228187, and A052382.
Is this sequence finite?
Replacing "squares" with "cubes", this sequence would only consist of {4} for n < 10^8. 4 is believed to be the only number to satisfy this property with cubes.
If it exists, a(20) > 10^10.
a(80) > 10^27. - Hiroaki Yamanouchi, Mar 16 2015

Examples

			46692 + 4*6*6*9*2 = 49284 = 222^2 and 46692 - 4*6*6*9*2 = 210^2. So 46692 is a member of this sequence.
		

Crossrefs

Cf. A066567 (when incremented), A228187 (when decremented), A052382 (zeroless).

Programs

  • Mathematica
    pdsQ[n_]:=With[{p=Times@@IntegerDigits[n]},p>0&&AllTrue[Sqrt[n+{p,-p}],IntegerQ]]; Select[Range[3*10^6],pdsQ] (* The program generates the first 10 terms of the sequence. *) (* Harvey P. Dale, Jun 06 2025 *)
  • PARI
    for(n=0,10^7,d=digits(n);p=prod(i=1,#d,d[i]);if(p&&issquare(n-p)&&issquare(n+p),print1(n,", ")))

Extensions

a(12)-a(19) from Michel Marcus, Mar 14 2015
a(20)-a(25) from Hiroaki Yamanouchi, Mar 16 2015

A274368 Numbers k such that if k is decreased by the sum of its digits and k is decreased by the product of its digits both differences are squares > 0.

Original entry on oeis.org

45, 48, 231, 121116, 159229, 11985489, 17514256, 51624256, 88172137, 228523729, 467597425, 11112111412, 4329279198937, 3716589421762641, 23228676113127556, 138417183479417732388
Offset: 1

Views

Author

Pieter Post, Jun 19 2016

Keywords

Comments

It appears that if k is increased by the sum of its digits and k is increased by the product of its digits no two squares are found, except for the trivial k = 2 and k = 8.
The smallest k>8 such that k+A007953(k) and k+A007954(k) are both squares is k = 6469753431969. If a fourth such k exists, it must be larger than 1.6*10^19. - Giovanni Resta, Jun 19 2016

Examples

			45 - (4 + 5) = 36 and 45 - (4 * 5) = 25.
159229 - (1 + 5 + 9 + 2 + 2 + 9) = 157609 (= 397^2) and 159229 - (1*5*9*2*2*9) = 159201 (= 399^2).
From _David A. Corneth_, May 27 2021: (Start)
If the digits of a(n) = x are an anagram of 122599 then the product of digits is 1 * 2 * 2 * 5 * 9 * 9 = 1620 and the sum of digits is 1 + 2 + 2 + 5 + 9 + 9 = 28 as order of addition and multiplication does not matter. So x - 31 = m^2 and x - 1620 = k^2 for some positive integers k and m.
So m^2 - k^2 = (x - 28) - (x - 1620) = 1592 = (m - k)*(m + k). The divisors of 1592 are 1, 2, 4, 8, 199, 398, 796, 1592. Testing possible pairs m-k and m+k gives, among other pairs, (m - k, m + k) = (2, 796). Solving for k gives k = 397 so x = k^2 + 1620 = 397^2 + 1620 = 159229 giving an extra term. (End)
		

Crossrefs

Intersection of A066566 and A228187.

Programs

  • Mathematica
    lim = 10^6; s = Select[Range@ lim, IntegerQ@ # && # != 0 &@ Sqrt[# - Times @@ IntegerDigits@ #] &]; t = Select[Range@ lim, IntegerQ@ # && # != 0 &@ Sqrt[# - Total@ IntegerDigits@ #] &]; Intersection[s, t] (* Michael De Vlieger, Jun 19 2016 *)
  • PARI
    a007953(n) = sumdigits(n)
    a007954(n) = my(d=digits(n)); prod(i=1, #d, d[i])
    is(n) = n > 9 && issquare(n-a007953(n)) && issquare(n-a007954(n)) \\ Felix Fröhlich, Jun 19 2016
  • Python
    def pod(n):
        p = 1
        for x in str(n):
            p *= int(x)
        return p
    def sod(n):
        return sum(int(d) for d in str(n))
    def cube(z,p):
        iscube=False
        y=int(pow(z,1/p)+0.01)
        if y**p==z:
            iscube=True
        return iscube
    for c in range(1, 10**8):
        aa,ab=c-pod(c),c-sod(c)
        if cube(aa,2) and cube(ab,2) and aa>0:
           print(c,aa,ab)
    

Extensions

a(10)-a(15) from Giovanni Resta, Jun 19 2016
a(16) from David A. Corneth, May 27 2021
Showing 1-3 of 3 results.