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

A302786 Index of the smallest Fermi-Dirac factor of n, a(1) = 0 by convention: a(n) = A302778(A223490(n)).

Original entry on oeis.org

0, 1, 2, 3, 4, 1, 5, 1, 6, 1, 7, 2, 8, 1, 2, 9, 10, 1, 11, 3, 2, 1, 12, 1, 13, 1, 2, 3, 14, 1, 15, 1, 2, 1, 4, 3, 16, 1, 2, 1, 17, 1, 18, 3, 4, 1, 19, 2, 20, 1, 2, 3, 21, 1, 4, 1, 2, 1, 22, 2, 23, 1, 5, 3, 4, 1, 24, 3, 2, 1, 25, 1, 26, 1, 2, 3, 5, 1, 27, 4, 28, 1, 29, 2, 4, 1, 2, 1, 30, 1, 5, 3, 2, 1, 4, 1, 31, 1, 6, 3, 32, 1, 33, 1, 2
Offset: 1

Views

Author

Antti Karttunen, Apr 13 2018

Keywords

Crossrefs

A left inverse of A050376.
Cf. A001511, A052331, A223490, A302778, A302785, A302787, A302788 (ordinal transform), A302789.
Cf. also A055396.

Programs

  • Mathematica
    nn = 105; t = {}; k = 1;
    While[lim = nn^(1/k); lim > 2,
         t = Join[t, Prime[Range[PrimePi[lim]]]^k]; k = 2 k];
    A050376 = Union[t];
    A223490[n_] := Table[{p, e} = pe; p^(2^IntegerExponent[e, 2]), {pe, FactorInteger[n]}] // Min;
    a[n_] := If[n == 1, 0, FirstPosition[A050376, A223490[n]][[1]]];
    Array[a, nn] (* Jean-François Alcover, Jan 08 2022, after T. D. Noe in A050376 *)
  • 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); };
    A001511(n) = 1+valuation(n,2);
    A302786(n) = if(1==n,0,A001511(A052331(n)));

Formula

a(n) = A302778(A223490(n)).
a(1) = 0; for n > 1, a(n) = A001511(A052331(n)).
For n >= 1, a(A050376(n)) = n.
For n > 1, A050376(a(n)) = A223490(n).

A302789 Number of times the largest Fermi-Dirac factor of n is the largest Fermi-Dirac factor for numbers <= n; a(1) = 1.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 3, 1, 2, 3, 1, 1, 2, 1, 4, 3, 2, 1, 4, 1, 2, 3, 4, 1, 5, 1, 2, 3, 2, 5, 4, 1, 2, 3, 6, 1, 6, 1, 4, 5, 2, 1, 3, 1, 2, 3, 4, 1, 6, 5, 7, 3, 2, 1, 7, 1, 2, 7, 4, 5, 6, 1, 4, 3, 8, 1, 8, 1, 2, 3, 4, 7, 6, 1, 5, 1, 2, 1, 9, 5, 2, 3, 8, 1, 9, 7, 4, 3, 2, 5, 6, 1, 2, 9, 4, 1, 6, 1, 8, 10
Offset: 1

Views

Author

Antti Karttunen, Apr 13 2018

Keywords

Comments

Ordinal transform of A223491, or equally, of A302785.

Crossrefs

Cf. A084400 (gives the positions of 1's).
Cf. also A078899.

Programs

  • Mathematica
    f[n_] := Max@Table[{p, e} = pe; p^(2^(Length[IntegerDigits[e, 2]]-1)), {pe, FactorInteger[n]}];
    b[_] = 1;
    a[n_] := a[n] = With[{t = f[n]}, b[t]++];
    Array[a, 105] (* Jean-François Alcover, Dec 18 2021 *)
  • PARI
    up_to = 65537;
    ordinal_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), pt); for(i=1, length(invec), if(mapisdefined(om,invec[i]), pt = mapget(om, invec[i]), pt = 0); outvec[i] = (1+pt); mapput(om,invec[i],(1+pt))); outvec; };
    ispow2(n) = (n && !bitand(n, n-1));
    A223491(n) = if(1==n,n,fordiv(n, d, if(ispow2(isprimepower(n/d)), return(n/d))));
    v302789 = ordinal_transform(vector(up_to,n,A223491(n)));
    A302789(n) = v302789[n];

