[go: up one dir, main page]

login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
Search: a305437 -id:a305437
Displaying 1-2 of 2 results found. page 1
     Sort: relevance | references | number | modified | created      Format: long | short | data
A305300 Ordinal transform of A305430, the smallest k > n whose binary expansion encodes an irreducible (0,1)-polynomial over Q. +10
3
1, 1, 1, 2, 1, 2, 1, 2, 3, 4, 1, 2, 1, 2, 3, 4, 1, 2, 1, 2, 3, 4, 1, 2, 1, 2, 3, 4, 1, 2, 1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 1, 2, 1, 2, 3, 4, 1, 2, 3, 4, 5, 6, 1, 2, 1, 2, 3, 4, 1, 2, 1, 2, 3, 4, 5, 6, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 1, 2, 1, 2, 1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 1, 2, 1, 2, 3 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
LINKS
FORMULA
a(1) = 1; for n > 1, if A257000(n) = 1 [when n is in A206074], a(n) = 1, otherwise a(n) = 1 + n - A305429(n).
MATHEMATICA
binPol[n_, x_] := With[{bb = IntegerDigits[n, 2]}, bb.x^Range[Length[bb]-1, 0, -1]];
ip[n_] := If[IrreduciblePolynomialQ[binPol[n, x]], 1, 0];
A305430[n_] := Module[{k = n + 1}, While[ip[k] == 0, k++]; k];
b[_] = 0;
a[n_] := a[n] = With[{t = A305430[n]}, b[t] = b[t]+1];
Array[a, 105] (* Jean-François Alcover, Dec 20 2021 *)
PROG
(PARI)
A257000(n) = polisirreducible(Pol(binary(n)));
A305429(n) = if(n<3, 1, my(k=n-1); while(k>1 && !A257000(k), k--); (k));
A305300(n) = if((1==n)||(1==A257000(n)), 1, 1+(n-A305429(n)));
(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; };
A305430(n) = { my(k=1+n); while(!A257000(k), k++); (k); };
v305300 = ordinal_transform(vector(up_to, n, A305430(n)));
A305300(n) = v305300[n];
CROSSREFS
Cf. A206074 (gives the positions of other 1's after the initial one).
Cf. also A175851.
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jun 09 2018
STATUS
approved
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. +10
3
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
COMMENTS
Ordinal transform of A305437.
LINKS
FORMULA
a(2n) = n.
EXAMPLE
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.
PROG
(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];
CROSSREFS
Cf. A206074 (gives a subset of the positions of 1's), A305437.
Cf. A305439.
Cf. also A078898, A302788.
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jun 09 2018
STATUS
approved
page 1

Search completed in 0.007 seconds

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 30 02:56 EDT 2024. Contains 375521 sequences. (Running on oeis4.)