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.

A228187 Positive numbers which when decremented by the product of their digits produce a square.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 24, 37, 45, 48, 67, 71, 79, 100, 228, 231, 256, 259, 292, 388, 400, 524, 575, 624, 661, 832, 865, 868, 900, 928, 949, 973, 985, 1024, 1089, 1231, 1317, 1344, 1399, 1541, 1549, 1564, 1600, 1612, 1629, 1723, 1759, 2025, 2164, 2209
Offset: 1

Views

Author

Derek Orr, Aug 15 2013

Keywords

Examples

			388 is a term because 388-(3*8*8) = 196 = 14^2.
		

Crossrefs

Cf. A066567.

Programs

  • Maple
    a:= proc(n) option remember; local d, k, m;
          for k from 1+`if`(n=1, 0, a(n-1)) do
            d, m:= 1, k;
            while m>0 do d:=d*irem(m,10,'m') od;
            if issqr(k-d) then return k fi
          od
        end:
    seq(a(n), n=1..100);  # Alois P. Heinz, Aug 19 2013
  • Mathematica
    Select[Range[2500],IntegerQ[Sqrt[#-Times@@IntegerDigits[#]]]&] (* Harvey P. Dale, Aug 16 2025 *)
  • PARI
    for(n=0,10^4,d=digits(n);p=prod(i=1,#d,d[i]);if(issquare(n-p),print(n,", "))) \\ Derek Orr, Mar 13 2015

A229185 Numbers incremented by their digit product produce a cube.

Original entry on oeis.org

0, 4, 85, 168, 184, 212, 368, 549, 681, 919, 999, 1000, 1283, 1593, 2181, 3664, 4096, 4717, 6811, 7497, 8000, 9919, 10648, 12143, 15275, 15425, 21664, 21728, 21824, 27000, 39304, 42427, 42811, 47629, 50653, 63424, 64000, 74088, 79507, 84416, 103823, 110592
Offset: 1

Views

Author

Derek Orr, Sep 15 2013

Keywords

Examples

			681 + 6*8*1 = 729 = 9^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

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