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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 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

%I #9 Feb 10 2018 12:50:52

%S 1,4,9,10,40,90,100,148,400,838,841,900,1000,1111,1440,4000,4058,6430,

%T 7388,8504,8668,8837,9000,10000,10111,10200,11011,11101,11110,11215,

%U 12321,13231,13333,13955,14083,14403,14464,17780,18480,18770,20112,21012,21102,21412,22322,22592,25652,29522,30205,30343,30441

%N 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.

%H Harvey P. Dale, <a href="/A178360/b178360.txt">Table of n, a(n) for n = 1..250</a>

%e 841 is in the sequence because :

%e 8 + 4^2 + 1^3 = 25 = 5^2 ;

%e 8^3 + 4^2 + 1 = 529 = 23^2.

%p with(numtheory):for n from 1 to 50000 do:l:=length(n):n0:=n:s1:=0:s2:=0:for

%p 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:

%t 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 *)

%K nonn,base

%O 1,2

%A _Michel Lagneau_, Dec 21 2010

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.

Last modified June 3 02:49 EDT 2023. Contains 363102 sequences. (Running on oeis4.)