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.

This page as a plain text file.
%I A291761 #17 Sep 11 2017 12:05:15
%S A291761 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,
%T A291761 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,
%U A291761 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
%N A291761 Restricted growth sequence transform of ((-1)^n)*A046523(n); filter combining the parity and the prime signature of n.
%C A291761 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, ...
%H A291761 Antti Karttunen, <a href="/A291761/b291761.txt">Table of n, a(n) for n = 1..65537</a>
%o A291761 (PARI)
%o A291761 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; };
%o A291761 write_to_bfile(start_offset,vec,bfilename) = { for(n=1, length(vec), write(bfilename, (n+start_offset)-1, " ", vec[n])); }
%o A291761 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
%o A291761 write_to_bfile(1,rgs_transform(vector(65537,n,((-1)^n)*A046523(n))),"b291761.txt");
%o A291761 \\ Or alternatively:
%o A291761 f(n) = if(1==n,n,A046523(n)+(n%2));
%o A291761 write_to_bfile(1,rgs_transform(vector(16385,n,f(n))),"b291761.txt");
%Y A291761 Cf. A291767, A291768 (bisections), A147516.
%Y A291761 Cf. A046523, A101296, A286161, A286251, A286367, A291762 (related or similar filtering sequences).
%Y A291761 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).
%Y A291761 Cf. A098108 (one of the matching sequences).
%K A291761 nonn
%O A291761 1,2
%A A291761 _Antti Karttunen_, Sep 11 2017