OFFSET
1,1
COMMENTS
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
EXAMPLE
The first 7 exponentially odd numbers are 1, 2, 3, 5, 6, 7, and 8. A268335(7) = 8 = 3^3 is the least nonsquarefree term. Therefore a(1) = 7.
MATHEMATICA
Position[Select[Range[120], AllTrue[FactorInteger[#][[;; , 2]], OddQ] &], _?(!SquareFreeQ[#] &), Heads -> False] // Flatten
PROG
(PARI) isexpodd(k) = {my(e = factor(k)[, 2]); for(i = 1, #e, if(!(e[i] % 2), return(0))); 1; }
lista(kmax) = {my(f, c = 0); for(k = 1, kmax, if(isexpodd(k), c++; if(!issquarefree(k), print1(c, ", ")))); }
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Amiram Eldar, Jul 09 2024
STATUS
approved