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.

Showing 1-4 of 4 results.

A052331 Inverse of A052330; A binary encoding of Fermi-Dirac factorization of n, shown in decimal.

Original entry on oeis.org

0, 1, 2, 4, 8, 3, 16, 5, 32, 9, 64, 6, 128, 17, 10, 256, 512, 33, 1024, 12, 18, 65, 2048, 7, 4096, 129, 34, 20, 8192, 11, 16384, 257, 66, 513, 24, 36, 32768, 1025, 130, 13, 65536, 19, 131072, 68, 40, 2049, 262144, 258, 524288, 4097, 514, 132, 1048576, 35
Offset: 1

Views

Author

Christian G. Bower, Dec 15 1999

Keywords

Comments

Every number can be represented uniquely as a product of numbers of the form p^(2^k), sequence A050376. This sequence is a binary representation of this factorization, with a(p^(2^k)) = 2^(i-1), where i is the index (A302778) of p^(2^k) in A050376. Additive with a(p^e) = sum a(p^(2^e_k)) where e = sum(2^e_k) is the binary representation of e and a(p^(2^k)) is as described above. - Franklin T. Adams-Watters, Oct 25 2005 - Index offset corrected by Antti Karttunen, Apr 17 2018

Examples

			n = 84 has Fermi-Dirac factorization A050376(5) * A050376(3) * A050376(2) = 7*4*3. Thus a(84) = 2^(5-1) + 2^(3-1) + 2^(2-1) = 16 + 4 + 2 = 22 ("10110" in binary = A182979(84)). - _Antti Karttunen_, Apr 17 2018
		

Crossrefs

Cf. A182979 (same sequence shown in binary).
One less than A064358.
Cf. also A156552.

Programs

  • PARI
    A052331=a(n)={for(i=1,#n=factor(n)~,n[2,i]>1||next; m=binary(n[2,i]); n=concat(n,Mat(vector(#m-1,j,[n[1,i]^2^(#m-j),m[j]]~)));n[2,i]%=2); n||return(0); m=vecsort(n[1,]); forprime(p=1,m[#m],my(j=0);while(p^2^j>1} \\ M. F. Hasler, Apr 08 2015
    
  • PARI
    up_to_e = 8192;
    v050376 = vector(up_to_e);
    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_e,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); }; \\ Antti Karttunen, Apr 12 2018

Formula

a(1)=0; a(n*A050376(k)) = a(n) + 2^k for a(n) < 2^k, k=0, 1, ... - Thomas Ordowski, Mar 23 2005
From Antti Karttunen, Apr 13 2018: (Start)
a(1) = 0; for n > 1, a(n) = A000079(A302785(n)-1) + a(A302776(n)).
For n > 1, a(n) = A000079(A302786(n)-1) * A302787(n).
a(n) = A064358(n)-1.
A000120(a(n)) = A064547(n).
A069010(a(n)) = A302790(n).
(End)

A302024 Permutation of natural numbers mapping "Fermi-Dirac factorization" to ordinary factorization: a(1) = 1, a(2*A300841(n)) = 2*a(n), a(A300841(n)) = A003961(a(n)).

Original entry on oeis.org

1, 2, 3, 5, 7, 4, 11, 6, 13, 10, 17, 9, 19, 14, 15, 23, 29, 22, 31, 25, 21, 26, 37, 8, 41, 34, 33, 35, 43, 12, 47, 38, 39, 46, 49, 55, 53, 58, 51, 18, 59, 20, 61, 65, 77, 62, 67, 57, 71, 74, 69, 85, 73, 28, 91, 30, 87, 82, 79, 27, 83, 86, 121, 95, 119, 44, 89, 115, 93, 50, 97, 42, 101, 94, 111, 145, 143, 52, 103, 133, 107, 106, 109, 45, 161
Offset: 1

Views

Author

Antti Karttunen, Apr 15 2018

Keywords

Comments

Because "Fermi-Dirac factorization" is fundamentally different from ordinary prime factorization (as no exponents larger than 1 are allowed) this pair of permutations mapping between them is not always very intuitive. For example, we have ("as expected") A302776(n) = A302023(A052126(A302024(n))), while on the other hand, we have A302792(n) = A300841(A302023(A032742(A302024(n)))), where an additional shift-operator A300841 is needed for "correction".

Crossrefs

Programs

  • PARI
    up_to = 32768;
    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));

Formula

a(n) = A005940(1+A052331(n)).
a(A050376(n)) = A000040(n).
A001221(a(n)) = A302790(n).
A001222(a(n)) = A064547(n).

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");

A302787 a(1) = 0; for n > 1, a(n) = A000265(A052331(n)).

Original entry on oeis.org

0, 1, 1, 1, 1, 3, 1, 5, 1, 9, 1, 3, 1, 17, 5, 1, 1, 33, 1, 3, 9, 65, 1, 7, 1, 129, 17, 5, 1, 11, 1, 257, 33, 513, 3, 9, 1, 1025, 65, 13, 1, 19, 1, 17, 5, 2049, 1, 129, 1, 4097, 257, 33, 1, 35, 9, 21, 513, 8193, 1, 7, 1, 16385, 3, 65, 17, 67, 1, 129, 1025, 25, 1, 37, 1, 32769, 2049, 257, 5, 131, 1, 33, 1, 65537, 1, 11, 65, 131073, 4097, 69, 1, 41, 9
Offset: 1

Views

Author

Antti Karttunen, Apr 13 2018

Keywords

Comments

After n=1, differs from A240535 (which gives the same terms, but with mirrored binary expansion) for the first time at n=30, where a(30) = 11, while A240535(30) = 13. Note how 11 = "1011" and 13 = "1101" in binary.
For all i, j: a(i) = a(j) => A302791(i) = A302791(j).

Crossrefs

Programs

  • PARI
    up_to = 8192;
    v050376 = vector(up_to);
    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); };
    A000265(n) = (n/2^valuation(n, 2));
    A302787(n) = if(1==n,0,A000265(A052331(n)));

Formula

a(1) = 0; for n > 1, a(n) = A000265(A052331(n)).
For n > 1, a(n) = A030101(A240535(n)).
For n >= 1, A069010(a(n)) = A302790(n).
Showing 1-4 of 4 results.