OFFSET
1,10
COMMENTS
Primes include a(10) = 3, a(12) = 5, a(16) = 19, a(24) = 397. a(n) is unrelated to n for a(14) = 10, a(15) = 10, a(18) = 39, a(20) = 85, a(21) = 66, a(22) = 164.
FORMULA
For primes p>3, a(p) = 0.
EXAMPLE
a(6) = 1 because 4 is the only number less than 6 which is unrelated to 6, so a(6) = a(4) = 1.
a(10) = a(4) + a(6) + a(8) = 1 + 1 + 1 = 3.
a(12) = a(8) + a(9) + a(10) = 1 + 1 + 3 = 5.
MATHEMATICA
unr[n_, k_] := GCD[n, k] > 1 && Mod[n, k] > 0; a[1] = a[2] = a[3] = a[4] = 1;
a[n_] := a[n] = Sum[a[k] Boole[unr[n, k]], {k, n - 1}]; Array[a, 60]
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Jonathan Vos Post, May 18 2006
EXTENSIONS
Edited by N. J. A. Sloane, Dec 03 2006
Edited and many terms corrected by Giovanni Resta, Jun 16 2016
STATUS
approved