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

A006005 The odd prime numbers together with 1.

Original entry on oeis.org

1, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271
Offset: 1

Views

Author

Keywords

Comments

The odd noncomposite numbers. Also odd primes at the beginning of the 20th century. - Omar E. Pol, Mar 19 2008
Indices at which records occur in A002322. - Artur Jasinski, Apr 05 2008
Odd numbers n such that their largest divisor <= sqrt(n) equals 1. (See A161344). - Omar E. Pol, Aug 03 2009
All k for which cos((k-1)!*Pi/k) is negative. - Gerry Martens, Jun 01 2018

Crossrefs

Programs

  • Mathematica
    a = {}; max = 0; Do[w = CarmichaelLambda[k]; If[w > max, AppendTo[a, k]; max = k], {k, 1, 200}]; a (* Artur Jasinski, Apr 05 2008 *)
    Join[{1},Prime[Range[2,60]]] (* Harvey P. Dale, Apr 15 2019 *)
  • PARI
    prime(n)-(n==1) \\ Charles R Greathouse IV, Aug 26 2011

Formula

a(n) = A000040(n) - A000007(n) = A000040(n) - ((-1)^A000040(n)+1)/2. - Juri-Stepan Gerasimov, Oct 25 2009
a(n) = A175524(n) for n <= 30. - Reinhard Zumkeller, Jul 12 2011

A175522 A000120-perfect numbers.

Original entry on oeis.org

2, 25, 95, 111, 119, 123, 125, 169, 187, 219, 221, 247, 289, 335, 365, 411, 415, 445, 485, 493, 505, 629, 655, 685, 695, 697, 731, 767, 815, 841, 871, 943, 949, 965, 985, 1003, 1139, 1207, 1241, 1261, 1263, 1273, 1343, 1387, 1465, 1469, 1507, 1513, 1529, 1563
Offset: 1

Views

Author

Vladimir Shevelev, Dec 03 2010

Keywords

Comments

