Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #10 Oct 13 2017 06:04:11
%S 1,2,3,5,6,7,10,11,15,17,19,21,22,23,30,31,33,34,35,46,47,51,53,57,58,
%T 59,65,66,67,69,70,71,91,93,94,95,101,102,103,105,106,107,138,139,141,
%U 142,143,154,155,159,161,173,174,177,178,179,195,197,199,201,202,203,209,210,211,213,214,215,273,274,281,282
%N Persistently squarefree numbers for base-3 shifting: Numbers n such that all terms in finite set of positive numbers [n, floor(n/3), floor(n/9), floor(n/27), ..., floor(n/3^k)>0] are squarefree.
%C If there is any number present which itself is not divisible by 3 (is in A001651), then 3n is also present in this sequence.
%H Antti Karttunen, <a href="/A293523/b293523.txt">Table of n, a(n) for n = 1..10000</a>
%o (PARI)
%o \\ A naivish algorithm:
%o allocatemem(2^30);
%o up_to_level = 10;
%o up_to = (3^(1+up_to_level))-1;
%o vekkuli = vector(up_to);
%o vekkuli[1] = 1;
%o vekkuli[2] = -1;
%o write("b293523.txt", 1, " ", 1);
%o write("b293523.txt", 2, " ", 2);
%o kA293523 = 3; for(n=3,up_to, vekkuli[n] = moebius(n)*vekkuli[n\3]; if(vekkuli[n],write("b293523.txt", kA293523, " ", n); kA293523++;));
%o (PARI)
%o is_persistently_squarefree(n,base) = { while(n>1, if(!issquarefree(n),return(0)); n \= base); (1); };
%o isA293523(n) = is_persistently_squarefree(n,3);
%o n=0; k=1; while(k <= 10000, n=n+1; if(isA293523(n),write("b293523.txt", k, " ", n);k=k+1));
%Y Subsequence of A005117.
%Y Cf. A001651, A293430.
%K nonn
%O 1,2
%A _Antti Karttunen_, Oct 11 2017