OFFSET
1,2
LINKS
Michel Marcus, Table of n, a(n) for n = 1..10000
EXAMPLE
n = 3:
a(n-1) = a(2) = 9;
b(1) = 9, b(2) = 3;
the sequence generated is: 9, 3, 6, 6, 5, 7, 12, 10, 7, 9, 10, 8, 4, 4, 4, ...
There are 12 terms before the first of the infinite 4s, so a(3) = 12.
PROG
(PARI) spf(n) = if (n==1, 1, vecmin(factor(n)[, 1]));
gpf(n) = if (n==1, 1, vecmax(factor(n)[, 1]));
nbt(a, n) = {x = a; y = n; nb = 0; while (!((x==4) && (y==4)), z = spf(x) + gpf(y); x = y; y = z; nb++; ); nb; }
lista(nn) = { print1(a=1, ", "); for (n=2, nn, na = nbt(a, n); print1(na, ", "); a = na; ); } \\ Michel Marcus, Apr 12 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Cody M. Haderlie, Apr 11 2016
STATUS
approved