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-10 of 43 results. Next

A300841 Fermi-Dirac factorization prime shift towards larger terms: a(n) = A052330(2*A052331(n)).

Original entry on oeis.org

1, 3, 4, 5, 7, 12, 9, 15, 11, 21, 13, 20, 16, 27, 28, 17, 19, 33, 23, 35, 36, 39, 25, 60, 29, 48, 44, 45, 31, 84, 37, 51, 52, 57, 63, 55, 41, 69, 64, 105, 43, 108, 47, 65, 77, 75, 49, 68, 53, 87, 76, 80, 59, 132, 91, 135, 92, 93, 61, 140, 67, 111, 99, 85, 112, 156, 71, 95, 100, 189, 73, 165, 79, 123, 116, 115, 117, 192, 81
Offset: 1

Views

Author

Antti Karttunen, Apr 12 2018

Keywords

Comments

With n having a unique factorization as A050376(i) * A050376(j) * ... * A050376(k), with i, j, ..., k all distinct, a(n) = A050376(1+i) * A050376(1+j) * ... * A050376(1+k).
Multiplicative because for coprime m and n the Fermi-Dirac factorizations of m and n are disjoint and their union is the Fermi-Dirac factorization of m * n. - Andrew Howroyd, Aug 02 2018

Examples

			For n = 6 = A050376(1)*A050376(2), a(6) = A050376(2)*A050376(3) = 3*4 = 12.
For n = 12 = A050376(2)*A050376(3), a(12) = A050376(3)*A050376(4) = 4*5 = 20.
		

Crossrefs

Cf. A050376, A052330, A052331, A059897, A300840 (a left inverse).
Cf. also A003961.
Range of values is A003159.

Programs

  • Mathematica
    fdPrimeQ[n_] := Module[{f = FactorInteger[n], e}, Length[f] == 1 && (2^IntegerExponent[(e = f[[1, 2]]), 2] == e)];
    nextFDPrime[n_] := Module[{k = n + 1}, While[! fdPrimeQ[k], k++]; k];
    fd[p_, e_] := Module[{b = IntegerDigits[e, 2]}, m = Length[b]; Table[If[b[[j]] > 0, p^(2^(m - j)), Nothing], {j, 1, m}]];
    a[n_] := Times @@ nextFDPrime /@ Flatten[fd @@@ FactorInteger[n]]; a[1] = 1; Array[a, 100] (* Amiram Eldar, Sep 07 2023 *)
  • PARI
    up_to_e = 8192;
    v050376 = vector(up_to_e);
    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_e,break));
    A052330(n) = { my(p=1,i=1); while(n>0, if(n%2, p *= A050376(i)); i++; n >>= 1); (p); };
    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); };
    A300841(n) = A052330(2*A052331(n));

Formula

a(n) = A052330(2*A052331(n)).
For all n >= 1, a(A050376(n)) = A050376(1+n).
For all n >= 1, A300840(a(n)) = n.
a(A059897(n,k)) = A059897(a(n), a(k)). - Peter Munn, Nov 23 2019

A300840 Fermi-Dirac factorization prime shift towards smaller terms: a(n) = A052330(floor(A052331(n)/2)).

Original entry on oeis.org

1, 1, 2, 3, 4, 2, 5, 3, 7, 4, 9, 6, 11, 5, 8, 13, 16, 7, 17, 12, 10, 9, 19, 6, 23, 11, 14, 15, 25, 8, 29, 13, 18, 16, 20, 21, 31, 17, 22, 12, 37, 10, 41, 27, 28, 19, 43, 26, 47, 23, 32, 33, 49, 14, 36, 15, 34, 25, 53, 24, 59, 29, 35, 39, 44, 18, 61, 48, 38, 20, 67, 21, 71, 31, 46, 51, 45, 22, 73, 52, 79, 37, 81, 30, 64, 41, 50, 27
Offset: 1

Views

Author

Antti Karttunen, Apr 13 2018

Keywords

Comments

With n having a unique factorization as fdp(i) * fdp(j) * ... * fdp(k), with i, j, ..., k all distinct, a(n) = fdp(i-1) * fdp(j-1) * ... * fdp(k-1), where fdp(0) = 1 and fdp(n) = A050376(n) for n >= 1.
Multiplicative because for coprime m and n the Fermi-Dirac factorizations of m and n are disjoint and their union is the Fermi-Dirac factorization of m * n. - Andrew Howroyd, Aug 02 2018

Crossrefs

A left inverse of A300841.
Cf. also A064989.

