

A269026


a(1)=1; for n>1, define a sequence {b(m), m >= 1} by b(1)=a(n1), b(2)=n, and b(m) = A020639(b(m2)) + A006530(b(m1)); then a(n) is the number of terms in that sequence before the first of the infinite string of 4s.


1



1, 9, 12, 1, 4, 10, 5, 6, 8, 6, 5, 3, 15, 7, 12, 2, 17, 7, 4, 6, 13, 11, 8, 10, 9, 3, 12, 9, 11, 3, 12, 2, 16, 6, 12, 10, 5, 11, 12, 6, 9, 7, 12, 14, 13, 11, 16, 10, 5, 7, 12, 14, 8, 10, 5, 11, 4, 10, 17, 15, 15, 7, 8, 2, 5, 3, 15, 7, 4, 9, 12, 10, 5, 10, 13, 3, 11, 11, 11
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


LINKS



EXAMPLE

n = 3:
a(n1) = 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



STATUS

approved



