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 305 results. Next

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

A129674 Permutation sequence generated by the "evil numbers" (A001969), by swapping n-th natural number by the (n-g)-th sequentially (iteratively), where g=min(evil(n+1)-evil(n)-1,n-1).

Original entry on oeis.org

3, 2, 1, 6, 4, 7, 5, 10, 8, 12, 11, 13, 15, 14, 9, 18, 16, 20, 19, 21, 17, 24, 22, 25, 27, 26, 23, 30, 28, 31, 29, 34, 32, 36, 35, 37, 33, 40, 38, 41, 43, 42, 39, 46, 44, 48, 47, 49, 51, 50, 45, 54, 52, 55, 53, 58, 56, 60, 59, 61, 63, 62, 57, 66, 64, 68, 67, 69, 65, 72, 70, 73
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 (apart from the initial cycle of length 2). It is also notable that the difference of the number of fixed points and the number of cycles never differs by more than 4, 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(A001969)

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

A231175 Let A={2,4,5,8,9,11,14,...} be the sequence of numbers k>=1 such that k+1 is evil (A001969), and let B be the complement of A. The sequence lists numbers for which number of A-divisors equals number of B-divisors.

Original entry on oeis.org

1, 4, 25, 100, 121, 289, 361, 529, 625, 841, 1156, 2116, 2209, 2500, 2809, 3249, 3364, 3481, 4489, 5041, 5929, 6241, 7225, 7921, 10201, 11236, 11449, 12769, 12996, 15625, 17161, 20164, 21025, 22201, 28900, 29584, 30625, 31329, 31684, 32041, 36481, 38809, 40804
Offset: 1

Views

Author

Vladimir Shevelev, Nov 05 2013

Keywords

Comments

This is an analog of A227891. All terms are perfect squares.

Examples

			n=100 has 8 proper divisors {1,2,4,5,10,20,25,50} from which 4 from A, {2,4,5,50} and 4 from B, {1,10,20,25}. So 100 is in the sequence.
		

Crossrefs

Programs

  • Mathematica
    evilQ[n_] := EvenQ[DigitCount[n, 2] // First]; selQ[n_] := Length[Select[d = Most[Divisors[n]], evilQ[#+1]&]] == Length[d]/2; Select[Range[200]^2, selQ] (* Jean-François Alcover, Nov 05 2013 *)

Extensions

More terms from Peter J. C. Moses

A248009 Partition of the positive odd integers into minimal blocks such that the concatenation of the numbers in each block is an evil number (A001969). Sequence lists the evil numbers obtained in this way.

Original entry on oeis.org

135, 7911, 131517, 19212325272931, 33, 35373941, 43, 45, 4749, 51, 53, 5557, 596163, 65, 676971, 737577, 798183, 85, 8789, 9193, 95, 9799101103105, 107109, 111, 113, 115117119, 121123125127129, 131133, 135, 137139, 141, 143145147, 149, 151153155157, 159
Offset: 1

Views

Author

Vladimir Shevelev, Oct 05 2014

Keywords

Comments

The numbers of the consecutive positive odd integers in the blocks of the partition are 3,3,3,7,1,4,1,1,2,1,1,2,3,1,3,3,3,1,2,2,...

Examples

			a(1)=135, since 1 and 13 are odious numbers, while 135 is evil.
		

Crossrefs

Programs

  • PARI
    lista(nn) = {s = ""; forstep(n=1, nn, 2, ns = concat(s, Str(n)); if ((hammingweight(eval(ns)) % 2) == 0, print1(ns, ", "); s = "", s = ns););} \\ Michel Marcus, Oct 09 2014

Extensions

More terms from Peter J. C. Moses, Oct 09 2014

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

A248171 Partition of the positive integers on minimal blocks such that concatenation of numbers in each block is an evil number (A001969). Sequence lists the evil numbers obtained in this way.

Original entry on oeis.org

12, 3, 45, 6, 78, 9, 10, 1112, 1314, 15, 161718, 1920, 2122, 23, 24, 2526, 27, 2829, 30, 3132, 33, 34, 3536, 37383940, 414243, 4445464748, 495051, 52535455, 5657, 58, 5960, 6162, 63, 646566, 6768, 6970, 71, 72, 7374, 75, 7677787980, 818283, 8485868788, 89, 90
Offset: 1

Views

Author

Vladimir Shevelev, Oct 03 2014

Keywords

Comments

The numbers of the consecutive positive integers over blocks of the partition are 2,1,2,1,2,1,1,2,2,1,3,2,2,1,1,2,1,...

Crossrefs

Cf. A000069 (odious), A001969 (evil), A248009, A248138, A248140, A248172 (similar, with odious).

Programs

  • Python
    from itertools import count
    def evil(n): return bin(n)[2:].count('1') % 2 == 0
    def aupton(terms):
        alst, t = [], 0
        for k in count(1):
            t = int(str(t) + str(k))
            if evil(t):
                alst.append(t)
                t = 0
                if len(alst) >= terms: return alst
    print(aupton(45)) # Michael S. Branicky, Dec 03 2021

Extensions

More terms from Peter J. C. Moses, Oct 04 2014

A248478 Evil numbers (A001969) becoming odious (A000069) if any digit is deleted (zeros allowed).

Original entry on oeis.org

12, 17, 18, 24, 27, 48, 71, 72, 77, 78, 111, 113, 114, 116, 119, 141, 144, 149, 169, 216, 221, 222, 225, 226, 228, 252, 255, 281, 282, 288, 311, 325, 387, 411, 414, 441, 442, 444, 447, 449, 474, 479, 497, 525, 526, 550, 556, 559, 562, 619, 621, 622, 649, 674
Offset: 1

Views

Author

Vladimir Shevelev, Oct 07 2014

Keywords

Examples

			149 is in the sequence, since 149 = 2^7 + 2^4 + 2^2 + 1 is evil, while 49, 19 and 14 are odious.
		

Crossrefs

Extensions

More terms from Peter J. C. Moses, Oct 11 2014
Previous Showing 21-30 of 305 results. Next