OFFSET
1,3
COMMENTS
LINKS
FORMULA
MATHEMATICA
(* b = A250469 *) b[1] = 1; b[n_] := If[PrimeQ[n], NextPrime[n], m1 = p1 = FactorInteger[n][[1, 1]]; For[ k1 = 1, m1 <= n, m1 += p1; If[m1 == n, Break[]]; If[ FactorInteger[m1][[1, 1]] == p1, k1++]]; m2 = p2 = NextPrime[p1]; For[k2 = 1, True, m2 += p2, If[ FactorInteger[m2][[1, 1]] == p2, k2++]; If[k1 + 2 == k2, Return[m2]]]];
a[1] = a[2] = 1; a[n_?EvenQ] := a[n] = a[n/2]; a[n_] := a[n] = For[k = 1, True, k++, If[b[k] == n, Return[k]]];
Array[a, 100] (* Jean-François Alcover, Mar 14 2016 *)
PROG
KEYWORD
nonn
AUTHOR
Antti Karttunen, Feb 11 2016
STATUS
approved