Programs

  • Mathematica
    fdPrimeQ[n_] := Module[{f = FactorInteger[n], e}, Length[f] == 1 && (2^IntegerExponent[(e = f[[1, 2]]), 2] == e)];
    prevFDPrime[n_] := Module[{k = n - 1}, While[! fdPrimeQ[k], k--]; k];
    fd[p_, e_] := Module[{b = IntegerDigits[e, 2]}, m = Length[b]; Table[If[b[[j]] > 0, p^(2^(m - j)), Nothing], {j, 1, m}]];
    a[n_] := Times @@ prevFDPrime /@ Flatten[fd @@@ FactorInteger[n]]; a[1] = 1; Array[a, 100] (* Amiram Eldar, Sep 07 2023 *)
  • PARI
    up_to_e = 8192;
    v050376 = vector(up_to_e);
    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_e,break));
    A052330(n) = { my(p=1,i=1); while(n>0, if(n%2, p *= A050376(i)); i++; n >>= 1); (p); };
    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); };
    A300840(n) = A052330(A052331(n)>>1);

Formula

a(n) = A052330(floor(A052331(n)/2)).
For all n >= 1, a(A300841(n)) = n.
a(A059897(n,k)) = A059897(a(n), a(k)). - Peter Munn, Nov 30 2019

A304533 Suspected permutation of nonnegative integers: a(n) = A052331(A304531(1+n)).

Original entry on oeis.org

0, 1, 3, 2, 6, 4, 36, 32, 33, 41, 8, 9, 11, 10, 14, 12, 44, 40, 45, 5, 7, 15, 13, 47, 34, 35, 43, 42, 46, 38, 4134, 4096, 4097, 4099, 4098, 4102, 4100, 4132, 4128, 4129, 4145, 16, 17, 19, 18, 22, 20, 52, 48, 49, 57, 24, 25, 27, 26, 30, 28, 60, 56, 61, 21, 23, 31, 29, 63, 50, 51, 59, 58, 62, 54, 4150, 4112, 4113, 4115, 4114, 4118, 4116, 4148, 4144, 4149, 37
Offset: 0

Views

Author

Antti Karttunen, May 14 2018

Keywords

Comments

All nonnegative integers occur provided that A304531 is a permutation of natural numbers.
Shares with sequences like A003188, A006068, A300838, A302846, A303765, A303767 and A304083 the property that when moving from any a(n) to a(n+1) either a subset of 0-bits are toggled on (changed to 1's), or a subset of 1-bits are toggled off (changed to 0's), but no both kind of changes may occur at the same step.

Crossrefs

Cf. A304534 (inverse).

Programs

Formula

a(n) = A052331(A304531(1+n)).
For all n >= 0, A000120(a(n)) = A304536(n), A019565(a(n)) = A304537(n).

A302029 Inverse permutation of A207901: a(n) = A006068(A052331(n)).

Original entry on oeis.org

0, 1, 3, 7, 15, 2, 31, 6, 63, 14, 127, 4, 255, 30, 12, 511, 1023, 62, 2047, 8, 28, 126, 4095, 5, 8191, 254, 60, 24, 16383, 13, 32767, 510, 124, 1022, 16, 56, 65535, 2046, 252, 9, 131071, 29, 262143, 120, 48, 4094, 524287, 508, 1048575, 8190, 1020, 248, 2097151, 61, 112, 25, 2044, 16382, 4194303, 11, 8388607, 32766, 32
Offset: 1

Views

Author

Antti Karttunen, Apr 13 2018

Keywords

Crossrefs

Inverse of A207901.
One less than A302030.

Programs

  • PARI
    up_to = 4096;
    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); };
    A006068(n)= { my(s=1, ns); while(1, ns = n >> s; if(0==ns, break()); n = bitxor(n, ns); s <<= 1; ); return (n); } \\ From A006068
    A302029(n) = A006068(A052331(n));

Formula

a(n) = A006068(A052331(n)).

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

A302790 Number of runs of consecutive Fermi-Dirac factors of n (the runs are separated by gaps between indices of factors): a(n) = A069010(A052331(n)).

Original entry on oeis.org

0, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 2, 2, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 2, 2, 2, 1, 2, 1, 2, 2, 2, 1, 2, 1, 2, 2, 2, 1, 2, 1, 2, 2, 2, 1, 2, 1, 2, 2, 2, 1, 2, 2, 3, 2, 2, 1, 1, 1, 2, 1, 2, 2, 2, 1, 2, 2, 2, 1, 3, 1, 2, 2, 2, 2, 2, 1, 2, 1, 2, 1, 2, 2, 2, 2, 3, 1, 3, 2, 2, 2, 2, 2, 2, 1, 2, 1, 2, 1, 2, 1, 3, 2
Offset: 1

Views

Author

Antti Karttunen, Apr 13 2018

Keywords

Examples

			n = 84 has Fermi-Dirac factorization as A050376(2) * A050376(3) * A050376(5) = 3*4*7. Because there is a gap between A050376(3) and A050376(5), the factors occur in two separate runs (3*4 and 7), thus a(84) = 2.
		

