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

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A228187 Positive numbers which when decremented by the product of their digits produce a square. 4

%I #22 Mar 15 2015 14:56:58

%S 1,2,3,4,5,6,7,8,9,24,37,45,48,67,71,79,100,228,231,256,259,292,388,

%T 400,524,575,624,661,832,865,868,900,928,949,973,985,1024,1089,1231,

%U 1317,1344,1399,1541,1549,1564,1600,1612,1629,1723,1759,2025,2164,2209

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

%H Alois P. Heinz, <a href="/A228187/b228187.txt">Table of n, a(n) for n = 1..1000</a>

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

%p a:= proc(n) option remember; local d, k, m;

%p for k from 1+`if`(n=1, 0, a(n-1)) do

%p d, m:= 1, k;

%p while m>0 do d:=d*irem(m,10,'m') od;

%p if issqr(k-d) then return k fi

%p od

%p end:

%p seq(a(n), n=1..100); # _Alois P. Heinz_, Aug 19 2013

%o (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

%Y Cf. A066567.

%K base,nonn,easy

%O 1,2

%A _Derek Orr_, Aug 15 2013

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | 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 April 24 06:14 EDT 2024. Contains 371918 sequences. (Running on oeis4.)