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

A270428 Exponentially odious numbers: 1 together with positive integers n such that all exponents in prime factorization of n are odious numbers (A000069).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 25, 26, 28, 29, 30, 31, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 55, 57, 58, 59, 60, 61, 62, 63, 65, 66, 67, 68, 69, 70, 71, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84
Offset: 1

Views

Author

Antti Karttunen, May 26 2016

Keywords

Comments

A268385 maps each term of this sequence to a unique term of A268335, and vice versa.
The asymptotic density of this sequence is Product_{p prime} f(1/p) = 0.87686263163054480657..., where f(x) = 1 - x + (1 - (1-x) * Product_{k>=0} (1-x^(2^k)))/2. - Amiram Eldar, Oct 27 2023

Crossrefs

Apart from 1, a subsequence of A270420.
Indices of ones in A270419.
Sequence A270436 sorted into ascending order.
Cf. A010060, A028234, A067029, A355825 (characteristic function).
Cf. also A262675, A268335, A268385.
Differs from its subsequence A138302 for the first time at n=113, where a(113) = 128 = 2^7, a value which does not occur in A138302.

Programs

A092246 Odd "odious" numbers (A000069).

Original entry on oeis.org

1, 7, 11, 13, 19, 21, 25, 31, 35, 37, 41, 47, 49, 55, 59, 61, 67, 69, 73, 79, 81, 87, 91, 93, 97, 103, 107, 109, 115, 117, 121, 127, 131, 133, 137, 143, 145, 151, 155, 157, 161, 167, 171, 173, 179, 181, 185, 191, 193, 199, 203, 205, 211, 213, 217, 223, 227, 229, 233
Offset: 1

Views

Author

Benoit Cloitre, Feb 23 2004

Keywords

Comments

In other words, numbers having a binary representation ending in 1, and an odd number of 1's overall. It follows that by decrementing an odd odious number, one gets an even evil number (A125592). - Ralf Stephan, Aug 27 2013
The members of the sequence may be called primitive odious numbers because every odious number is a power of 2 times one of these numbers. Note that the difference between consecutive terms is either 2, 4, or 6. - T. D. Noe, Jun 06 2007
From Gary W. Adamson, Apr 06 2010: (Start)
a(n) = A026147(n)-th odd number, where A026147 = (1, 4, 6, 7, 10, 11, ...); e.g.,
n: 1 2 3 4 5 6 7 8 9 10 11
n-th odd: 1 3 5 7 9 11 13 15 17 19 21
a(n): 1 7 11 13 19 21
etc. (End)
Numbers m, such that when merge-sorting lists of length m, the maximal number of comparisons is even: A003071(a(n)) = A230720(n). - Reinhard Zumkeller, Oct 28 2013
Fixed points of permutation pair A268717/A268718. - Antti Karttunen, Feb 29 2016

Crossrefs

Cf. A230709 (complement).

