OFFSET
1,3
COMMENTS
Indices of first occurrence of each natural number: 1, 3, 5, 7, 9, 15, 11, 13, 21, 17, 19, 23, 32, 33, ..., . - Robert G. Wilson v
From Reinhard Zumkeller, Oct 27 2010: (Start)
LINKS
R. Zumkeller, Table of n, a(n) for n = 1..1000
FORMULA
EXAMPLE
All the positive integers <= 21 that are coprime to 21 are 1,2,4,5,8,10,11,13,16,17,19,20. Of these integers, only 1,2,4,5,8,11,13,16,17,19 are prime-powers. There are 10 of these prime-powers; so a(21) = 10.
MAPLE
isA000961 := proc(n) if n = 1 or isprime(n) then true; else RETURN(nops(ifactors(n)[2]) =1) ; fi ; end: A139555 := proc(n) local a, i; a := 0 ; for i from 1 to n do if isA000961(i) and gcd(i, n) = 1 then a := a+1 ; fi ; od: a ; end: seq(A139555(n), n=1..100) ; # R. J. Mathar, May 12 2008
MATHEMATICA
f[n_] := Length@ Select[Range@ n, Length@ FactorInteger@ # == 1 == GCD[n, # ] &]; Array[f, 76] (* Robert G. Wilson v *)
PROG
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Apr 27 2008
EXTENSIONS
More terms from R. J. Mathar and Robert G. Wilson v, May 12 2008
STATUS
approved