login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A291762 Restricted growth sequence transform of ((-1)^A000120(n))*A046523(n); filter combining the parity of binary weight with the prime signature of n. 3
1, 2, 3, 4, 3, 5, 2, 6, 7, 5, 2, 8, 2, 9, 5, 10, 3, 8, 2, 8, 9, 9, 3, 11, 4, 9, 12, 13, 3, 14, 2, 15, 5, 5, 9, 16, 2, 9, 5, 11, 2, 17, 3, 13, 8, 5, 2, 18, 4, 13, 5, 13, 3, 11, 9, 19, 5, 5, 2, 20, 2, 9, 8, 21, 5, 14, 2, 8, 9, 17, 3, 22, 2, 9, 8, 13, 5, 14, 2, 18, 10, 9, 3, 23, 5, 5, 9, 19, 3, 20, 9, 8, 9, 9, 5, 24, 2, 13, 8, 25, 3, 14, 2, 19, 14, 5, 2, 22, 2, 17 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Equally, restricted growth sequence transform of sequence b defined as b(1) = 1; b(n) = A046523(n) + A010060(n) for n > 1, which starts as 1, 3, 2, 5, 2, 6, 3, 9, 4, 6, 3, 12, 3, 7, 6, 17, 2, 12, 3, 12, 7, 7, ...
LINKS
PROG
(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)^hammingweight(n))*A046523(n))), "b291762_upto65537.txt");
\\ Or alternatively:
A010060(n) = (hammingweight(n)%2);
f(n) = if(1==n, n, A046523(n)+A010060(n));
write_to_bfile(1, rgs_transform(vector(16385, n, f(n))), "b291762.txt");
CROSSREFS
Cf. A101296, A286163, A291761 (related or similar filtering sequences).
Cf. A027697 (positions of 2's), A027699 (of 3's), A130593 (of 5's and 7's), A230095 (of 9's).
Cf. also A231431, A235001.
Sequence in context: A103672 A309255 A201443 * A235051 A322814 A324399
KEYWORD
nonn
AUTHOR
Antti Karttunen, Sep 11 2017
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 04:14 EDT 2024. Contains 371918 sequences. (Running on oeis4.)