Let A(n), n>=1, be an infinite positive sequence.
We call a number n:
A-deficient if Sum{d|n, d
A-abundant if Sum{d|n, d A(n),
and
A-perfect if Sum{d|n, d
depending on the sum over the proper divisors of n.
The definition generalizes the standard nomenclature of deficient (A005100), abundant (A005101) and perfect numbers (A000396), which is recovered by setting A(n) = n = A000027(n).
Conjecture: if there exist infinitely many A-deficient numbers and infinitely many A-abundant numbers, then there exist infinitely many A-perfect numbers.
Note that the sequence contains squares of all Fermat primes larger than 3 (see A019434). [This would also hold for squares of any hypothetical Fermat primes after the fifth one, 65537. Comment clarified by Antti Karttunen, May 14 2015]
A192895(a(n)) = 0. - Reinhard Zumkeller, Jul 12 2011

Examples

			Proper divisors of 119 are 1,7,17. Since A000120(1)+A000120(7)+A000120(17)=A000120(119), then 119 is in the sequence.
		

Crossrefs

Cf. A175524 (deficient version), A175526 (abundant version), A000120, A000396.
Subsequence of A257691 (non-abundant version).
Positions of zeros in A192895.

Programs

  • Haskell
    import Data.List (elemIndices)
    a175522 n = a175522_list !! (n-1)
    a175522_list = map (+ 1) $ elemIndices 0 a192895_list
    -- Reinhard Zumkeller, Jul 12 2011
    
  • Mathematica
    binw[n_] := DigitCount[n, 2, 1]; Select[Range[1500], binw[#] == DivisorSum[#, binw[#1] &]/2 &] (* Amiram Eldar, Dec 14 2020 *)
  • PARI
    is(n)=sumdiv(n,d,hammingweight(d))==2*hammingweight(n) \\ Charles R Greathouse IV, Jan 28 2016
    
  • Python
    from sympy import divisors
    def A000120(n): return bin(n).count('1')
    def aupto(limit):
      alst = []
      for m in range(1, limit+1):
        if A000120(m) == sum(A000120(d) for d in divisors(m)[:-1]): alst += [m]
      return alst
    print(aupto(1563)) # Michael S. Branicky, Feb 25 2021
  • Sage
    A000120 = lambda x: x.digits(base=2).count(1)
    is_A175522 = lambda x: sum(A000120(d) for d in divisors(x)) == 2*A000120(x)
    A175522 = filter(is_A175522, IntegerRange(1, 10**4))
    # D. S. McNeil, Dec 04 2010
    

Extensions

More terms from Amiram Eldar, Feb 18 2019

A175526 A000120-abundant numbers.

Original entry on oeis.org

4, 6, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 22, 24, 26, 27, 28, 30, 32, 33, 34, 35, 36, 38, 39, 40, 42, 44, 45, 46, 48, 49, 50, 51, 52, 54, 55, 56, 57, 58, 60, 62, 63, 64, 65, 66, 68, 69, 70, 72, 74, 75, 76, 77, 78, 80, 81, 82, 84, 85, 86, 87, 88, 90, 91, 92, 93, 94, 96, 98, 99, 100, 102, 104, 105, 106, 108, 110, 112, 114, 115, 116, 117, 118, 120
Offset: 1

Author

Vladimir Shevelev, Dec 03 2010

Keywords

Comments

Definition see in A175522. All even numbers > 2 are in the sequence.
A192895(a(n)) > 0. Reinhard Zumkeller, Jul 12 2011

Crossrefs

Cf. A175522 (perfect version), A175524 (deficient version), A257691 (complement, non-abundant version).
Cf. also A005100, A005101.
a(n) differs from A091212(n) and from A205783(n+1) for the first time at n=37, where a(37) = 55, while 55 is missing from both A091212 and A205783.
Differs from A192506 for the first time at n=54, where a(54) = 77, while 77 is missing from A192506.

Programs

  • Haskell
    import Data.List (findIndices)
    a175526 n = a175526_list !! (n-1)
    a175526_list = map (+ 1) $ findIndices (> 0) a192895_list
    -- Reinhard Zumkeller, Jul 12 2011
    
  • Maple
    isA175526 := proc(n) s := 0 ; for d in (numtheory[divisors](n) minus {n}) do s := s+A000120(d) ; end do: evalb(s> A000120(n)) ; end proc:
    for n from 1 to 120 do if isA175526(n) then printf("%d,",n); end if; end do: # R. J. Mathar, Jul 11 2011
  • Mathematica
    okQ[n_] := DivisorSum[n, Total[IntegerDigits[#, 2]]*(-1)^Boole[#==n]&]>0; Select[Range[120], okQ] (* Jean-François Alcover, Dec 06 2015 *)
  • PARI
    A192895(n) = sumdiv(n, d, hammingweight(d)*(-1)^(d==n)); \\ Charles R Greathouse IV, Feb 07 2013
    isA175526(n) = (A192895(n) > 0);
    n = 0; i = 0; while(i < 10000, n++; if(isA175526(n), i++; write("b175526.txt", i, " ", n)));
    \\ Antti Karttunen, May 11 2015
    
  • PARI
    is(n)=sumdiv(n,d,hammingweight(d))>2*hammingweight(n) \\ Charles R Greathouse IV, Jan 28 2016
  • Sage
    is_A175526 = lambda x: sum(A000120(d) for d in divisors(x)) > 2*A000120(x)
    A175526 = filter(is_A175526, IntegerRange(1, 10**4))
    # D. S. McNeil, Dec 04 2010
    

A192895 A000120-deficiency of n.

Original entry on oeis.org

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

Author

Reinhard Zumkeller, Jul 12 2011

Keywords

Crossrefs

Cf. A257691 (positions where a(n) <= 0), A294905 (and its char.fun).

Programs

  • Haskell
    a192895 n =
       sum (map a000120 $ filter ((== 0) . (mod n)) [1..n-1]) - a000120 n
    a192895_list = map a192895 [1..]
    
  • Mathematica
    a[n_] := DivisorSum[n, Total[IntegerDigits[#, 2]]*(-1)^Boole[# == n]&]; Array[a, 80] (* Jean-François Alcover, Dec 05 2015, adapted from PARI *)
  • PARI
    a(n)=sumdiv(n,d,hammingweight(d)*(-1)^(d==n)) \\ Charles R Greathouse IV, Feb 07 2013
    
  • Python
    from sympy import divisors
    def A192895(n): return sum((d.bit_count() if dChai Wah Wu, Jul 25 2023

Formula

a(n) = Sum(A000120(d): 1 <= d < n and n mod d = 0) - A000120(n); see A175522 for motivation and more information;
a(A175524(n)) < 0; a(A175522(n)) = 0; a(A175526(n)) > 0.
a(n) = A292257(n) - A000120(n). - Antti Karttunen, Nov 10 2017

A292257 a(n) is the total number of 1's in binary expansion of all proper divisors of n.

Original entry on oeis.org

0, 1, 1, 2, 1, 4, 1, 3, 3, 4, 1, 7, 1, 5, 5, 4, 1, 8, 1, 7, 6, 5, 1, 10, 3, 5, 5, 9, 1, 14, 1, 5, 6, 4, 6, 13, 1, 5, 6, 10, 1, 15, 1, 9, 11, 6, 1, 13, 4, 9, 5, 9, 1, 14, 6, 13, 6, 6, 1, 23, 1, 7, 11, 6, 6, 14, 1, 7, 7, 15, 1, 18, 1, 5, 12, 9, 7, 16, 1, 13, 9, 5, 1, 24, 5, 6, 7, 13, 1, 26, 7, 11, 8, 7, 6, 16, 1, 11, 10, 15, 1, 14, 1, 13, 18
Offset: 1

Author

Antti Karttunen, Oct 04 2017

Keywords

Comments

If a(n) == A000120(n), then n is in A175522, if a(n) < A000120(n), then n is in A175524, and if a(n) > A000120(n), then n is in A175526.

Programs

  • Mathematica
    a[n_] := DivisorSum[n, DigitCount[#, 2, 1] &, # < n &]; Array[a, 100] (* Amiram Eldar, Jul 20 2023 *)
    Table[Total[Flatten[IntegerDigits[#,2]&/@Most[Divisors[n]]]],{n,120}] (* Harvey P. Dale, Oct 11 2024 *)
  • PARI
    A292257(n) = sumdiv(n,d,(d
    				

Formula

a(n) = Sum_{d|n, dA000120(d).
a(n) = A093653(n) - A000120(n).
a(n) = A192895(n) + A000120(n).
a(n) = A001222(A293214(n)).
A000035(a(n)) = A000035(A290090(n)). [Parity-wise equivalent with A290090.]

A257691 Numbers that are not A000120-abundant.

Original entry on oeis.org

1, 2, 3, 5, 7, 11, 13, 17, 19, 23, 25, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 95, 97, 101, 103, 107, 109, 111, 113, 119, 121, 123, 125, 127, 131, 137, 139, 149, 151, 157, 163, 167, 169, 173, 179, 181, 187, 191, 193, 197, 199, 211, 219, 221, 223, 227, 229, 233, 239, 241, 247, 251, 257
Offset: 1

Author

Antti Karttunen, May 11 2015

Keywords

Comments

A000120-nonabundant numbers: Numbers n for which A192895(n) <= 0.

Crossrefs

Complement of A175526 (A000120-abundant numbers).
Disjoint union of A175522 (A000120-perfect numbers) and A175524 (A000120-deficient numbers).
Differs from A206074(n-1), A186891(n) and A257688(n) for the first time at n=19, where a(19) = 59, while A206074(18) = A186891(19) = A257688(19) = 55, a term missing from here.
Differs from A257689 for the first time at n=24, where a(24) = 79, while A257689(24) = 77, a term missing from here.

Programs

A175548 Binary weight of sigma(n).

Original entry on oeis.org

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

Author

Vladimir Shevelev, Dec 03 2010

Keywords

Comments

The sequence is considered in connection with A175522, A175524, A175526.
a(n)=1 if n is in A046528. - Robert Israel, Nov 07 2017

Examples

			a(4) = 3 because the divisors of 4 add up to 7, a number which in binary is written as 3 ones.
		

Programs

  • Maple
    seq(convert(convert(numtheory:-sigma(n),base,2),`+`),n=1..100); # Robert Israel, Nov 07 2017
  • Mathematica
    Table[Plus@@IntegerDigits[DivisorSigma[1, n], 2], {n, 80}] (* Alonso del Arte, Dec 03 2010 *)
  • PARI
    a(n) = hammingweight(sigma(n)); \\ Michel Marcus, Feb 08 2016

Formula

a(n) = A000120(A000203(n)).

Extensions

More terms from Antti Karttunen, Nov 07 2017

A324102 Numbers whose "unary-binary encoded prime factorization" (A156552) is A000120-deficient.

Original entry on oeis.org

2, 4, 6, 8, 12, 14, 18, 20, 24, 32, 38, 42, 44, 48, 52, 54, 56, 60, 70, 80, 104, 106, 108, 110, 124, 128, 130, 132, 140, 150, 152, 162, 168, 172, 174, 176, 188, 190, 192, 200, 204, 230, 234, 236, 242, 272, 280, 288, 294, 300, 304, 308, 330, 338, 344, 350, 368, 378, 384, 390, 392, 396, 412, 424, 432, 436, 450, 476, 488, 492, 494, 504, 512
Offset: 1

Author

Antti Karttunen, Feb 18 2019

Keywords

Comments

Numbers n for which A192895(A156552(n)) < 0.
Numbers n such that A156552(n) is in A175524.

Crossrefs

Cf. A324101 (complement, apart from 1 which is in neither sequence).

A178344 a(n) = Sum_i prime(i+1)^b(i) where n = Sum_{i>=0} b(i)*2^e(i) is the binary representation of n.

Original entry on oeis.org

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

Author

Juri-Stepan Gerasimov, May 25 2010, Jan 06 2010

Keywords

Comments

a(0) = 0 might be a more logical value for the initial term. - Antti Karttunen, Sep 28 2018

Examples

			a(16)=15 because 10000 is the base-2 representation of n=16 and 11^1 + 7^0 + 5^0 + 3^0 + 2^0 = 15.
		

Crossrefs

Cf. A178562 (first differences).

Programs

  • Maple
    A178344 := proc(n)
        if n = 0 then
            dgs := [0] ;
        else
            dgs := convert(n,base,2) ;
        end if;
        add(ithprime(i)^dgs[i],i=1..nops(dgs)) ;
    end proc:
    seq(A178344(n),n=0..73) ; # R. J. Mathar, Sep 28 2018
  • Mathematica
    Array[Total@ MapIndexed[Prime[First@ #2]^#1 &, Reverse@ IntegerDigits[#, 2]] &, 74, 0] (* Michael De Vlieger, Feb 19 2019 *)
  • PARI
    a(n) = my(b=Vecrev(binary(n))); if (n==0, b=[0]); sum(i=1, #b, prime(i)^b[i]); \\ Michel Marcus, Sep 29 2018

Formula

For n >= 1, a(n) = A089625(n) + A080791(n). - Antti Karttunen, Sep 28 2018

Extensions

Offset modified, keyword:base added by R. J. Mathar, May 28 2010

A177052 Ceiling(n/2)-abundant numbers.

Original entry on oeis.org

6, 12, 18, 20, 24, 28, 30, 36, 40, 42, 48, 54, 56, 60, 66, 70, 72, 78, 80, 84, 88, 90, 96, 100, 102, 104, 108, 112, 114, 120, 126, 132, 138, 140, 144, 150, 156, 160, 162, 168, 174, 176, 180, 186, 192, 196, 198, 200, 204, 208, 210, 216, 220, 222, 224, 228
Offset: 1

Author

Vladimir Shevelev, Dec 09 2010

Keywords

Comments

For definition, see A175522.
All positive numbers == 0 (mod 6) are in the sequence (basically A008588). In addition, note that all odd primes are ceiling(n/2)-deficient numbers. The first odd term of the sequence is 315.

Crossrefs

Programs

  • PARI
    isok(n) = sumdiv(n, d, (d ceil(n/2); \\ Michel Marcus, Feb 08 2016
  • Sage
    is_A177052 = lambda n: sum(ceil(d/2) for d in divisors(n)) > 2*ceil(n/2) # D. S. McNeil, Dec 10 2010
    

Formula

{n : Sum_{d|n, dA004526(1+d) > A004526(1+n)}. [R. J. Mathar, Dec 11 2010]
Showing 1-10 of 13 results. Next