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!)
A066566 Numbers that when decremented by the sum of their digits produce a square. 5
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 330, 331, 332, 333 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
The squares in this sequence are divisible by 9.
LINKS
Indranil Ghosh, Table of n, a(n) for n = 1..11130 (terms 1..1000 from Harry J. Smith)
EXAMPLE
155 is a member as 155 - 1 - 5 - 5 = 144 = 12^2.
MATHEMATICA
Select[Range[0, 350], IntegerQ[Sqrt[#-Total[IntegerDigits[#]]]]&] (* Harvey P. Dale, Feb 24 2011 *)
PROG
(PARI) digitsum(n) = local(s, d); s=0; while(n>0, d=divrem(n, 10); n=d[1]; s=s+d[2]); s
a066566(m)= local(n); for(n=0, m, if(issquare(n-digitsum(n)), print1(n, ", "))) a066566(7000)
(PARI) SumD(x)= { local(s=0); while (x>9, s+=x%10; x\=10); return(s + x) }
{ n=0; for (m=0, 10^10, if (issquare(m - SumD(m)), write("b066566.txt", n++, " ", m); if (n==1000, return)) ) } \\ Harry J. Smith, Mar 05 2010
CROSSREFS
Cf. A066564.
Sequence in context: A249816 A250243 A341936 * A256577 A067080 A008554
KEYWORD
base,nonn
AUTHOR
Amarnath Murthy, Dec 18 2001
EXTENSIONS
More terms from Jason Earls, Dec 20 2001
Offset changed from 0 to 1 by Harry J. Smith, Mar 05 2010
STATUS
approved

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 19 04:04 EDT 2024. Contains 371782 sequences. (Running on oeis4.)