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 21-30 of 309 results. Next

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

A276443 Permutation of natural numbers: a(1) = 1, a(A087686(n)) = A000069(1+a(n-1)), a(A088359(n)) = A001969(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, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 11, 15, 13, 14, 16, 17, 18, 20, 24, 19, 23, 30, 21, 27, 25, 22, 29, 31, 26, 28, 32, 33, 34, 36, 40, 48, 35, 39, 46, 60, 37, 43, 54, 41, 51, 49, 38, 45, 58, 47, 63, 61, 42, 53, 55, 50, 44, 57, 59, 62, 52, 56, 64, 65, 66, 68, 72, 80, 96, 67, 71, 78, 92, 120, 69, 75, 86, 108, 73, 83, 102, 81
Offset: 1

Views

Author

Antti Karttunen, Sep 03 2016

Keywords

Crossrefs

Inverse: A276444.
Similar or related permutations: A003188, A276441, A276445 (compare the scatter plots).

Programs

Formula

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

A355968 a(n) is the smallest number that has exactly n odious divisors (A000069).

Original entry on oeis.org

1, 2, 4, 8, 16, 28, 64, 56, 84, 112, 1024, 168, 4096, 448, 336, 728, 36309, 672, 57057, 1456, 1344, 7168, 105105, 2184, 6384, 24150, 5376, 5208, 405405, 4368, 389025, 11648, 20020, 72618, 10416, 8736, 927675, 114114, 48300, 24024, 855855, 17472, 1426425, 40040
Offset: 1

Views

Author

Bernard Schott, Jul 21 2022

Keywords

Comments

a(n) <= 2^(n-1) with equality for n = 1, 2, 3, 4, 5, 7, 11, 13 up to a(44).

Examples

			a(6) = 28 since 28 has 6 divisors {1, 2, 4, 7, 14, 28} that have all an odd number of 1's in their binary expansion: 1, 10, 100, 111, 1110 and 11100; also, no positive integer smaller than 28 has six divisors that are odious.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := DivisorSum[n, 1 &, OddQ[DigitCount[#, 2, 1]] &]; seq[len_, nmax_] := Module[{s = Table[0, {len}], c = 0, n = 1, i}, While[c < len && n < nmax, i = f[n]; If[i <= len && s[[i]] == 0, c++; s[[i]] = n]; n++]; s]; seq[20, 10^6] (* Amiram Eldar, Jul 21 2022 *)
  • PARI
    isod(n) = hammingweight(n) % 2; \\ A000069
    a(n) = my(k=1); while (sumdiv(k, d, isod(d)) != n, k++); k; \\ Michel Marcus, Jul 22 2022
    
  • Python
    from sympy import divisors
    from itertools import count, islice
    def c(n): return bin(n).count("1")&1
    def f(n): return sum(1 for d in divisors(n, generator=True) if c(d))
    def agen():
        n, adict = 1, dict()
        for k in count(1):
            fk = f(k)
            if fk not in adict: adict[fk] = k
            while n in adict: yield adict[n]; n += 1
    print(list(islice(agen(), 36))) # Michael S. Branicky, Jul 25 2022

Extensions

More terms from Amiram Eldar, Jul 21 2022

A129676 Permutation sequence generated by the "odious numbers" (A000069), by swapping n-th natural number by the (n-g)-th sequentially, where g=min(odious(n+1)-odious(n)-1,n-1).

Original entry on oeis.org

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

Views

Author

Ferenc Adorjan (fadorjan(AT)freemail.hu or ferencadorjan(AT)gmail.com), May 01 2007

Keywords

Comments

In contrast to A128754 and A128756 (which are generated analogously from the primes and the lucky numbers, respectively), this sequence seems consisting solely of fixed points and cycles of length 4,5 and 6. It is also notable that the difference of the number of fixed points and the number of cycles never differs by more than 3, up to index 10000, according to numerical tests. Thus the ratio of the number of fixed points to the number of cycles seems to be asymptotically equal to unity.

Crossrefs

Programs

  • PARI
    {vperm(z)=local(n,m,q,v,x,j,g);
    /* Permutation of positive integers so that starting with the sequence of positive integers, sequentially swap the i-th term with max(i-g(i),1)-th term, where g(i)=z[i+1]-z[i]-1. */
    j=matsize(z)[2]-1;n=j-z[j]+z[j-6];v=vector(j);x=vector(n);for(i=1,j,v[i]=i);
    for(i=1,j,g=min(z[i+1]-z[i]-1,i-1);q=v[i];v[i]=v[i-g];v[i-g]=q);for(i=1,n,x[i]=v[i]);return(x)}
    a=vperm(A000069)

A223024 Numbers k such that 3^k is odious (A000069).

Original entry on oeis.org

0, 4, 7, 10, 11, 13, 15, 16, 19, 20, 22, 28, 29, 30, 34, 36, 41, 43, 46, 48, 49, 50, 53, 54, 56, 62, 63, 65, 66, 67, 68, 69, 80, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 97, 98, 100, 101, 103, 107, 108, 110, 111, 113, 114, 115, 117, 118, 119, 120
Offset: 1

Views

Author

Vladimir Shevelev, Mar 29 2013

Keywords

Crossrefs

Complement of A371970.

Programs

  • Maple
    select(t -> convert(convert(3^t,base,2),`+`)::odd, [$0..200]); # Robert Israel, Oct 10 2016
  • Mathematica
    Select[Range[0,200], OddQ[DigitCount[3^#,2][[1]]]&] (* Peter J. C. Moses, Mar 30 2013 *)
  • PARI
    isok(n) = (hammingweight(3^n) % 2) == 1; \\ Michel Marcus, Oct 11 2016

A230226 Odd odious numbers (A000069) which can be written as a product of two odious numbers > 1.

Original entry on oeis.org

49, 91, 121, 133, 143, 217, 247, 259, 273, 341, 361, 385, 403, 451, 475, 481, 511, 517, 539, 589, 611, 625, 637, 651, 665, 671, 721, 737, 749, 767, 775, 779, 793, 803, 805, 847, 861, 871, 875, 889, 925, 949, 959, 961, 1001, 1015, 1027, 1029, 1053, 1057, 1067
Offset: 1

Views

Author

Vladimir Shevelev, Oct 12 2013

Keywords

Examples

			From _Bernard Schott_, Sep 23 2019: (Start)
49 = 7 * 7 with 7 = 111_2 and 49 = 110001_2 hence 49 is a term.
91 = 7 * 13 with 7 = 111_2, 13 = 1101_2 and 91 = 1011011_2, hence 91 is a term. (End)
		

Crossrefs

Programs

  • Mathematica
    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] && ! (odiousQ[f[[i]]] && odiousQ[n/f[[i]]]), i++]; i <= Length[f]]]; Select[Range[1, 1000, 2], odiousQ[#] && fQ[#] &] (* T. D. Noe, Oct 16 2013 *)

Extensions

Extended by T. D. Noe, Oct 16 2013

A230385 Table read by rows: Least set of n evil numbers (A001969) such that any two or more add up to an odious number (A000069); ordered by total sum of the elements, then by the size of the largest element(s).

Original entry on oeis.org

0, 3, 5, 9, 10, 12, 5, 9, 17, 33, 33, 34, 36, 40, 48, 257, 264, 278, 288, 326, 384
Offset: 1

Views

Author

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

Keywords

Comments

Row sums are given in A230386. See A230384 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?

Examples

			The table reads
n=1: {0} with sum = 0,
n=2: {3,5} with sum = 8,
n=3: {9, 10, 12} with sum = 31 (the set {5, 9, 17} having the same sum but a larger maximum),
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.
		

Extensions

a(16)-a(21) by M. F. Hasler, Oct 18 2013

A230387 Least sum of a set of n odious numbers (A000069) such that the sum of two or more is an evil number (A001969).

Original entry on oeis.org

1, 3, 17, 139, 795, 3903, 28575
Offset: 1

Views

Author

M. F. Hasler, Oct 17 2013

Keywords

Comments

Is this sequence finite, or is there for any n at least one admissible set of n odious numbers, i.e., such that any sum of two or more elements add up to an evil number?

Examples

			For n=1 to 4, we have the sets
n=1: {1} with sum = 1,
n=2: {1, 2} with sum = 3
n=3: {2, 7, 8} with sum = 17,
n=4: {4, 19, 49, 67} with sum = 139.
E.g., for n=3, the numbers 2, 7 and 8 have an odd bit sum, but 2+7, 2+8, 7+8 and 2+7+8 all have an odd bit sum.
For n=4, we also have the admissible set {14, 31, 44, 61} which has a smaller maximal element, but a larger total sum.
n=5: {42, 84, 138, 174, 357} with sum = 795.
n=6: {168, 348, 372, 702, 906, 1407} with sum = 3903.
n=7: {2273, 2274, 2276, 2280, 2288, 3296, 13888} with sum = 28575.
		

Crossrefs

Programs

  • PARI
    A69=select(is_A69=n->bittest(hammingweight(n),0),vector(700,n,n)); A230387(n,m=9e9)={ local(v=vector(n,i,i), ve=vector(n,i,A69[i]), t=0, s=vector(n,i,if(i>1,A230387(i-1))), ok(e)=!forstep(i=3,2^#e-1,2, is_A69( sum( j=1,#t=vecextract(e,i),t[j] )) && return), inc(i)=for(j=1,n-i,v[j]=j); for(j=n-i+1,n-1, v[j]++
    				

Formula

Row sums of A230384.

Extensions

a(5)-a(6) from Charles R Greathouse IV, Oct 18 2013
a(7) from Donovan Johnson, Oct 27 2013

A230851 Numbers with divisors which are half odious (A000069) and half evil (A001969).

Original entry on oeis.org

3, 5, 6, 10, 12, 17, 20, 23, 24, 29, 33, 34, 39, 40, 43, 46, 48, 53, 57, 58, 63, 65, 66, 68, 69, 71, 78, 80, 83, 86, 87, 89, 92, 95, 96, 101, 105, 106, 111, 113, 114, 115, 116, 117, 119, 123, 125, 126, 130, 132, 136, 138, 139, 141, 142, 145, 149, 156, 160, 163, 166, 171, 172, 174, 177, 178, 183
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Oct 31 2013

Keywords

Crossrefs

Programs

  • Mathematica
    aQ[n_] := DivisorSum[n, (-1)^DigitCount[#, 2][[1]] &] == 0; Select[Range[200], aQ] (* Amiram Eldar, Sep 23 2019 *)
  • PARI
    is(n)=!sumdiv(n,d,(-1)^hammingweight(d)) \\ Charles R Greathouse IV, Oct 31 2013

Formula

Numbers n such that d(n) = 2*A227872(n) where A227872(n) is number of odious divisors of n.

Extensions

Corrected by Charles R Greathouse IV, Oct 31 2013

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

Original entry on oeis.org

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

Views

Author

Keywords

Comments

The blocks of consecutive odious numbers of the partition are
1,2| 4,7,8,11,13,14,16| 19,21,22|25,26| 28,31,32| 35,37,38| 41,42,44,47| 49,50,52,55,56| 59,61,62,64,67| 69,70| 73,74| 76,79|, etc.

Crossrefs

Previous Showing 21-30 of 309 results. Next