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.

A292267 Restricted growth sequence transform of A292268; filter combining multiplicative order of 2 mod 2n+1 and the number of trailing 1's in binary expansion of 2n+1.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 5, 11, 12, 10, 13, 14, 15, 16, 17, 18, 12, 19, 7, 20, 21, 22, 23, 24, 25, 26, 27, 28, 7, 29, 30, 31, 32, 33, 34, 35, 36, 37, 9, 38, 39, 16, 15, 40, 41, 42, 43, 44, 7, 45, 17, 46, 13, 47, 7, 48, 49, 33, 43, 50, 51, 52, 25, 53, 54, 55, 56, 57, 13, 58, 59, 60, 61, 33, 23, 62, 63, 64, 12, 65, 66, 10, 67, 57, 68, 69, 70, 71, 17, 72, 25
Offset: 0

Views

Author

Antti Karttunen, Oct 02 2017

Keywords

Crossrefs

Cf. A291766, A291769 for related filters.

Programs

  • PARI
    allocatemem(2^30);
    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])); }
    A002326(n) = if(n<0, 0, znorder(Mod(2, 2*n+1))); \\ This function from Michael Somos, Mar 31 2005
    A007814(n) = valuation(n,2);
    A292268(n) = (1/2)*(2 + ((A002326(n)+A007814(2*(1+n)))^2) - A002326(n) - 3*A007814(2*(1+n)));
    write_to_bfile(0,rgs_transform(vector(32769,n,A292268(n-1))),"b292267_upto32768.txt");