A302785 Index of the largest Fermi-Dirac factor of n, a(1) = 0 by convention: a(n) = A302778(A223491(n)).

Original entry on oeis.org

0, 1, 2, 3, 4, 2, 5, 3, 6, 4, 7, 3, 8, 5, 4, 9, 10, 6, 11, 4, 5, 7, 12, 3, 13, 8, 6, 5, 14, 4, 15, 9, 7, 10, 5, 6, 16, 11, 8, 4, 17, 5, 18, 7, 6, 12, 19, 9, 20, 13, 10, 8, 21, 6, 7, 5, 11, 14, 22, 4, 23, 15, 6, 9, 8, 7, 24, 10, 12, 5, 25, 6, 26, 16, 13, 11, 7, 8, 27, 9, 28, 17, 29, 5, 10, 18, 14, 7, 30, 6, 8, 12, 15, 19, 11, 9, 31, 20, 7, 13, 32, 10, 33, 8, 5
Offset: 1

Views

Author

Antti Karttunen, Apr 13 2018

Keywords

Crossrefs

A left inverse of A050376.
Cf. A052331, A223491, A240535, A302778, A302786, A302788, A302789 (ordinal transform).
Cf. also A061395.

Programs

  • PARI
    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));
    A302785(n) = if(1==n,0, my(e); fordiv(n, d, if(ispow2(isprimepower(n/d)), e = vecsearch(v050376, n/d); if(e, return(e), print("v050376 too short!"); return(1/0)))));

Formula

a(n) = A302778(A223491(n)).
For n > 1, A050376(a(n)) = A223491(n).
For n >= 1, a(A050376(n)) = 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).

A305438 Number of times the lexicographically least irreducible factor of (0,1)-polynomial (when factored over Q) obtained from the binary expansion of n occurs as the lexicographically least factor for numbers <= n; a(1) = 1.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jun 09 2018

Keywords

Comments

Ordinal transform of A305437.

Examples

			Binary representation of 21 is "10101", encoding (0,1)-polynomial x^4 + x^2 + 1 which factorizes over Q as (x^2 - x + 1)(x^2 + x + 1). Factor (x^2 - x + 1) is lexicographically less than factor (x^2 + x + 1) and this is also the first time factor (x^2 - x + 1) occurs as the least one, thus a(21) = 1. Note that although we have the same factor present for n=9, which encodes the polynomial x^3 + 1 = (x + 1)(x^2 - x + 1), it is not the lexicographically least factor in that case.
The next time the same factor occurs as the smallest one is for n=93, which in binary is 1011101, encoding polynomial x^6 + x^4 + x^3 + x^2 + 1 = (x^2 - x + 1)(x^4 + x^3 + x^2 + x + 1). Thus a(93) = 2.
		

Crossrefs

Cf. A206074 (gives a subset of the positions of 1's), A305437.
Cf. A305439.
Cf. also A078898, A302788.

Programs

  • PARI
    allocatemem(2^30);
    default(parisizemax,2^31);
    up_to = 65537;
    ordinal_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), pt); for(i=1, length(invec), if(mapisdefined(om,invec[i]), pt = mapget(om, invec[i]), pt = 0); outvec[i] = (1+pt); mapput(om,invec[i],(1+pt))); outvec; };
    pollexcmp(a,b) = { my(ad = poldegree(a), bd = poldegree(b),e); if(ad != bd, return(sign(ad-bd))); for(i=0,ad,e = polcoeff(a,ad-i) - polcoeff(b,ad-i); if(0!=e, return(sign(e)))); (0); };
    Aux305438(n) = if(1==n,0,my(fs = factor(Pol(binary(n)))[,1]~); vecsort(fs,pollexcmp)[1]);
    v305438 = ordinal_transform(vector(up_to,n,Aux305438(n)));
    A305438(n) = v305438[n];

Formula

a(2n) = n.
Showing 1-5 of 5 results.