A383031 Indices of the squarefree terms in the sequence of exponentially odd numbers.
1, 2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 19, 21, 22, 23, 25, 26, 27, 28, 29, 30, 32, 33, 34, 35, 36, 37, 38, 40, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 64, 65, 66, 67, 68, 70, 71, 72, 73, 75, 76, 77, 78
Offset: 1
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
expOddQ[n_] := AllTrue[FactorInteger[n][[;; , 2]], OddQ]; Position[Select[Range[120], expOddQ], _?SquareFreeQ, Heads -> False] // Flatten
-
PARI
isexpodd(n) = {my(f = factor(n)); for(i=1, #f~, if(!(f[i, 2] % 2), return (0))); 1; } list(lim) = {my(c = 0); for(k = 1, lim, if(isexpodd(k), c++; if(issquarefree(k), print1(c, ", ")))); }
Comments