login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A305978
Filter sequence combining prime signatures of n and 2n+1.
5
1, 2, 2, 3, 2, 4, 5, 6, 7, 8, 2, 9, 10, 4, 4, 11, 5, 12, 5, 12, 4, 13, 2, 14, 15, 4, 16, 17, 2, 18, 19, 20, 4, 8, 4, 21, 19, 8, 4, 22, 2, 23, 5, 12, 17, 8, 5, 24, 25, 12, 4, 26, 2, 27, 8, 27, 8, 13, 5, 28, 5, 29, 12, 30, 4, 23, 31, 12, 4, 23, 5, 32, 19, 4, 12, 33, 8, 18, 5, 34, 35, 36, 2, 28, 13, 4, 13, 37, 2, 38, 8, 17, 8, 39, 4, 40, 41, 12, 12, 42, 5, 23
OFFSET
1,2
COMMENTS
Restricted growth sequence transform of A286258.
LINKS
PROG
(PARI)
up_to = 65537;
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; };
A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); }; \\ From A046523
Aux305978(n) = [A046523(n), A046523(n+n+1)];
v305978 = rgs_transform(vector(up_to, n, Aux305978(n)));
A305978(n) = v305978[n];
CROSSREFS
Cf. A005384 (positions of 2's), A234095 (of 5's).
Sequence in context: A318839 A347664 A304105 * A305985 A319706 A305894
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jun 15 2018
STATUS
approved