2 added 9 characters in body
source | link
nextVal[x_Integer]nextVal[x_Integer?Positive] := Total[IntegerDigits[x]^2]

The sequence can be readily generated using NestList

seq = NestList[nextVal, 57, 27]

(*  {57, 74, 65, 61, 37, 58, 89, 145, 42, 20, 4, 16, 37, 58, 89, 145, 
     42, 20, 4, 16, 37, 58, 89, 145, 42, 20, 4, 16}  *)

The function to generate the sequence is expressible as a DifferenceRoot

sf = FindSequenceFunction[seq]

enter image description here

Verifying,

seq == sf /@ Range[Length[seq]]

(*  True  *)
nextVal[x_Integer] := Total[IntegerDigits[x]^2]

The sequence can be readily generated using NestList

seq = NestList[nextVal, 57, 27]

(*  {57, 74, 65, 61, 37, 58, 89, 145, 42, 20, 4, 16, 37, 58, 89, 145, 
     42, 20, 4, 16, 37, 58, 89, 145, 42, 20, 4, 16}  *)

The function to generate the sequence is expressible as a DifferenceRoot

sf = FindSequenceFunction[seq]

enter image description here

Verifying,

seq == sf /@ Range[Length[seq]]

(*  True  *)
nextVal[x_Integer?Positive] := Total[IntegerDigits[x]^2]

The sequence can be readily generated using NestList

seq = NestList[nextVal, 57, 27]

(*  {57, 74, 65, 61, 37, 58, 89, 145, 42, 20, 4, 16, 37, 58, 89, 145, 
     42, 20, 4, 16, 37, 58, 89, 145, 42, 20, 4, 16}  *)

The function to generate the sequence is expressible as a DifferenceRoot

sf = FindSequenceFunction[seq]

enter image description here

Verifying,

seq == sf /@ Range[Length[seq]]

(*  True  *)
1
source | link

nextVal[x_Integer] := Total[IntegerDigits[x]^2]

The sequence can be readily generated using NestList

seq = NestList[nextVal, 57, 27]

(*  {57, 74, 65, 61, 37, 58, 89, 145, 42, 20, 4, 16, 37, 58, 89, 145, 
     42, 20, 4, 16, 37, 58, 89, 145, 42, 20, 4, 16}  *)

The function to generate the sequence is expressible as a DifferenceRoot

sf = FindSequenceFunction[seq]

enter image description here

Verifying,

seq == sf /@ Range[Length[seq]]

(*  True  *)