public class Subsequence {
public static void main(String args[]) {
int start = 439;
int amount = 2;
int[] array = new int[99];
array[0] = start;
for (int i = 1; i<array.length; i++) {
array[i] = Digits(array[i-1]);
}
System.out.println(array[98]);
public static int Digits (int number) {
int digit = number%10;
int dozens = (int)number/10;
int digit1 = dozens%10;
int digit2 = (int)dozens/10;
return (digit+digit1+digit2)*13;
public class Subsequence {
public static void main(String args[]) {
int start = 439;
int amount = 2;
int[] array = new int[99];
array[0] = start;
for (int i = 1; i<array.length; i++) {
array[i] = Digits(array[i-1]);
}
System.out.println(array[98]);
}
public static int Digits (int number) {
int digit = number%10;
int dozens = (int)number/10;
int digit1 = dozens%10;
int digit2 = (int)dozens/10;
return (digit+digit1+digit2)*13;
}
}