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

 


Numbers n > 0 such that n = (d_1^1 + d_2^2 + d_3^3 + ...)^2, where d_k represents the k-th decimal digit of n.
0

%I #38 Aug 21 2019 14:41:59

%S 0,1,81,441,3721

%N Numbers n > 0 such that n = (d_1^1 + d_2^2 + d_3^3 + ...)^2, where d_k represents the k-th decimal digit of n.

%C No other terms below 10^8.

%C All terms are square by definition.

%C No other terms below 4*10^18. - _Chai Wah Wu_, Apr 08 2016

%e 441 is a term because 441 = (4^1+4^2+1^3)^2;

%e 3721 is a term because 3721 = (3^1+7^2+2^3+1^4)^2.

%t f[n_] := (Plus @@ (IntegerDigits[n]^Range[ Floor[ Log[10, n] + 1]]))^2; Select[ Range[10^4], f[ # ] == # &]

%t Select[Range[10^6]^2,With[{id=IntegerDigits[#]},#==Sum[ id[[i]]^i,{i,Length[id]}]^2]&] (* _Ray Chandler_, Apr 01 2016 *)

%t Join[{0},Select[Range[4000],Total[IntegerDigits[#]^Range[ IntegerLength[ #]]]^2 ==#&]] (* _Harvey P. Dale_, Aug 21 2019 *)

%o (PARI) isok(n) = my(d=digits(n)); n == sum(k=1, #d, d[k]^k)^2; \\ _Michel Marcus_, Mar 25 2016

%o (Python)

%o A270538_list = [n**2 for n in range(10**6) if n == sum(int(a)**(b+1) for b, a in enumerate(str(n**2)))] # _Chai Wah Wu_, Apr 08 2016

%K nonn,base,more

%O 1,3

%A _José de Jesús Camacho Medina_, Mar 18 2016

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | 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 24 11:34 EDT 2024. Contains 376196 sequences. (Running on oeis4.)