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.

A305978 Filter sequence combining prime signatures of n and 2n+1.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jun 15 2018

Keywords

Comments

Restricted growth sequence transform of A286258.

Crossrefs

Cf. A005384 (positions of 2's), A234095 (of 5's).

Programs

  • 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];