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

A240672 Number of the first evil exponents (A001969) in the prime power factorization of (2n)!.

Original entry on oeis.org

0, 1, 0, 0, 0, 2, 0, 3, 0, 1, 0, 0, 4, 0, 0, 0, 0, 2, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 2, 0, 1, 2, 0, 1, 0, 0, 2, 0, 0, 2, 0, 0, 0, 1, 1, 0, 2, 0, 2, 0, 0, 1, 1, 0, 2, 0, 0, 0, 9, 2, 0, 1, 1, 0, 0, 2, 0, 0, 1, 0, 0, 1, 0, 0, 0, 2, 1, 0, 2, 0, 3, 0, 0, 1, 1, 0, 2
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

			26! = 2^23*3^10*5^6*7^3*11^2*13^2*17*19*23, and the first 4 exponents (23,10,6,3) are evil, so a(13) = 4.
		

Crossrefs

Programs

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

Formula

a(n)*A240669(n) = 0.

A092875 Aronson transform of the "evil" sequence (A001969).

Original entry on oeis.org

2, 3, 5, 7, 9, 11, 12, 13, 15, 16, 17, 18, 20, 21, 23, 24, 27, 29, 31, 33, 34, 35, 36, 39, 41, 42, 43, 44, 45, 47, 48, 49, 51, 53, 54, 57, 59, 61, 63, 64, 65, 66, 68, 71, 72, 73, 75, 77, 78, 79, 80, 81, 83, 85, 87, 88, 89, 91, 92, 93, 95, 97, 99, 101, 102, 105, 107, 108, 109
Offset: 1

Views

Author

Ferenc Adorjan (fadorjan(AT)freemail.hu)

Keywords

Comments

b(n) positive monotonic sequence is the Aronson transform of a(n) positive monotonic sequence if every member of a(n) satisfies the condition: "k is in b if and only if b(k) is in a", so that k must be the least such number.

Crossrefs

Programs

  • PARI
    {arons(v)= /* Returns the Aronson transform of v */ local(x=[],pv=1,px=1,n=1,i=0,k,l); l=matsize(v)[2];
    /*The initial terms: */ if(n0 if (i+1) is in v */ if(k==i,n+=1;if(pv<0,pv=abs(pv);while(pv>0,n+=1;pv=isin (n,v,l,pv))), px=isin(i+1,x,i,px);if(px>0,pv=-abs(pv);while (pv<0,n+=1;pv=isin(n,v,l,pv)), pv=abs(pv);while(pv>0,n+=1;pv=isin(n,v,l,pv)))); x=concat(x,n);i+=1);/*print(i);*/ return(x) }
    {isin(x,v,l,poi)= /*If x integer is in v monotonic vector of length l, the function returns a positive 'poi', else a negative one. (poi is pointer, used for acceleration. The last returned value is recommended in the input) */
    poi=abs(poi);if(poi==1&&x1,poi-=1);if(x<>v [poi],poi*=-1), if(x>v[poi], while(x>v[poi]&&poiv [poi],poi*=-1)));return(poi))}

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

A159481 Number of evil numbers <= n, see A001969.

Original entry on oeis.org

1, 1, 1, 2, 2, 3, 4, 4, 4, 5, 6, 6, 7, 7, 7, 8, 8, 9, 10, 10, 11, 11, 11, 12, 13, 13, 13, 14, 14, 15, 16, 16, 16, 17, 18, 18, 19, 19, 19, 20, 21, 21, 21, 22, 22, 23, 24, 24, 25, 25, 25, 26, 26, 27, 28, 28, 28, 29, 30, 30, 31, 31, 31, 32, 32, 33, 34, 34, 35, 35, 35, 36, 37, 37, 37
Offset: 0

Views

Author

Reinhard Zumkeller, Apr 16 2009

Keywords

Examples

			a(10) = #{0,11,101,110,1001,1010} = #{0,3,5,6,9,10} = 6.
		

Crossrefs

Programs

  • Mathematica
    Accumulate[Table[If[EvenQ[DigitCount[n,2,1]],1,0],{n,0,80}]] (* Harvey P. Dale, Mar 19 2018 *)
    Accumulate[1 - ThueMorse[Range[0, 100]]] (* Paolo Xausa, Oct 25 2024 *)
  • PARI
    a(n)=n\2+(n%2&&hammingweight(n)%2) \\ Charles R Greathouse IV, Mar 22 2013
    
  • Python
    def A159481(n): return (n+1>>1)+((n+1).bit_count()&1&n+1) # Chai Wah Wu, Mar 01 2023

Formula

a(n) = n + 1 - A115384(n).
Limit_{n->oo} n/a(n) = 1/2.
a(n) = Sum_{k=0..n} A010059(k).
a(n) = floor(n/2) - (1 + (-1)^n)*(1 - (-1)^A000120(n))/4 + 1. - Vladimir Shevelev, May 27 2009
G.f.: (1/(1 - x)^2 + Product_{k>=1} (1 - x^(2^k)))/2. - Ilya Gutkovskiy, Apr 03 2019

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.

A245710 Number of nonzero evil numbers <= n, see A001969.

Original entry on oeis.org

0, 0, 0, 1, 1, 2, 3, 3, 3, 4, 5, 5, 6, 6, 6, 7, 7, 8, 9, 9, 10, 10, 10, 11, 12, 12, 12, 13, 13, 14, 15, 15, 15, 16, 17, 17, 18, 18, 18, 19, 20, 20, 20, 21, 21, 22, 23, 23, 24, 24, 24, 25, 25, 26, 27, 27, 27, 28, 29, 29, 30, 30, 30, 31, 31, 32, 33, 33, 34, 34, 34, 35, 36
Offset: 0

Views

