|
|
A178360
|
|
Numbers n such that d(1)^1 + d(2)^2 + ... + d(p)^p and d(1)^p + d(2)^p-1 +... + d(p)^1 are squares, where d(i), i=1..p, are the digits of n.
|
|
1
|
|
|
1, 4, 9, 10, 40, 90, 100, 148, 400, 838, 841, 900, 1000, 1111, 1440, 4000, 4058, 6430, 7388, 8504, 8668, 8837, 9000, 10000, 10111, 10200, 11011, 11101, 11110, 11215, 12321, 13231, 13333, 13955, 14083, 14403, 14464, 17780, 18480, 18770, 20112, 21012, 21102, 21412, 22322, 22592, 25652, 29522, 30205, 30343, 30441
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
Harvey P. Dale, Table of n, a(n) for n = 1..250
|
|
EXAMPLE
|
841 is in the sequence because :
8 + 4^2 + 1^3 = 25 = 5^2 ;
8^3 + 4^2 + 1 = 529 = 23^2.
|
|
MAPLE
|
with(numtheory):for n from 1 to 50000 do:l:=length(n):n0:=n:s1:=0:s2:=0:for
m from 1 to l do:q:=n0:u:=irem(q, 10):v:=iquo(q, 10):n0:=v :s1:=s1+u^(l-m+1):s2:=s2+u^m:od:s10:= sqrt(s1):s20:=sqrt(s2): if s10=floor(s10) and s20=floor(s20) then printf(`%d, `, n):else fi:od:
|
|
MATHEMATICA
|
ndnQ[n_]:=Module[{idn=IntegerDigits[n], len=Range[IntegerLength[n]]}, AllTrue[{Sqrt[Total[idn^len]], Sqrt[Total[Reverse[idn]^len]]}, IntegerQ]]; Select[Range[31000], ndnQ] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Feb 10 2018 *)
|
|
CROSSREFS
|
Sequence in context: A178224 A102985 A112401 * A197125 A197129 A115688
Adjacent sequences: A178357 A178358 A178359 * A178361 A178362 A178363
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
Michel Lagneau, Dec 21 2010
|
|
STATUS
|
approved
|
|
|
|