Programs

  • Haskell
    a092246 n = a092246_list !! (n - 1)
    a092246_list = filter odd a000069_list
    -- Reinhard Zumkeller, Oct 28 2013
    
  • Mathematica
    Table[If[n < 1, 0, 2 n - 1 - Mod[First@ DigitCount[n - 1, 2], 2]], {n, 120}] /. n_ /; EvenQ@ n -> Nothing (* Michael De Vlieger, Feb 29 2016 *)
    Select[Range[1, 1001, 2], OddQ[Total[IntegerDigits[#, 2]]]&] (* Jean-François Alcover, Mar 15 2016 *)
  • PARI
    is(n)=n%2&&hammingweight(n)%2 \\ Charles R Greathouse IV, Mar 21 2013
    
  • PARI
    a(n)=4*n-if(hammingweight(n-1)%2,1,3) \\ Charles R Greathouse IV, Mar 22 2013
    
  • Python
    def A092246(n): return (n<<2)-(1 if (n-1).bit_count()&1 else 3) # Chai Wah Wu, Mar 03 2023

Formula

a(n) = 4*n + 2*A010060(n-1) - 3;
a(n) = 2*A001969(n-1) + 1.

A091855 Odious numbers (see A000069) in A003159.

Original entry on oeis.org

1, 4, 7, 11, 13, 16, 19, 21, 25, 28, 31, 35, 37, 41, 44, 47, 49, 52, 55, 59, 61, 64, 67, 69, 73, 76, 79, 81, 84, 87, 91, 93, 97, 100, 103, 107, 109, 112, 115, 117, 121, 124, 127, 131, 133, 137, 140, 143, 145, 148, 151, 155, 157, 161, 164, 167, 171, 173, 176, 179, 181
Offset: 1

Views

Author

Philippe Deléham, Mar 16 2004

Keywords

Comments

Also n such that A033485(n) == 1 (mod 4); see A007413.
Also n such that A029883(n-1) = 1, A036577(n-1) = 2, A036585(n-1) = 3. - Philippe Deléham, Mar 25 2004
The number of odd numbers before the n-th even number in this sequence is a(n). - Philippe Deléham, Mar 27 2004
Numbers n such that {A010060(n-1), A010060(n)}={0,1} where A010060 is the Thue-Morse sequence. - Benoit Cloitre, Jun 16 2006
Positive integers not of the form n+A010060(n). - Jeffrey Shallit, Feb 13 2024

Programs

Formula

a(n) = A003159(2n-1) = A036554(2n-1)/2.
a(n) is asymptotic to 3*n - Benoit Cloitre, Mar 22 2004
A050292(a(n)) = 2n - 1. - Philippe Deléham, Mar 26 2004

Extensions

More terms from Benoit Cloitre, Mar 22 2004

A240669 Number of the first odious exponents (A000069) in the prime power factorization of (2n)!.

Original entry on oeis.org

1, 0, 3, 4, 4, 0, 1, 0, 2, 0, 1, 1, 0, 2, 10, 11, 1, 0, 1, 1, 0, 2, 2, 0, 2, 1, 2, 0, 0, 3, 0, 0, 2, 0, 4, 1, 0, 2, 1, 0, 1, 5, 2, 0, 0, 6, 0, 1, 0, 1, 2, 0, 0, 1, 0, 1, 3, 2, 0, 0, 1, 0, 0, 3, 3, 0, 1, 1, 0, 2, 1, 0, 8, 1, 1, 0, 0, 1, 0, 2, 0, 1, 2, 0, 0, 3
Offset: 1

Views

Author

Vladimir Shevelev, Apr 10 2014

Keywords

Comments

Conjecture: The sequence is unbounded. (This conjecture does not follow from Chen's theorem.)

Examples

			28! = 2^25*3^13*5^6*7^4*11^2*13^2*17*19*23, and only the first 2 exponents are odious, so a(14) = 2.
		

Crossrefs

Programs

  • Mathematica
    Map[Count[First[Split[Map[OddQ[DigitCount[#,2][[1]]]&,Last[Transpose[FactorInteger[(2*#)!]]&[#]]]]],True]&,Range[75]] (* Peter J. C. Moses, Apr 10 2014 *)

A227872 Number of odious divisors (A000069) of n.

Original entry on oeis.org

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

Views

Author

Vladimir Shevelev, Oct 25 2013

Keywords

Crossrefs

Programs

  • Maple
    A227872 := proc(n)
        option remember ;
        local a,d ;
        a := 0 ;
        for d in numtheory[divisors](n) do
            if not isA001969(d) then
                a := a+1 ;
            end if;
        end do:
        a ;
    end proc:
    seq(A227872(n),n=1..200) ; # R. J. Mathar, Aug 07 2022
  • Mathematica
    a[n_] := DivisorSum[n, 1 &, OddQ[DigitCount[#, 2, 1]] &]; Array[a, 100] (* Amiram Eldar, Jul 23 2022 *)
  • PARI
    a(n) = sumdiv(n, d, hammingweight(d) % 2); \\ Michel Marcus, Feb 06 2016
    
  • PARI
    isod(n) = hammingweight(n) % 2; \\ A000069
    a(n) = my(v=valuation(n, 2)); n >>= v; sumdiv(n,d,isod(d)) * (v+1) \\ David A. Corneth, Jul 23 2022
    
  • Python
    from sympy import divisors
    def c(n): return bin(n).count("1")&1
    def a(n): return sum(1 for d in divisors(n, generator=True) if c(d))
    print([a(n) for n in range(1, 101)]) # Michael S. Branicky, Jul 23 2022

Formula

a(n) + A356018(n) = A000005(n).
a(2^n) = n+1. - Bernard Schott, Jul 22 2022
a(n) = 1 iff n is in A093688. - Bernard Schott, Jul 23 2022
a(n) = Sum_{d|n} A010060(d). - Ridouane Oudra, Apr 12 2025

Extensions

More terms from Peter J. C. Moses, Oct 25 2013

A240670 Numbers n for which all exponents in the prime power factorization of (2*n)! are odious (A000069).

Original entry on oeis.org

1, 3, 4, 5, 15, 16
Offset: 1

Views

Author

Vladimir Shevelev, Apr 10 2014

Keywords

Comments

The next term, if it exists, must be more than 45000. - Peter J. C. Moses, Apr 11 2014
The sequence is finite.
Proof. For sufficiently large n, we always have a prime in (n/4, n/3]. Such primes p divide n! and, at the same time, for them we have 3<=n/p<4. Thus floor(n/p)=3, and in case sqrt(n)=93 in order for the above arguments to be true. So 16 is the last term of the sequence. - Vladimir Shevelev, Apr 11 2014

Examples

			32! = 2^31*3^14*5^7*7^4*11^2*13^2*17*19*23*29*31, and all exponents: 31,14,7,4,2,2,1,1,1,1,1 are odious, so 16 is in the sequence.
		

Crossrefs

Programs

  • Mathematica
    odiousQ[n_] := OddQ[DigitCount[n, 2][[1]]];
    For[n = 1, True, n++, If[AllTrue[FactorInteger[(2 n)!][[All, 2]], odiousQ], Print[n]]] (* Jean-François Alcover, Sep 20 2018 *)
  • PARI
    isok(n) = {f = factor((2*n)!); sum(i=1, #f~, hammingweight(f[i, 2]) % 2) == #f;} \\ Michel Marcus, Apr 11 2014

A128309 a(n) = 2*A000069(n).

Original entry on oeis.org

2, 4, 8, 14, 16, 22, 26, 28, 32, 38, 42, 44, 50, 52, 56, 62, 64, 70, 74, 76, 82, 84, 88, 94, 98, 100, 104, 110, 112, 118, 122, 124, 128, 134, 138, 140, 146, 148, 152, 158, 162, 164, 168, 174, 176, 182, 186, 188, 194, 196, 200, 206, 208, 214, 218, 220, 224, 230, 234, 236, 242
Offset: 1

Views

Author

N. J. A. Sloane, May 10 2007

Keywords

Comments

These are the even odious numbers. - Tanya Khovanova, May 15 2007

Crossrefs

Different from A074202.
Intersection of A000069 (odious numbers: odd number of 1's in binary expansion) and A005843 (even numbers).

Programs

Formula

a(n) = 4n + O(1). - Charles R Greathouse IV, Mar 22 2013

A181155 Odious numbers (A000069) plus one; complement of A026147.

Original entry on oeis.org

2, 3, 5, 8, 9, 12, 14, 15, 17, 20, 22, 23, 26, 27, 29, 32, 33, 36, 38, 39, 42, 43, 45, 48, 50, 51, 53, 56, 57, 60, 62, 63, 65, 68, 70, 71, 74, 75, 77, 80, 82, 83, 85, 88, 89, 92, 94, 95, 98, 99, 101, 104, 105, 108, 110, 111, 113, 116, 118, 119, 122, 123, 125, 128, 129, 132
Offset: 1

Views

Author

Matthew Vandermast, Oct 06 2010

Keywords

Comments

a(n) = position of n-th 2 in A001285 if offset for A001285 is given as 1.
It appears that this sequence and A026147 index each other's even terms (i.e., a(n) = position of n-th even term in A026147, and A026147(n) = position of n-th even term in this sequence). It also appears that each of the two sequences indexes its own odd terms (cf. A079000).
Barbeau notes that if let A = the first 2^k terms of A026147 and B = the first 2^k terms of this sequence, then the two sets have the same sum of powers for first up to the k-th power. I note it holds for 0th power also. - Michael Somos, Jun 09 2013

Examples

			Let k=2. Then A = {1,4,6,7} and B = {2,3,5,8} have the property that 1^0+4^0+6^0+7^0 = 2^0+3^0+5^0+8^0 = 4, 1^1+4^1+6^1+7^1 = 2^1+3^1+5^1+8^1 = 18, and 1^2+4^2+6^2+7^2 = 2^2+3^2+5^2+8^2 = 102. - _Michael Somos_, Jun 09 2013
		

Crossrefs

Cf. A026147.

Programs

  • Mathematica
    a[ n_] := If[ n < 1, 0, 2 n - Mod[ Total[ IntegerDigits[ n - 1, 2]], 2]] (* Michael Somos, Jun 09 2013 *)
  • PARI
    a(n)=2*n-hammingweight(n-1)%2 \\ Charles R Greathouse IV, Mar 22 2013
    
  • PARI
    {a(n) = if( n<1, 0, 2*n - subst( Pol( binary( n-1)), x, 1)%2)} /* Michael Somos, Jun 09 2013 */
    
  • Python
    def A181155(n): return 1+((m:=n-1)<<1)+(m.bit_count()&1^1) # Chai Wah Wu, Mar 03 2023

Formula

a(n) = A000069(n) + 1.
a(a(n)-1) = 2*a(n)-1. - Benoit Cloitre, Oct 07 2010
a(n) + A010060(n+1) = 2n + 2 for n >= 0. - Clark Kimberling, Oct 06 2014

A277880 Dispersion of evil numbers: Square array A(r,c) with A(r,1) = A000069(r); and for c > 1, A(r,c) = A001969(1+(A(r,c-1))), read by descending antidiagonals as A(1,1), A(1,2), A(2,1), A(1,3), A(2,2), A(3,1), etc.

Original entry on oeis.org

1, 3, 2, 6, 5, 4, 12, 10, 9, 7, 24, 20, 18, 15, 8, 48, 40, 36, 30, 17, 11, 96, 80, 72, 60, 34, 23, 13, 192, 160, 144, 120, 68, 46, 27, 14, 384, 320, 288, 240, 136, 92, 54, 29, 16, 768, 640, 576, 480, 272, 184, 108, 58, 33, 19, 1536, 1280, 1152, 960, 544, 368, 216, 116, 66, 39, 21, 3072, 2560, 2304, 1920, 1088, 736, 432, 232, 132, 78, 43, 22
Offset: 1

Views

Author

Antti Karttunen, Nov 03 2016

Keywords

Examples

			The top left 12 x 12 corner of the array:
   1,  3,  6,  12,  24,  48,   96,  192,  384,   768,  1536,  3072
   2,  5, 10,  20,  40,  80,  160,  320,  640,  1280,  2560,  5120
   4,  9, 18,  36,  72, 144,  288,  576, 1152,  2304,  4608,  9216
   7, 15, 30,  60, 120, 240,  480,  960, 1920,  3840,  7680, 15360
   8, 17, 34,  68, 136, 272,  544, 1088, 2176,  4352,  8704, 17408
  11, 23, 46,  92, 184, 368,  736, 1472, 2944,  5888, 11776, 23552
  13, 27, 54, 108, 216, 432,  864, 1728, 3456,  6912, 13824, 27648
  14, 29, 58, 116, 232, 464,  928, 1856, 3712,  7424, 14848, 29696
  16, 33, 66, 132, 264, 528, 1056, 2112, 4224,  8448, 16896, 33792
  19, 39, 78, 156, 312, 624, 1248, 2496, 4992,  9984, 19968, 39936
  21, 43, 86, 172, 344, 688, 1376, 2752, 5504, 11008, 22016, 44032
  22, 45, 90, 180, 360, 720, 1440, 2880, 5760, 11520, 23040, 46080
		

Crossrefs

Inverse permutation: A277881.
Transpose: A277882.
Column 1: A000069, column 2: A129771.
Row 1: A003945.
Cf. A277813 (index of the row where n is located in this array), A277822 (index of the column).
Cf. A001969.
Other related tables or permutations: A277820, A277902, A248513.

Programs

Formula

A(r,1) = A000069(r) and for c > 1, A(r,c) = A001969(1+(A(r,c-1))).
Alternatively, if we set also the second column explicitly as:
A(r,2) = A129771(r) = 1+ 2*A000069(r),
then the rest of entries in each row are obtained just by doubling the preceding term on the same row: A(r,c) = 2*A(r,c-1), for c >= 3.
As a composition of other permutations:
a(n) = A277902(A277820(n)).

A227891 Numbers for which the number of odious proper divisors (A000069) equals the number of evil proper divisors (A001969).

Original entry on oeis.org

1, 9, 25, 289, 441, 529, 625, 841, 1849, 2809, 3249, 5041, 6889, 7225, 7569, 7921, 10201, 12769, 15129, 15625, 19321, 21025, 22201, 26569, 31329, 38809, 46225, 48841, 53361, 55225, 66049, 69169, 72361, 76729, 78961, 83521, 85849, 93025, 96721, 100489, 103041
Offset: 1

Views

Author

Keywords

Comments

All terms are odd squares (see Shevelev links).

Examples

			1 has no proper divisors, so it is in the sequence.
9 has two proper divisors 1 (odious) and 3 (evil). Thus 9 is in the sequence.
		

Crossrefs

Programs

  • Mathematica
    isQ[n_] := Sum[Switch[Mod[Total[IntegerDigits[d, 2]], 2], 0, 1, 1, -1], {d, Most[Divisors[n]]}] == 0; Select[(2*Range[200]-1)^2, isQ] (* Jean-François Alcover, Dec 04 2015 *)
  • PARI
    is(n)=sumdiv(n,d,(-1)^hammingweight(d))==(-1)^hammingweight(n)
    select(is, vector(10^4,i,(2*i-1)^2)) \\ Charles R Greathouse IV, Oct 26 2013
    
  • PARI
    c=0; forstep(i=1, 8135, 2, n=i^2; nd=numdiv(n); d=divisors(n); ce=0; co=0; for(j=1, nd-1, if(hammingweight(d[j])%2==0, ce++, co++)); if(ce==co, c++; write("b227891.txt", c " " n))) \\ Donovan Johnson, Oct 30 2013

Formula

Common value for numbers of considered divisors is (A000005(a(n))-1)/2.
Showing 1-10 of 309 results. Next