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-6 of 6 results.

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).

A304535 Restricted growth sequence transform of A278222(A304533(n)).

Original entry on oeis.org

1, 2, 3, 2, 3, 2, 4, 2, 4, 5, 2, 4, 6, 4, 7, 3, 6, 4, 8, 4, 7, 9, 6, 10, 4, 6, 8, 5, 11, 6, 8, 2, 4, 6, 4, 6, 4, 5, 4, 5, 8, 2, 4, 6, 4, 6, 4, 6, 3, 6, 11, 3, 6, 12, 6, 9, 7, 9, 7, 10, 5, 11, 13, 11, 14, 6, 12, 15, 11, 13, 12, 16, 4, 5, 8, 5, 8, 5, 8, 6, 17, 5, 18, 5, 11, 19, 18, 20, 11, 19, 5, 8, 16, 8, 17, 2, 4, 5, 4, 5, 4, 5, 4, 5, 18, 4
Offset: 0

Views

Author

Antti Karttunen, May 15 2018

Keywords

Comments

For all i, j: a(i) = a(j) => A304536(i) = A304536(j).

Crossrefs

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).

A305979 Filter sequence for a(Fermi-Dirac primes) = constant sequences.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jul 02 2018

Keywords

Comments

For all i, j:
a(i) = a(j) => A305976(i) = A305976(j).
a(i) = a(j) => A302791(i) = A302791(j).

Crossrefs

Programs

  • PARI
    up_to = 100000;
    partialsums(f,up_to) = { my(v = vector(up_to), s=0); for(i=1,up_to,s += f(i); v[i] = s); (v); }
    A209229(n) = (n && !bitand(n, n-1));
    A302777(n) = A209229(isprimepower(n));
    v302778 = partialsums(A302777,up_to);
    A302778(n) = v302778[n];
    A305979(n) = if(1==n,n,if(1==A302777(n),2,1+n-A302778(n)));

Formula

a(1) = 1; for n > 1, if A302777(n) is 1 [when n is in A050376], a(n) = 2, otherwise a(n) = 1 + n - A302778(n) = running count from 3 onward.

A304097 Restricted growth sequence transform of A278222(A302853(n)).

Original entry on oeis.org

1, 2, 3, 2, 3, 2, 3, 2, 4, 5, 4, 6, 7, 2, 4, 5, 4, 5, 4, 6, 3, 5, 8, 5, 9, 4, 6, 7, 5, 10, 11, 10, 12, 2, 4, 5, 4, 5, 4, 5, 4, 11, 13, 11, 10, 14, 4, 11, 13, 11, 13, 11, 10, 5, 13, 15, 13, 16, 11, 10, 14, 13, 12, 17, 12, 2, 4, 11, 4, 5, 4, 5, 3, 5, 10, 6, 7, 9, 3, 5, 13, 5, 8, 5, 10, 6, 10, 14, 7, 16, 11, 13, 14, 13, 18, 2, 4, 5, 4, 5, 4, 5, 4, 11, 13, 11
Offset: 0

Views

Author

Antti Karttunen, May 17 2018

Keywords

Crossrefs

Compare also the scatter-plot to that of A304535.

Programs

  • PARI
    \\ Needs also code from A282291 and A302853:
    write_to_bfile(start_offset,vec,bfilename) = { for(n=1, length(vec), write(bfilename, (n+start_offset)-1, " ", vec[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; };
    A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t };
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ From A046523
    A278222(n) = A046523(A005940(1+n));
    write_to_bfile(0,rgs_transform(vector(60823,n,A278222(A302853(n-1)))),"b304097.txt");

A304744 Restricted growth sequence transform of A046523(A052330(n)).

Original entry on oeis.org

1, 2, 2, 3, 4, 5, 6, 7, 2, 3, 3, 8, 6, 7, 9, 10, 2, 3, 3, 8, 6, 7, 9, 10, 3, 8, 8, 11, 9, 10, 12, 13, 4, 6, 5, 7, 14, 15, 15, 16, 6, 9, 7, 10, 17, 18, 18, 19, 6, 9, 7, 10, 17, 18, 18, 19, 9, 12, 10, 13, 20, 21, 21, 22, 2, 3, 3, 8, 6, 7, 9, 10, 3, 8, 8, 11, 9, 10, 12, 13, 3, 8, 8, 11, 9, 10, 12, 13, 8, 11, 11, 23, 12, 13, 24, 25, 6, 9, 7, 10, 17, 18, 18, 19
Offset: 0

Views

Author

Antti Karttunen, May 27 2018

Keywords

Comments

For all i, j: a(i) = a(j) => A000120(i) = A000120(j).

Crossrefs

Programs

  • PARI
    up_to_e = 17; \\ Good for computing up to n = (2^up_to_e)-1
    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));
    A050376(n) = v050376[n];
    A052330(n) = { my(p=1,i=1); while(n>0, if(n%2, p *= A050376(i)); i++; n >>= 1); (p); };
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ From A046523
    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; };
    v304744 = rgs_transform(vector(65538,n,A046523(A052330(n-1))));
    A304744(n) = v304744[1+n];
Showing 1-6 of 6 results.