[go: up one dir, main page]

login
A064475
Number of odd terms among first n terms of A064413 (if it begins at 2).
2
0, 0, 0, 1, 2, 2, 2, 2, 3, 4, 4, 4, 5, 6, 6, 6, 6, 6, 7, 8, 9, 9, 10, 11, 11, 11, 12, 13, 13, 13, 13, 14, 15, 15, 15, 16, 17, 18, 18, 18, 18, 19, 20, 20, 20, 20, 20, 20, 21, 22, 22, 23, 24, 24, 24, 25, 26, 26, 26, 27, 28, 28, 28, 28, 28, 29, 30, 31, 31, 31
OFFSET
2,5
LINKS
J. C. Lagarias, E. M. Rains and N. J. A. Sloane, The EKG sequence, arXiv:math/0204011 [math.NT], 2002; Exper. Math. 11 (2002), 437-446.
MATHEMATICA
ekg[s_] := Block[{m = s[[-1]], k = 3}, While[MemberQ[s, k] || GCD[m, k] == 1, k++]; Append[s, k]];
EKG = Nest[ekg, {1, 2}, 71] ;
a[n_] := Count[EKG[[2 ;; n]], _?OddQ];
Table[a[n], {n, 2, 71}] (* Jean-François Alcover, Jan 11 2019, after Robert G. Wilson v in A064413 *)
CROSSREFS
See A064952 for better version.
Sequence in context: A064775 A260731 A194239 * A025774 A280168 A001156
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Oct 05 2001
STATUS
approved