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.

A302791 A filter sequence for Fermi-Dirac factorization: restricted growth sequence transform of A046523(A302024(n)).

Original entry on oeis.org

1, 2, 2, 2, 2, 3, 2, 4, 2, 4, 2, 3, 2, 4, 4, 2, 2, 4, 2, 3, 4, 4, 2, 5, 2, 4, 4, 4, 2, 6, 2, 4, 4, 4, 3, 4, 2, 4, 4, 6, 2, 6, 2, 4, 4, 4, 2, 4, 2, 4, 4, 4, 2, 6, 4, 7, 4, 4, 2, 5, 2, 4, 3, 4, 4, 6, 2, 4, 4, 6, 2, 7, 2, 4, 4, 4, 4, 6, 2, 4, 2, 4, 2, 6, 4, 4, 4, 7, 2, 7, 4, 4, 4, 4, 4, 6, 2, 4, 3, 4, 2, 6, 2, 7, 6
Offset: 1

Views

Author

Antti Karttunen, Apr 15 2018

Keywords

Comments

For all i, j: a(i) = a(j) => A064547(i) = A064547(j).
For all i, j: a(i) = a(j) => A302790(i) = A302790(j).
See also comments in A302024.

Crossrefs

Cf. A037445, A046523, A050376 (gives the positions of 2's), A052331, A064547, A293442, A302024, A302787, A302790.

Programs

  • PARI
    allocatemem(2^30);
    up_to = 65537;
    v050376 = vector(up_to);
    A050376(n) = v050376[n];
    ispow2(n) = (n && !bitand(n,n-1));
    i = 0; for(n=1,oo,if(ispow2(isprimepower(n)), i++; v050376[i] = n); if(i == up_to,break));
    A052331(n) = { my(s=0,e); while(n > 1, fordiv(n, d, if(((n/d)>1)&&ispow2(isprimepower(n/d)), e = vecsearch(v050376, n/d); if(!e, print("v050376 too short!"); return(1/0)); s += 2^(e-1); n = d; break))); (s); };
    A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t }; \\ Modified from code of M. F. Hasler
    A302024(n) = A005940(1+A052331(n));
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ From A046523
    Aux302791(n) = A046523(A302024(n));
    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])); }
    write_to_bfile(1,rgs_transform(vector(up_to,n,Aux302791(n))),"b302791.txt");