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.

A291761 Restricted growth sequence transform of ((-1)^n)*A046523(n); filter combining the parity and the prime signature of n.

Original entry on oeis.org

1, 2, 3, 4, 3, 5, 3, 6, 7, 5, 3, 8, 3, 5, 9, 10, 3, 8, 3, 8, 9, 5, 3, 11, 7, 5, 12, 8, 3, 13, 3, 14, 9, 5, 9, 15, 3, 5, 9, 11, 3, 13, 3, 8, 16, 5, 3, 17, 7, 8, 9, 8, 3, 11, 9, 11, 9, 5, 3, 18, 3, 5, 16, 19, 9, 13, 3, 8, 9, 13, 3, 20, 3, 5, 16, 8, 9, 13, 3, 17, 21, 5, 3, 18, 9, 5, 9, 11, 3, 18, 9, 8, 9, 5, 9, 22, 3, 8, 16, 15, 3, 13, 3, 11, 23, 5, 3, 20, 3, 13
Offset: 1

Views

Author

Antti Karttunen, Sep 11 2017

Keywords

Comments

Equally, restricted growth sequence transform of sequence b defined as b(1) = 1, and for n > 1, b(n) = A046523(n) + A000035(n), which starts as 1, 2, 3, 4, 3, 6, 3, 8, 5, 6, 3, 12, 3, 6, 7, 16, 3, 12, 3, 12, ...

Crossrefs

Cf. A291767, A291768 (bisections), A147516.
Cf. A046523, A101296, A286161, A286251, A286367, A291762 (related or similar filtering sequences).
Cf. A065091 (positions of 3's), A100484 (of 4 and 5's), A001248 (of 4 and 7's), A046388 (of 9's), A030078 (of 6 and 12's).
Cf. A098108 (one of the matching sequences).

Programs

  • PARI
    rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };
    write_to_bfile(start_offset,vec,bfilename) = { for(n=1, length(vec), write(bfilename, (n+start_offset)-1, " ", vec[n])); }
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ This function from Charles R Greathouse IV, Aug 17 2011
    write_to_bfile(1,rgs_transform(vector(65537,n,((-1)^n)*A046523(n))),"b291761.txt");
    \\ Or alternatively:
    f(n) = if(1==n,n,A046523(n)+(n%2));
    write_to_bfile(1,rgs_transform(vector(16385,n,f(n))),"b291761.txt");