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.

Previous Showing 11-20 of 305 results. Next

A230213 Odious numbers (A000069) which can be written as a product of two evil numbers (A001969).

Original entry on oeis.org

25, 50, 69, 81, 87, 100, 115, 117, 138, 145, 162, 171, 174, 200, 213, 230, 234, 261, 265, 276, 285, 289, 290, 324, 333, 339, 342, 345, 348, 351, 355, 357, 369, 375, 385, 391, 400, 405, 415, 425, 426, 445, 460, 468, 475, 477, 493, 505, 522, 529, 530, 552, 555
Offset: 1

Views

Author

Vladimir Shevelev, Oct 11 2013

Keywords

Examples

			Odious number 100 equals 5*20, such that 5 and 20 are evil. So, 100 is in the sequence.
		

Crossrefs

Programs

  • Mathematica
    evilQ[n_] := EvenQ[DigitCount[n, 2][[1]]]; odiousQ[n_] := OddQ[DigitCount[n, 2][[1]]]; fQ[n_] := Module[{f, i}, If[PrimeQ[n], False, f = Select[Divisors[n], # > 1 && # <= Sqrt[n] &]; i = 1; While[i <= Length[f] && ! (evilQ[f[[i]]] && evilQ[n/f[[i]]]), i++]; i <= Length[f]]]; Select[Range[1000], odiousQ[#] && fQ[#] &] (* T. D. Noe, Oct 16 2013 *)

Extensions

Extended by T. D. Noe, Oct 16 2013

A230709 Union of even odious (cf. A128309) and evil numbers (cf. A001969).

Original entry on oeis.org

0, 2, 3, 4, 5, 6, 8, 9, 10, 12, 14, 15, 16, 17, 18, 20, 22, 23, 24, 26, 27, 28, 29, 30, 32, 33, 34, 36, 38, 39, 40, 42, 43, 44, 45, 46, 48, 50, 51, 52, 53, 54, 56, 57, 58, 60, 62, 63, 64, 65, 66, 68, 70, 71, 72, 74, 75, 76, 77, 78, 80, 82, 83, 84, 85, 86, 88
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 28 2013

Keywords

Comments

Apart from initial zero: numbers m, such that when mergesorting lists of length m, the maximal number of comparisons is odd: A003071(a(n+1)) = A230721(n).

Crossrefs

Cf. A092246 (complement).

Programs

  • Haskell
    a230709 n = a230709_list !! (n-1)
    a230709_list = filter (\x -> a010060 x * x `mod` 2 == 0) [0..]
    
  • Mathematica
    Complement[Range[0, m = 88], Select[Range[1, m, 2], OddQ[ Total[ IntegerDigits[#, 2]]]&]] (* Jean-François Alcover, Dec 15 2018 *)
  • PARI
    is(n)=if(hammingweight(n)%2,n%2==0,1) \\ Charles R Greathouse IV, May 09 2016

Formula

A010060(a(n)) * a(n) mod 2 = 0.

A246161 Permutation of positive integers: a(1) = 1, a(A014580(n)) = A000069(1+a(n)), a(A091242(n)) = A001969(1+a(n)), where A000069 and A001969 are the odious and evil numbers, and A014580 resp. A091242 are the binary coded irreducible resp. reducible polynomials over GF(2).

Original entry on oeis.org

1, 2, 4, 3, 5, 9, 8, 6, 10, 18, 7, 17, 11, 12, 20, 36, 15, 34, 19, 23, 24, 40, 72, 30, 16, 68, 39, 46, 48, 80, 13, 144, 60, 33, 136, 78, 21, 92, 96, 160, 37, 27, 288, 120, 66, 272, 14, 156, 43, 184, 192, 320, 75, 54, 35, 576, 240, 132, 22, 544, 25, 29, 312, 86, 368, 384, 41
Offset: 1

Views

Author

Antti Karttunen, Aug 17 2014

Keywords

Comments

This is an instance of entanglement permutation, where the two complementary pairs to be entangled with each other are A014580/A091242 (binary codes for irreducible and reducible polynomials over GF(2)) and A000069/A001969 (odious and evil numbers).
Because 3 is the only evil number in A014580, it implies that, apart from a(3)=4, odious numbers occur in odious positions only (along with many evil numbers that also occur in odious positions).
Note that the two values n=21 and n=35 given in the Example section both encode polynomials reducible over GF(2) and have an odd number of 1-bits in their binary representation (that is, they are both terms of A246158). As this permutation maps all terms of A091242 to the terms of A001969, and apart from a single exception 3 (which here is in a closed cycle: a(3) = 4, a(4) = 3), no term of A001969 is a member of A014580, so they must be members of A091242, thus successive iterations a(21), a(a(21)), a(a(a(21))), etc. always yield some evil number (A001969), so the cycle can never come back to 21 as it is an odious number, so that cycle must be infinite.
On the other hand, when we iterate with the inverse of this permutation, A246162, starting from 21, we see that its successive pre-images 37, 41, 67, 203, 5079 [e.g., 21 = a(a(a(a(a(5079)))))] are all irreducible and thus also odious.
In each such infinite cycle, there can be at most one term which is both reducible (in A091242) and odious (in A000069), i.e. in A246158, thus 21 and 35 must reside in different infinite cycles.
The sequence of fixed points begin as: 1, 2, 5, 19, 54, 71, 73, 865.
Question: apart from them and transposition (3 4) are there any more instances of finite cycles?

Examples

			Consider n=21. In binary it is 10101, encoding for polynomial x^4 + x^2 + 1, which factorizes as (x^2 + x + 1)(x^2 + x + 1) over GF(2), in other words, 21 = A048720(7,7). As such, it occurs as the 14th term in A091242, reducible polynomials over GF(2), coded in binary.
By definition of this permutation, a(21) is thus obtained as A001969(1+a(14)). 14 in turn is 8th term in A091242, thus a(14) = A001969(1+a(8)). In turn, 8 = A091242(4), thus a(8) = A001969(1+a(4)), and 4 = A091242(1).
By working the recursion back towards the toplevel, the result is a(21) = A001969(1+A001969(1+A001969(1+A001969(1+1)))) = 24.
Consider n=35. In binary it is 100011, encoding for polynomial x^5 + x + 1, which factorizes as (x^2 + x + 1)(x^3 + x^2 + 1) over GF(2), in other words, 35 = A048720(7,13). As such, it occurs as the 26th term in A091242, thus a(35) = A001969(1+a(26)), and as 26 = A091242(18) and 18 = A091242(12) and 12 = A091242(7) and 7 = A014580(3) [the polynomial x^2 + x + 1 is irreducible over GF(2)], and 3 = A014580(2) and 2 = A014580(1), we obtain the result as a(35) = A001969(1+A001969(1+A001969(1+A001969(1+A000069(1+A000069(1+A000069(2))))))) = 136.
		

Crossrefs

Formula

a(1) = 1, and for n > 1, if n is in A014580, a(n) = A000069(1+a(A091226(n))), otherwise a(n) = A001969(1+a(A091245(n))).
As a composition of related permutations:
a(n) = A233280(A245701(n)).
a(n) = A003188(A246201(n)).
a(n) = A234612(A246163(n)).
Other identities:
For all n > 1, A010060(a(n)) = A091225(n). [Maps binary representations of irreducible GF(2) polynomials (A014580) to odious numbers and the corresponding representations of reducible polynomials (A091242) to evil numbers, in some order].

A246162 Permutation of natural numbers: a(1) = 1, a(A000069(n)) = A014580(a(n-1)), a(A001969(n)) = A091242(a(n-1)), where A000069 and A001969 are the odious and evil numbers, and A014580 resp. A091242 are the binary coded irreducible resp. reducible polynomials over GF(2).

Original entry on oeis.org

1, 2, 4, 3, 5, 8, 11, 7, 6, 9, 13, 14, 31, 47, 17, 25, 12, 10, 19, 15, 37, 59, 20, 21, 61, 185, 42, 319, 62, 24, 87, 137, 34, 18, 55, 16, 41, 97, 27, 22, 67, 229, 49, 415, 76, 28, 103, 29, 109, 425, 78, 1627, 222, 54, 283, 3053, 373, 79, 433, 33, 131, 647, 108, 1123, 166, 45, 203, 26, 91, 379, 71, 23
Offset: 1

Views

Author

Antti Karttunen, Aug 17 2014. Erroneous comment corrected Aug 20 2014

Keywords

Comments

This is an instance of entanglement-permutation, where the two complementary pairs to be entangled with each other are A000069/A001969 (odious and evil numbers) and A014580/A091242 (binary codes for irreducible and reducible polynomials over GF(2)).
Because 3 is the only evil number in A014580, it implies that, apart from a(4)=3, all other odious positions contain an odious number. There are also odious numbers in some of the evil positions, precisely all the terms of A246158 in some order, together with all evil numbers larger than 3. (Permutation A246164 has the same property, except there a(7)=3.) See comments in A246161 for more details how this affects the cycle structure of these permutations.

Crossrefs

Formula

a(1) = 1, and for n > 1, if A010060(n) = 1 [i.e. n is one of the odious numbers, A000069], a(n) = A014580(a(A115384(n)-1)), otherwise, a(n) = A091242(a(A245710(n))).
As a composition of related permutations:
a(n) = A245702(A233279(n)).
a(n) = A246202(A006068(n)).
a(n) = A246164(A234612(n)).
For all n > 1, A091225(a(n)) = A010060(n). [Maps odious numbers to binary representations of irreducible GF(2) polynomials (A014580) and evil numbers to the corresponding representations of reducible polynomials (A091242), in some order].

A276445 Permutation of natural numbers: a(1) = 1, a(A087686(n)) = A001969(1+a(n-1)), a(A088359(n)) = A000069(1+a(n)), where A088359 & A087686 = numbers that occur only once & more than once in A004001, and A000069 & A001969 are odious & evil numbers.

Original entry on oeis.org

1, 3, 2, 6, 7, 4, 5, 12, 13, 14, 8, 15, 11, 9, 10, 24, 25, 26, 28, 16, 27, 31, 22, 29, 19, 17, 30, 21, 23, 18, 20, 48, 49, 50, 52, 56, 32, 51, 55, 62, 44, 53, 59, 38, 57, 35, 33, 54, 61, 42, 63, 47, 45, 58, 37, 39, 34, 60, 41, 43, 46, 36, 40, 96, 97, 98, 100, 104, 112, 64, 99, 103, 110, 124, 88, 101, 107, 118, 76, 105, 115, 70
Offset: 1

Views

Author

Antti Karttunen, Sep 03 2016

Keywords

Crossrefs

Inverse: A276446.
Similar or related permutations: A003188, A267111, A276443 (compare the scatter plots).

Programs

Formula

a(1) = 1; for n > 1, if A093879(n-1) = 0 [when n is in A087686], a(n) = A001969(1+a(A080677(n)-1)), otherwise [when n is in A088359], a(n) = A000069(1+a(A004001(n)-1)).
As a composition of other permutations:
a(n) = A003188(A267111(n)).

A374590 Numbers whose maximum exponent in their prime factorization is an evil number (A001969).

Original entry on oeis.org

8, 24, 27, 32, 40, 54, 56, 64, 72, 88, 96, 104, 108, 120, 125, 135, 136, 152, 160, 168, 184, 189, 192, 200, 216, 224, 232, 243, 248, 250, 264, 270, 280, 288, 296, 297, 312, 320, 328, 343, 344, 351, 352, 360, 375, 376, 378, 392, 408, 416, 424, 440, 448, 456, 459
Offset: 1

Views

Author

Amiram Eldar, Jul 12 2024

Keywords

Comments

The asymptotic density of this sequence is Sum_{k in A001969} (1/zeta(k+1) - 1/zeta(k)) = 0.12101890210392912747... .

Crossrefs

Subsequence of A013929 and A262675 \ {1}.
Similar sequences: A368714, A369937, A369938, A369939, A374588, A374589.

Programs

  • Mathematica
    evilQ[n_] := EvenQ[DigitCount[n, 2, 1]]; q[n_] := evilQ[Max[FactorInteger[n][[;; , 2]]]]; Select[Range[500], q]
  • PARI
    is(n) = n > 1 && !(hammingweight(vecmax(factor(n)[, 2])) % 2);

A133009 One defining property of the sequences {A, B} = {A000069, A001969} is that they are the unique pair of sets complementary with respect to the nonnegative integers such that q(n) = |{x : x, y in A, x < y, x + y = n}| = |{x : x, y in B, x < y, x + y = n}| for all n >= 0. The present sequence gives the values of q(n).

Original entry on oeis.org

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

Views

Author

David W. Wilson, Dec 21 2007

Keywords

Crossrefs

A230386 Least sum of a set of n evil numbers (A001969) such that any two or more add to an odious number (A000069).

Original entry on oeis.org

0, 8, 31, 64, 191, 1797, 18463
Offset: 1

Views

Author

Vladimir Shevelev and M. F. Hasler, Oct 17 2013

Keywords

Comments

Row sums of A230385: see there for the corresponding sets. See A230387 for a "dual" version.
Is this sequence finite, or is there for any n at least one admissible set of n evil numbers, i.e., such that any sum of two or more elements add up to an odious number?
By definition, this is a subsequence of the odious numbers A000069.

Examples

			The table A230385 reads
n=1: {0} with sum = 0,
n=2: {3, 5} with sum = 8,
n=3: {5, 9, 17} or {9, 10, 12} with sum = 31,
n=4: {5, 9, 17, 33} with sum = 64,
n=5: {33, 34, 36, 40, 48} with sum = 191,
n=6: {257, 264, 278, 288, 326, 384} with sum = 1797.
For example, for n=4, all 11 numbers 5+9=14, 5+17=22, 5+33=38, 9+17=26, 9+33=42, 17+33=50, 5+9+17=31, 5+9+33=47, 5+17+33=55, 9+17+33=59, 5+9+17+33=64 are odious.
n=7: {801, 802, 804, 808, 816, 4896, 9536} with sum = 18463.
		

Programs

  • PARI
    (is_A69=n->bittest(hammingweight(n),0)); A1969=select(n->!is_A69(n), vector(1600,n,n)) /* no 0 here! */; A230386(n,m=9e9)={ local(v=vector(n,i,i), ve=vector(n,i,A1969[i]), t=0, s=vector(n,i,if(i>1,A230386(i-1))), S(v)=sum(j=1,#v,v[j]), ok(e)=!forstep(i=3,2^#e-1,2, is_A69( S( vecextract( e,i )))||return), inc(i)=for(j=1,n-i,v[j]=j); for(j=n-i+1,n-1, v[j]++S(ve) && /*print*/([m=S(ve),ve]); inc(n));m} /* This code is very fast up to n=5 and much too slow for n>5. */

Extensions

a(6) added by M. F. Hasler, Oct 18 2013
a(7) from Donovan Johnson, Oct 27 2013

A230454 Smallest odious number (A000069) that can be written as a product of n, but not fewer than n, evil numbers (A001969).

Original entry on oeis.org

25, 575, 51175, 4554575, 405357175
Offset: 2

Views

Author

Keywords

Comments

This sequence is a subsequence of the sequence {b(n)} defined as follows:
"Odious numbers which can be written as a product of evil numbers." It differs from A230213 only at the 56th term (b(56) = a(3) = 575).
An algorithm for calculation of {b(n)} is the following: Consider an odious number n. Let d_1 be the smallest evil divisor of n (if n does not have an evil divisor, then n is not in {b(n)}). If n/d_1 is either evil or odious but is already in {b(n)}, then n is in this sequence. If n/d_1 is odious and not in the sequence, then we consider the following evil divisor d_2 > d_1 (if d_2 does not exist, then n is not in {b(n)}). If n/d_2 is either evil or odious but already in this sequence, then n is in {b(n)}, etc. Formally, by a continuation of {b(n)} sufficiently far, we can calculate terms a(k), k=2,3,4,... A direct calculation for an upper limit of, say, a(4) is connected with the finding of 4 evil primes p,q,r,s with the smallest possible product, such that all 11 numbers p*q, p*r, p*s, q*r, q*s, r*s, p*q*r, p*q*s, p*r*s, q*r*s, p*q*r*s are odious. In this case we find p=5, q=5, r=23, s=89, such that a(4) = 5*5*23*89 = 51175.
10^8 < a(6) <= 405357175. - Robert Israel, Jul 18 2025
If bigomega(a(7)) = 7 then a(7) > 10^12. - David A. Corneth, Jul 21 2025

Crossrefs

Programs

  • Maple
    f:= proc(n) # least k such that n is the product of k evil numbers
    option remember;
    local t,r,x;
    if convert(convert(n,base,2),`+`)::even then return 1 fi;
    t:= infinity;
    for x in select(s -> s^2 <= n, numtheory:-divisors(n)) minus {1} do
      t:= min(t, procname(x) + procname(n/x))
    od;
    t
    end proc:
    V:= Array(1..5): count:= 0:
    for n from 1 while count < 5 do
      v:= f(n);
      if v <= 5 and V[v] = 0 then V[v]:= n; count:= count+1; fi
    od:
    convert(V,list); # Robert Israel, Jul 18 2025

Extensions

a(6) from David A. Corneth, Jul 21 2025

A248138 Consider the partition of consecutive evil numbers (A001969) into minimal blocks such that concatenation of numbers in each block is an odious number (A000069). Sequence lists numbers of evil numbers in each block.

Original entry on oeis.org

3, 2, 2, 3, 2, 3, 4, 2, 2, 5, 2, 5, 3, 2, 2, 2, 2, 2, 6, 4, 3, 6, 4, 7, 4, 5, 3, 4, 3, 2, 3, 3, 4, 2, 2, 2, 2, 2, 2, 2, 4, 3, 3, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 5, 2, 3, 5, 2, 3, 3, 6, 2, 4, 5, 2, 2, 2, 2, 3, 2, 3, 2, 2, 2, 2, 2, 2, 3, 2, 3, 2, 4, 3, 2, 2, 2, 3
Offset: 1

Views

Author

Keywords

Comments

The blocks of consecutive evil numbers of the partition are
0,3,5| 6,9| 10,12| 15,17,18| 20,23| 24,27,29| 30,33,34,36| 39,40| 43,45| 46,48,51,53,54| 57,58| 60,63,65,66,68|, etc.

Crossrefs

Previous Showing 11-20 of 305 results. Next