A088610 Starting with n = 1, a(n) is the smallest squarefree number not included earlier if n is odd, else n is the smallest nonsquarefree number.
1, 4, 2, 8, 3, 9, 5, 12, 6, 16, 7, 18, 10, 20, 11, 24, 13, 25, 14, 27, 15, 28, 17, 32, 19, 36, 21, 40, 22, 44, 23, 45, 26, 48, 29, 49, 30, 50, 31, 52, 33, 54, 34, 56, 35, 60, 37, 63, 38, 64, 39, 68, 41, 72, 42, 75, 43, 76, 46, 80, 47, 81, 51, 84, 53, 88, 55, 90, 57, 92, 58, 96
Offset: 1
Keywords
Links
Crossrefs
Programs
-
Mathematica
With[{max = 100}, s = Select[Range[max], SquareFreeQ]; ns = Complement[Range[max], s]; Riffle[s[[1 ;; Length[ns]]], ns]] (* Amiram Eldar, Mar 04 2024 *)
-
Scheme
(define (A088610 n) (if (even? n) (A013929 (/ n 2)) (A005117 (/ (+ 1 n) 2))))
Formula
Extensions
More terms from Ray Chandler, Oct 18 2003
Comments