login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A274368 Numbers n such that if n is decreased by the sum of its digits and n is decreased by the product of its digits both differences are squares > 0. 0
45, 48, 231, 121116, 159229, 11985489, 17514256, 51624256, 88172137, 228523729, 467597425, 11112111412, 4329279198937, 3716589421762641, 23228676113127556, 138417183479417732388
(list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
It appears that if n is increased by the sum of its digits and n is increased by the product of its digits no two squares are found, except for the trivial n = 2 and n = 8.
The smallest n>8 such that n+A007953(n) and n+A007954(n) are both squares is n = 6469753431969. If a fourth such n exists, it must be larger than 1.6*10^19. - Giovanni Resta, Jun 19 2016
LINKS
EXAMPLE
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
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)
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 *)
PROG
(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, 10), c-sod(c, 10)
if cube(aa, 2)==True and cube(ab, 2)==True and aa>0:
print (c, aa, ab)
(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
CROSSREFS
Intersection of A066566 and A228187.
Sequence in context: A257410 A306103 A045566 * A214572 A295493 A184043
KEYWORD
nonn,base,more
AUTHOR
Pieter Post, Jun 19 2016
EXTENSIONS
a(10)-a(15) from Giovanni Resta, Jun 19 2016
a(16) from David A. Corneth, May 27 2021
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 19 02:11 EDT 2024. Contains 376003 sequences. (Running on oeis4.)