cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A293523 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.

Original entry on oeis.org

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, 59, 65, 66, 67, 69, 70, 71, 91, 93, 94, 95, 101, 102, 103, 105, 106, 107, 138, 139, 141, 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
Offset: 1

Views

Author

Antti Karttunen, Oct 11 2017

Keywords

Comments

If there is any number present which itself is not divisible by 3 (is in A001651), then 3n is also present in this sequence.

Crossrefs

Subsequence of A005117.

Programs

  • PARI
    \\ A naivish algorithm:
    allocatemem(2^30);
    up_to_level = 10;
    up_to = (3^(1+up_to_level))-1;
    vekkuli = vector(up_to);
    vekkuli[1] = 1;
    vekkuli[2] = -1;
    write("b293523.txt", 1, " ", 1);
    write("b293523.txt", 2, " ", 2);
    kA293523 = 3; for(n=3,up_to, vekkuli[n] = moebius(n)*vekkuli[n\3]; if(vekkuli[n],write("b293523.txt", kA293523, " ", n); kA293523++;));
    
  • PARI
    is_persistently_squarefree(n,base) = { while(n>1, if(!issquarefree(n),return(0)); n \= base); (1); };
    isA293523(n) = is_persistently_squarefree(n,3);
    n=0; k=1; while(k <= 10000, n=n+1; if(isA293523(n),write("b293523.txt", k, " ", n);k=k+1));