Author

Antti Karttunen, Aug 18 2014

Keywords

Crossrefs

One less than A159481.

Programs

  • Mathematica
    Join[{0},Accumulate[Table[If[EvenQ[DigitCount[n,2,1]],1,0],{n,80}]]] (* Harvey P. Dale, Aug 01 2021 *)
  • Python
    def A245710(n): return (n+1>>1)-((n+1).bit_count()&1&(n+1)^1) # Chai Wah Wu, Mar 01 2023

Formula

a(0) = 0, and for n >= 1, a(n) = A010059(n) + a(n-1). [Partial sums of A010059, after ignoring the first one at zero].
a(n) = n - A115384(n).
a(n) = A159481(n)-1.

A356018 a(n) is the number of evil divisors (A001969) of n.

Original entry on oeis.org

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

Views

Author

Bernard Schott, Jul 23 2022

Keywords

Comments

a(n) = 0 iff n is in A093696.

Examples

			12 has 6 divisors: {1, 2, 3, 4, 6, 12} of which three {3, 6, 12} have an even number of 1's in their binary expansion with 11, 110 and 11100 respectively; hence a(12) = 3.
		

Crossrefs

Cf. A000005, A001969, A093688, A093696 (location of 0s), A227872, A356019, A356020.
Similar sequences: A083230, A087990, A087991, A332268, A355302.

Programs

  • Maple
    A356018 := proc(n)
        local a,d ;
        a := 0 ;
        for d in numtheory[divisors](n) do
            if isA001969(d) then
                a := a+1 ;
            end if;
        end do:
        a ;
    end proc:
    seq(A356018(n),n=1..200) ;  # R. J. Mathar, Aug 07 2022
  • Mathematica
    a[n_] := DivisorSum[n, 1 &, EvenQ[DigitCount[#, 2, 1]] &]; Array[a, 100] (* Amiram Eldar, Jul 23 2022 *)
  • PARI
    a(n) = my(v = valuation(n, 2)); n>>=v; d=divisors(n); sum(i=1, #d, bitand(hammingweight(d[i]), 1) == 0) * (v+1) \\ David A. Corneth, Jul 23 2022
  • Python
    from sympy import divisors
    def c(n): return bin(n).count("1")&1 == 0
    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) = A000005(n) - A227872(n).

Extensions

More terms from David A. Corneth, Jul 23 2022

A091785 Evil numbers (see A001969) in A003159.

Original entry on oeis.org

3, 5, 9, 12, 15, 17, 20, 23, 27, 29, 33, 36, 39, 43, 45, 48, 51, 53, 57, 60, 63, 65, 68, 71, 75, 77, 80, 83, 85, 89, 92, 95, 99, 101, 105, 108, 111, 113, 116, 119, 123, 125, 129, 132, 135, 139, 141, 144, 147, 149, 153, 156, 159, 163, 165, 169, 172, 175, 177, 180, 183
Offset: 1

Views

Author

Philippe Deléham, Mar 16 2004

Keywords

Comments

Also n such that A033485(n) == 3 (mod 4); see A007413.
Also n such that A029883(n-1) = -1, A036577(n-1) = 0, A036585(n-1) = 1. - 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)}={1,0} where A010060 is the Thue-Morse sequence. - Benoit Cloitre, Jun 16 2006

Programs

Formula

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

Extensions

More terms from Benoit Cloitre, Mar 22 2004

A092861 "Product" of the sequence of primes and the "evil" numbers (A001969).

Original entry on oeis.org

4, 7, 9, 12, 14, 15, 18, 19, 21, 25, 26, 33, 35, 36, 37, 40, 41, 42, 44, 47, 48, 50, 54, 55, 58, 59, 60, 64, 65, 66, 69, 72, 77, 78, 79, 80, 84, 86, 87, 88, 89, 90, 91, 97, 99, 100, 105, 106, 107, 108, 110, 111, 112, 114, 115, 116, 117, 118, 120, 122, 123, 125, 127, 128
Offset: 1

Views

Author

Ferenc Adorjan (fadorjan(AT)freemail.hu)

Keywords

Comments

If two monotonic sequences are mapped into the real section of (0,1), as it is defined in A051006 and the product of the two reals mapped back into the set of monotonic sequences as defined in A092855, then we have the "product" of the two sequences.

Crossrefs

Programs

  • PARI
    {prod(a,b)= /*Returns the "product" of monotonic sequences a and b */ return(mtinv(mt(a)*mt(b))) /* the functions mt(a) and mtinv(r) are defined in A051006 and A092855, respectively */ }

A125592 Evil numbers (A001969) multiplied by 2.

Original entry on oeis.org

0, 6, 10, 12, 18, 20, 24, 30, 34, 36, 40, 46, 48, 54, 58, 60, 66, 68, 72, 78, 80, 86, 90, 92, 96, 102, 106, 108, 114, 116, 120, 126, 130, 132, 136, 142, 144, 150, 154, 156, 160, 166, 170, 172, 178, 180, 184, 190, 192, 198, 202, 204, 210, 212, 216, 222, 226, 228, 232, 238
Offset: 1

Views

Author

Luis H. Gallardo and Johan Huisman, Jan 07 2007

Keywords

Comments

Numbers n such that the Maple command genpoly(n,2,t) outputs a polynomial in F_2[t] that is divisible by t(t+1), where F_2 is the finite field with two elements. E.g. a(2)=10 since the polynomial genpoly(10,2,t)=t^3+t = t(t+1)(t+1) in F_2[t] is divisible by the polynomial t(t+1) in F_2[t]
These are the even evil numbers: the intersection of A001968 and A005843. - Tanya Khovanova, May 04 2007

Programs

Showing 1-10 of 305 results. Next