Crossrefs

Programs

  • PARI
    up_to = 65537;
    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); };
    A069010(n) = ((1 + (hammingweight(bitxor(n, n>>1)))) >> 1); \\ From A069010
    A302790(n) = A069010(A052331(n));

Formula

a(n) = A069010(A052331(n)).
a(n) = A069010(A302787(n)).
a(n) = A001221(A302024(n)).
For all n >= 1, a(n) <= A064547(n).

A302853 Suspected permutation of nonnegative integers: a(n) = A052331(A282291(1+n)).

Original entry on oeis.org

0, 1, 3, 2, 6, 4, 12, 8, 9, 11, 10, 14, 30, 16, 17, 19, 18, 22, 20, 28, 24, 25, 27, 26, 31, 5, 7, 15, 13, 29, 21, 23, 87, 64, 65, 67, 66, 70, 68, 76, 72, 73, 75, 74, 78, 94, 80, 81, 83, 82, 86, 84, 92, 88, 89, 91, 90, 95, 69, 71, 79, 77, 93, 85, 117, 32, 33, 41, 40, 44, 36, 52, 48, 49, 57, 56, 60, 124, 96, 97, 105, 104, 108, 100, 116, 112, 113, 121, 120, 125
Offset: 0

Views

Author

Antti Karttunen, May 17 2018

Keywords

Comments

Shares with sequences like A003188, A006068, A300838, A302846, A303765, A303767, A304083 and A304533 the property that when moving from any a(n) to a(n+1) either a subset of 0-bits are toggled on (changed to 1's), or a subset of 1-bits are toggled off (changed to 0's), but no both kind of changes may occur at the same step.

Crossrefs

Cf. A302854 (inverse).
Cf. also A304533.

Programs

  • PARI
    up_to_e = 2^15;
    v050376 = vector(up_to_e);
    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_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); };
    A302853(n) = A052331(A282291(1+n)); \\ Needs also code from A282291.

Formula

a(n) = A052331(A282291(1+n)).

A302784 Inverse permutation to A302783: a(n) = A003188(A052331(n)).

Original entry on oeis.org

0, 1, 3, 6, 12, 2, 24, 7, 48, 13, 96, 5, 192, 25, 15, 384, 768, 49, 1536, 10, 27, 97, 3072, 4, 6144, 193, 51, 30, 12288, 14, 24576, 385, 99, 769, 20, 54, 49152, 1537, 195, 11, 98304, 26, 196608, 102, 60, 3073, 393216, 387, 786432, 6145, 771, 198, 1572864, 50, 108, 31, 1539, 12289, 3145728, 9, 6291456, 24577, 40, 390, 204, 98, 12582912, 774, 3075, 21
Offset: 1

Views

Author

Antti Karttunen, Apr 16 2018

Keywords

Crossrefs

Cf. A302783 (inverse).
Cf. also A302029.

Programs

  • PARI
    up_to = 4096;
    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); };
    A003188(n) = bitxor(n, n>>1);
    A302784(n) = A003188(A052331(n));

Formula

a(n) = A003188(A052331(n)).

A302030 a(n) = 1+A006068(A052331(n)).

Original entry on oeis.org

1, 2, 4, 8, 16, 3, 32, 7, 64, 15, 128, 5, 256, 31, 13, 512, 1024, 63, 2048, 9, 29, 127, 4096, 6, 8192, 255, 61, 25, 16384, 14, 32768, 511, 125, 1023, 17, 57, 65536, 2047, 253, 10, 131072, 30, 262144, 121, 49, 4095, 524288, 509, 1048576, 8191, 1021, 249, 2097152, 62, 113, 26, 2045, 16383, 4194304, 12, 8388608, 32767, 33, 505, 241, 126
Offset: 1

Views

Author

Antti Karttunen, Apr 13 2018

Keywords

Comments

This is the inverse of A207901 if it is considered with a starting offset 1.

Crossrefs

One more than A302029.

Programs

  • 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); };
    A006068(n)= { my(s=1, ns); while(1, ns = n >> s; if(0==ns, break()); n = bitxor(n, ns); s <<= 1; ); return (n); } \\ After code in A006068
    A302030(n) = (1+A006068(A052331(n)));

Formula

a(n) = 1+A302029(n) = 1+A006068(A052331(n)).

A064359 Inverse of sequence A052331 considered as a permutation of the natural numbers.

Original entry on oeis.org

1, 2, 5, 3, 7, 11, 23, 4, 9, 14, 29, 19, 39
Offset: 1

Views

Author

Howard A. Landman, Sep 25 2001

Keywords

Comments

Sequence A052331 claims to be the "inverse" of A052330.

Crossrefs

Showing 1-10 of 43 results. Next