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”).

A088612
a(1) = 1, a(n) = n-th squarefree number if n is not squarefree else a(n) is the n-th nonsquarefree number.
2
1, 8, 9, 5, 16, 18, 20, 11, 13, 27, 28, 17, 36, 40, 44, 23, 48, 29, 50, 31, 54, 56, 60, 37, 38, 68, 41, 42, 76, 80, 81, 51, 88, 90, 92, 58, 98, 99, 100, 65, 108, 112, 116, 70, 71, 121, 124, 77, 78, 79, 132, 83, 136, 86, 144, 89, 148, 150, 152, 95, 156, 160, 102, 103, 168
OFFSET
1,2
EXAMPLE
a(9) = 13, the 9th squarefree number, A005117(9).
PROG
(Python)
# uses programs from A005117 and A013929
from sympy import factorint
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
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Oct 16 2003
EXTENSIONS
Corrected and extended by Ray Chandler, Oct 18 2003
STATUS
approved