login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

a(1) = 1, a(n) = n-th squarefree number if n is not squarefree else a(n) is the n-th nonsquarefree number.
2

%I #11 Aug 13 2024 01:56:02

%S 1,8,9,5,16,18,20,11,13,27,28,17,36,40,44,23,48,29,50,31,54,56,60,37,

%T 38,68,41,42,76,80,81,51,88,90,92,58,98,99,100,65,108,112,116,70,71,

%U 121,124,77,78,79,132,83,136,86,144,89,148,150,152,95,156,160,102,103,168

%N a(1) = 1, a(n) = n-th squarefree number if n is not squarefree else a(n) is the n-th nonsquarefree number.

%e a(9) = 13, the 9th squarefree number, A005117(9).

%o (Python)

%o # uses programs from A005117 and A013929

%o from sympy import factorint

%o def A088612(n): return A013929(n) if max(factorint(n).values(),default=0)<2 and n>1 else A005117(n) # _Chai Wah Wu_, Aug 12 2024

%Y Cf. A005117, A013929, A088611.

%K nonn

%O 1,2

%A _Amarnath Murthy_, Oct 16 2003

%E Corrected and extended by _Ray Chandler_, Oct 18 2003