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.

User: Tom Verhoeff

Tom Verhoeff's wiki page.

Tom Verhoeff has authored 6 sequences.

A038549 Least number with exactly n divisors that are at most its square root.

Original entry on oeis.org

1, 4, 12, 24, 36, 60, 192, 120, 180, 240, 576, 360, 1296, 900, 720, 840, 9216, 1260, 786432, 1680, 2880, 15360, 3600, 2520, 6480, 61440, 6300, 6720, 2359296, 5040, 3221225472, 7560, 46080, 983040, 25920, 10080, 206158430208, 32400, 184320
Offset: 1

Author

Keywords

Comments

Least number of identical objects that can be arranged in exactly n ways in a rectangle, modulo rotation.
Smallest number which has n distinct unordered factorizations of the form x*y. - Lekraj Beedassy, Jan 09 2008
Note that an upper bound on a(n) is 3*2^(n-1), which is attained at n = 4 and the odd primes in A005382 (primes p such that 2p-1 is also prime). - T. D. Noe, Jul 13 2013

Crossrefs

Cf. A038548 (records), A072671, A004778, A086921.
Cf. A227068 (similar, but with limit < sqrt).

Programs

  • Haskell
    import Data.List (elemIndex)
    import Data.Maybe (fromJust)
    a038549 = (+ 1) . fromJust . (`elemIndex` a038548_list)
    -- Reinhard Zumkeller, Dec 26 2012
  • Mathematica
    nn = 18; t = Table[0, {nn}]; found = 0; n = 0; While[found < nn, n++; c = Length[Select[Divisors[n], # <= Sqrt[n] &]]; If[c > 0 && c <= nn && t[[c]] == 0, t[[c]] = n; found++]]; t (* T. D. Noe, Jul 10 2013 *)

Formula

a(n) = min(A005179(2n-1), A005179(2n)).

Extensions

More terms from David W. Wilson.

A038550 Products of an odd prime and a power of two (sorted).

Original entry on oeis.org

3, 5, 6, 7, 10, 11, 12, 13, 14, 17, 19, 20, 22, 23, 24, 26, 28, 29, 31, 34, 37, 38, 40, 41, 43, 44, 46, 47, 48, 52, 53, 56, 58, 59, 61, 62, 67, 68, 71, 73, 74, 76, 79, 80, 82, 83, 86, 88, 89, 92, 94, 96, 97, 101, 103, 104, 106, 107, 109, 112, 113, 116, 118, 122, 124, 127
Offset: 1

Author

Keywords

Comments

2007. For example, 37 = 18 + 19; 48 = 15 + 16 + 17; 56 = 5 + 6 + 7 + 8 + 9 + 10 + 11. (Edited by M. F. Hasler, Aug 29 2020: "positive" was missing here. If nonnegative integers are allowed, none of the triangular numbers 3, 6, 10, ... would be in the corresponding sequence. If negative integers are also allowed, it would only have powers of 2 (A000079) which are the only positive integers not the sum of more than one consecutive positive integers, since any x > 0 is the sum of 1-x through x.)
Numbers that are the difference of two triangular numbers in exactly two ways.
Numbers with largest odd divisor a prime number. - Juri-Stepan Gerasimov, Aug 16 2016
Numbers k for which A001222(A000265(k)) = 1. - Antti Karttunen, Jul 09 2020

Crossrefs

Subsequences: A334101, A335431, A335911.
Subsequence of A093641 and of A336101.

Programs

  • Haskell
    a038550 n = a038550_list !! (n-1)
    a038550_list = filter ((== 2) . a001227) [1..]
    -- Reinhard Zumkeller, May 01 2012
    
  • Mathematica
    Select[Range[127],DivisorSigma[0,Max[Select[Divisors[#],OddQ]]]-1==1&] (* Jayanta Basu, Apr 30 2013 *)
    fQ[n_] := Module[{p, e}, {p, e} = Transpose[FactorInteger[n]]; (Length[p] == 2 && p[[1]] == 2 && e[[2]] == 1) || (Length[p] == 1 && p[[1]] > 2 && e[[1]] == 1)]; Select[Range[2, 127], fQ] (* T. D. Noe, Apr 30 2013 *)
    upto=150;Module[{pmax=PrimePi[upto],tmax=Ceiling[Log[2,upto]]}, Select[ Sort[ Flatten[ Outer[ Times, Prime[ Range[ 2,pmax]], 2^Range[0,tmax]]]],#<=upto&]] (* Harvey P. Dale, Oct 18 2013 *)
    Flatten@Position[PrimeQ[BitShiftRight[#, IntegerExponent[#, 2]]&/@Range[#]], True]&@127 (* Federico Provvedi, Dec 14 2021 *)
  • PARI
    is(n)=isprime(n>>valuation(n,2)) \\ Charles R Greathouse IV, Apr 30 2013

Formula

A001227(a(n)) = 2. - Reinhard Zumkeller, May 01 2012
a(n) ~ 0.5 n log n. - Charles R Greathouse IV, Apr 30 2013
A000265(a(n)) is a prime. - Juri-Stepan Gerasimov, Aug 16 2016
Sum_{n>=1} 1/a(n)^s = (2^s*P(s) - 1)/(2^s - 1), for s > 1, where P is the prime zeta function. - Amiram Eldar, Dec 19 2020

Extensions

Edited by N. J. A. Sloane at the suggestion of Zak Seidov, Sep 15 2007

A036552 List of pairs (m,2m) where m is the least unused positive number.

Original entry on oeis.org

1, 2, 3, 6, 4, 8, 5, 10, 7, 14, 9, 18, 11, 22, 12, 24, 13, 26, 15, 30, 16, 32, 17, 34, 19, 38, 20, 40, 21, 42, 23, 46, 25, 50, 27, 54, 28, 56, 29, 58, 31, 62, 33, 66, 35, 70, 36, 72, 37, 74, 39, 78, 41, 82, 43, 86, 44, 88, 45, 90, 47, 94, 48, 96, 49, 98, 51, 102
Offset: 1

Author

Keywords

Comments

A permutation of the natural numbers. Inverse permutation is A065037.

Crossrefs

Alternating merge of A003159 and A036554. Cf. A064736, A065037.

Programs

  • Haskell
    import Data.List (delete)
    a036552 n = a036552_list !! (n-1)
    a036552_list = g [1..] where
       g (x:xs) = x : (2*x) : (g $ delete (2*x) xs)
    -- Reinhard Zumkeller, Feb 07 2011
    
  • Mathematica
    w = {}; Do[ w = If[ FreeQ[w, k], w = Join[w, {k, 2k}], w], {k, 100}]; w
    (* Jean-François Alcover, Nov 04 2011, after Wouter Meeussen *)
  • PARI
    apairs(N) = my(m=0, r=List(), i=0); while(#rRuud H.G. van Tol, May 09 2024

A038547 Least number with exactly n odd divisors.

Original entry on oeis.org

1, 3, 9, 15, 81, 45, 729, 105, 225, 405, 59049, 315, 531441, 3645, 2025, 945, 43046721, 1575, 387420489, 2835, 18225, 295245, 31381059609, 3465, 50625, 2657205, 11025, 25515, 22876792454961, 14175, 205891132094649, 10395, 1476225, 215233605
Offset: 1

Author

Keywords

Comments

Also least odd number with exactly n divisors. - Lekraj Beedassy, Aug 30 2006
a(2n-1) = {1, 9, 81, 729, 225, 59049, ...} are the squares. A122842(n) = sqrt(a(2n-1)) = {1, 3, 9, 27, 15, 243, 729, 45, 6561, 19683, 135, 177147, 225, 105, 4782969, 14348907, 1215, ...}. - Alexander Adamchuk, Sep 13 2006
Also the least number k such that there are n partitions of k whose elements are consecutive integers. I.e., 1=1, 3=1+2=3, 9=2+3+4=4+5=9, 15=1+2+3+4+5=4+5+6=7+8=15, etc. - Robert G. Wilson v, Jun 02 2007
The politeness of an integer, A069283(n), is defined to be the number of its nontrivial runsum representations, and the sequence 3, 9, 15, 81, 45, 729, 105, ... represents the least integers to have a politeness of 1, 2, 3, 4, ... This is also the sequence of smallest integers with n+1 odd divisors and so apart from the leading 1, is precisely this sequence. - Ant King, Sep 23 2009
a(n) is also the least number k with the property that the symmetric representation of sigma(k) has n subparts. - Omar E. Pol, Dec 31 2016

Examples

			a(2^3) = 105 = 3*5 while a(2^4) = 945 = 3^3 * 5 * 7. There are 5 partition lists for the exponents of numbers with 16 odd divisors; they are {1, 1, 1, 1}, {3, 1, 1}, {3, 3}, {7, 1}, and {15} that result in the 5 numbers 1155, 945, 3375, 10935, and 14348907. Number a(3^8) = a(6561) = 3^2 * 5^2 * ... * 19^2 * 23^2 = 12442607161209225 while a(3^9) = a(19683) = 3^8 * 5^2 * ... * 19^2 * 23^2 = 9070660620521525025. The numbers a(5^52) = 3^4 * 5^4 * 7^4 * ... and a(5^53) = 3^24 * 5^4 * 7^4 * ... have 393 and 402 digits, respectively.  - _Hartmut F. W. Hoft_, Nov 03 2022
		

Crossrefs

A122842 = sqrt( a(2n-1) ).
Row 1 of A266531. - Omar E. Pol, Dec 31 2016

Programs

  • Haskell
    import Data.List  (find)
    import Data.Maybe (fromJust)
    a038547 n = fromJust $ find ((== n) . length . divisors) [1,3..]
       where divisors m = filter ((== 0) . mod m) [1..m]
    -- Reinhard Zumkeller, Feb 24 2011
    
  • Mathematica
    Table[Select[Range[1,532000,2],DivisorSigma[0,#]==k+1 &,1],{k,0,15}]//Flatten (* Ant King, Nov 28 2010 *)
    2#-1&/@With[{ds=DivisorSigma[0,Range[1,600000,2]]},Table[Position[ds,n,1,1],{n,16}]]//Flatten (* The program is not suitable for generating terms beyond a(16) *) (* Harvey P. Dale, Jun 06 2017 *)
    (* direct computation of A038547(n) *)
    (* Function by _Vaclav Kotesovec_in A005179, Apr 04 2021, modified for odd divisors *)
    mp[1, m_] := {{}}; mp[n_, 1] := {{}}; mp[n_?PrimeQ, m_] := If[mHartmut F. W. Hoft, Mar 05 2023 *)
  • PARI
    for(nd=1,15,forstep(k=1,10^66,2,if(nd==numdiv(k),print1(k,", ");break())))
    
  • Python
    from math import prod
    from sympy import isprime, divisors, prime
    def A038547(n):
        def mult_factors(n):
            if isprime(n):
                return [(n,)]
            c = []
            for d in divisors(n,generator=True):
                if 1Chai Wah Wu, Aug 17 2024

Formula

a(p) = 3^(p-1) for primes p. - Zak Seidov, Apr 18 2006
a(n) = A119265(n,n). - Reinhard Zumkeller, May 11 2006
It was suggested by Alexander Adamchuk that for all n >= 1, we have a(3^(n-1)) = (p(n)#/2)^2 = (A002110(n)/2)^2 = A070826(n)^2. But this is false! E.g., (p(n)#/2)^2 = 3^2 * 5^2 * 7^2 * ... * 23^2 * 29^2 does indeed have 3^9 odd factors, but it is greater than 3^8 * 5^2 * 7^2 * ... * 23^2 which has 9*3*3*3*3*3*3*3 = 9*3^7 = 3^9 odd factors. - Richard Sabey, Oct 06 2007
a(A053640(m)) = a(A000005(A053624(m))) = A053624(m). - Rick L. Shepherd, Apr 20 2008
a(p^k) = Product_{i=1..k} prime(i+1)^(p-1), p prime and k >= 0, only when p_(k+1) < 3^p. - Hartmut F. W. Hoft, Nov 03 2022

Extensions

Corrected by Ron Knott, Feb 22 2001
a(30) from Zak Seidov, Apr 18 2006
a(32)-a(34) from Lekraj Beedassy, Aug 30 2006

A038548 Number of divisors of n that are at most sqrt(n).

Original entry on oeis.org

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

Keywords

Comments

Number of ways to arrange n identical objects in a rectangle, modulo rotation.
Number of unordered solutions of x*y = n. - Colin Mallows, Jan 26 2002
Number of ways to write n-1 as n-1 = x*y + x + y, 0 <= x <= y <= n. - Benoit Cloitre, Jun 23 2002
Also number of values for x where x+2n and x-2n are both squares (e.g., if n=9, then 18+18 and 18-18 are both squares, as are 82+18 and 82-18 so a(9)=2); this is because a(n) is the number of solutions to n=k(k+r) in which case if x=r^2+2n then x+2n=(r+2k)^2 and x-2n=r^2 (cf. A061408). - Henry Bottomley, May 03 2001
Also number of sums of sequences of consecutive odd numbers or consecutive even numbers including sequences of length 1 (e.g., 12 = 5+7 or 2+4+6 or 12 so a(12)=3). - Naohiro Nomoto, Feb 26 2002
Number of partitions whose consecutive parts differ by exactly two.
a(n) depends only on prime signature of n (cf. A025487). So a(24) = a(375) since 24=2^3*3 and 375=3*5^3 both have prime signature (3,1). - Christian G. Bower, Jun 06 2005
Also number of partitions of n such that if k is the largest part, then each of the parts 1,2,...,k-1 occurs exactly twice. Example: a(12)=3 because we have [3,3,2,2,1,1],[2,2,2,2,2,1,1] and [1,1,1,1,1,1,1,1,1,1,1,1]. - Emeric Deutsch, Mar 07 2006
a(n) is also the number of nonnegative integer solutions of the Diophantine equation 4*x^2 - y^2 = 16*n. For example, a(24)=4 because there are 4 solutions: (x,y) = (10,4), (11,10), (14,20), (25,46). - N-E. Fahssi, Feb 27 2008
a(n) is the number of even divisors of 2*n that are <= sqrt(2*n). - Joerg Arndt, Mar 04 2010
First differences of A094820. - John W. Layman, Feb 21 2012
a(n) = #{k: A027750(n,k) <= A000196(n)}; a(A008578(n)) = 1; a(A002808(n)) > 1. - Reinhard Zumkeller, Dec 26 2012
Row lengths of the tables in A161906 and A161908. - Reinhard Zumkeller, Mar 08 2013
Number of positive integers in the sequence defined by x_0 = n, x_(k+1) = (k+1)*(x_k-2)/(k+2) or equivalently by x_k = n/(k+1) - k. - Luc Rousseau, Mar 03 2018
Expanding the first comment: Number of rectangles with area n and integer side lengths, modulo rotation. Also number of 2D grids of n congruent squares, in a rectangle, modulo rotation (cf. A000005 for rectangles instead of squares; cf. A034836 for the 3D case). - Manfred Boergens, Jun 08 2021
Number of divisors of n that have an even number of prime divisors (counted with multiplicity), or in other words, number of terms of A028260 that divide n. - Antti Karttunen, Apr 17 2022

Examples

			a(4) = 2 since 4 = 2 * 2 = 4 * 1. Also A034178(4*4) = 2 since 16 = 4^2 - 0^2 = 5^2 - 3^2. - _Michael Somos_, May 11 2011
x + x^2 + x^3 + 2*x^4 + x^5 + 2*x^6 + x^7 + 2*x^8 + 2*x^9 + 2*x^10 + x^11 + ...
		

References

  • George E. Andrews and Kimmo Eriksson, Integer Partitions, Cambridge Univ. Press, 2004, page 18, exer. 21, 22.

Crossrefs

Different from A068108. Records give A038549, A004778, A086921.
Cf. A066839, A033676, row sums of A303300.
Inverse Möbius transform of A065043.
Cf. A244664 (Dgf at s=2), A244665 (Dgf at s=3).

Programs

Formula

a(n) = ceiling(d(n)/2), where d(n) = number of divisors of n (A000005).
a(2k) = A034178(2k) + A001227(k). a(2k+1) = A034178(2k+1). - Naohiro Nomoto, Feb 26 2002
G.f.: Sum_{k>=1} x^(k^2)/(1-x^k). - Jon Perry, Sep 10 2004
Dirichlet g.f.: (zeta(s)^2 + zeta(2*s))/2. - Christian G. Bower, Jun 06 2005 [corrected by Vaclav Kotesovec, Aug 19 2019]
a(n) = (A000005(n) + A010052(n))/2. - Omar E. Pol, Jun 23 2009
a(n) = A034178(4*n). - Michael Somos, May 11 2011
2*a(n) = A161841(n). - R. J. Mathar, Mar 07 2021
a(n) = A000005(n) - A056924(n) = A056924(n) + A010052(n) = Sum_{d|n} A065043(d). - Antti Karttunen, Apr 17 2022
Sum_{k=1..n} a(k) ~ n*log(n)/2 + (gamma - 1/2)*n, where gamma is Euler's constant (A001620). - Amiram Eldar, Nov 27 2022

A036554 Numbers whose binary representation ends in an odd number of zeros.

Original entry on oeis.org

2, 6, 8, 10, 14, 18, 22, 24, 26, 30, 32, 34, 38, 40, 42, 46, 50, 54, 56, 58, 62, 66, 70, 72, 74, 78, 82, 86, 88, 90, 94, 96, 98, 102, 104, 106, 110, 114, 118, 120, 122, 126, 128, 130, 134, 136, 138, 142, 146, 150, 152, 154, 158, 160, 162, 166, 168, 170, 174
Offset: 1

Author

Keywords

Comments

Fraenkel (2010) called these the "dopey" numbers.
Also n such that A035263(n)=0 or A050292(n) = A050292(n-1).
Indices of even numbers in A033485. - Philippe Deléham, Mar 16 2004
a(n) is an odious number (see A000069) for n odd; a(n) is an evil number (see A001969) for n even. - Philippe Deléham, Mar 16 2004
Indices of even numbers in A007913, in A001511. - Philippe Deléham, Mar 27 2004
This sequence consists of the increasing values of n such that A097357(n) is even. - Creighton Dement, Aug 14 2004
Numbers with an odd number of 2's in their prime factorization (e.g., 8 = 2*2*2). - Mark Dow, Sep 04 2007
Equals the set of natural numbers not in A003159 or A141290. - Gary W. Adamson, Jun 22 2008
Represents the set of CCW n-th moves in the standard Tower of Hanoi game; and terms in even rows of a [1, 3, 5, 7, 9, ...] * [1, 2, 4, 8, 16, ...] multiplication table. Refer to the example. - Gary W. Adamson, Mar 20 2010
Refer to the comments in A003159 relating to A000041 and A174065. - Gary W. Adamson, Mar 21 2010
If the upper s-Wythoff sequence of s is s, then s=A036554. (See A184117 for the definition of lower and upper s-Wythoff sequences.) Starting with any nondecreasing sequence s of positive integers, A036554 is the limit when the upper s-Wythoff operation is iterated. For example, starting with s=(1,4,9,16,...) = (n^2), we obtain lower and upper s-Wythoff sequences
a=(1,3,4,5,6,8,9,10,11,12,14,...) = A184427;
b=(2,7,12,21,31,44,58,74,...) = A184428.
Then putting s=a and repeating the operation gives
b'=(2,6,8,10,13,17,20,...), which has the same first four terms as A036554. - Clark Kimberling, Jan 14 2011
Or numbers having infinitary divisor 2, or the same, having factor 2 in Fermi-Dirac representation as a product of distinct terms of A050376. - Vladimir Shevelev, Mar 18 2013
Thus, numbers not in A300841 or in A302792. Equally, sequence 2*A300841(n) sorted into ascending order. - Antti Karttunen, Apr 23 2018

Examples

			From _Gary W. Adamson_, Mar 20 2010: (Start)
Equals terms in even numbered rows in the following multiplication table:
(rows are labeled 1,2,3,... as with the Towers of Hanoi disks)
   1,  3,  5,  7,  9, 11, ...
   2,  6, 10, 14, 18, 22, ...
   4, 12, 20, 28, 36, 44, ...
   8, 24, 40, 56, 72, 88, ...
   ...
As shown, 2, 6, 8, 10, 14, ...; are in even numbered rows, given the row with (1, 3, 5, 7, ...) = row 1.
The term "5" is in an odd row, so the 5th Towers of Hanoi move is CW, moving disc #1 (in the first row).
a(3) = 8 in row 4, indicating that the 8th Tower of Hanoi move is CCW, moving disc #4.
A036554 bisects the positive nonzero natural numbers into those in the A036554 set comprising 1/3 of the total numbers, given sufficiently large n.
This corresponds to 1/3 of the TOH moves being CCW and 2/3 CW. Row 1 of the multiplication table = 1/2 of the natural numbers, row 2 = 1/4, row 3 = 1/8 and so on, or 1 = (1/2 + 1/4 + 1/8 + 1/16 + ...). Taking the odd-indexed terms of this series given offset 1, we obtain 2/3 = 1/2 + 1/8 + 1/32 + ..., while sum of the even-indexed terms is 1/3. (End)
		

Crossrefs

Indices of odd numbers in A007814. Subsequence of A036552. Complement of A003159. Also double of A003159.
Cf. A000041, A003157, A003158, A005408, A052330, A072939, A079523, A096268 (characteristic function, when interpreted with offset 1), A141290, A174065, A300841.

Programs

  • Haskell
    a036554 = (+ 1) . a079523  -- Reinhard Zumkeller, Mar 01 2012
    
  • Magma
    [2*m:m in [1..100] | Valuation(m,2) mod 2 eq 0]; // Marius A. Burtea, Aug 29 2019
    
  • Mathematica
    Select[Range[200],OddQ[IntegerExponent[#,2]]&] (* Harvey P. Dale, Oct 19 2011 *)
  • PARI
    is(n)=valuation(n,2)%2 \\ Charles R Greathouse IV, Nov 20 2012
    
  • Python
    def ok(n):
      c = 0
      while n%2 == 0: n //= 2; c += 1
      return c%2 == 1
    print([m for m in range(1, 175) if ok(m)]) # Michael S. Branicky, Feb 06 2021
    
  • Python
    from itertools import count, islice
    def A036554_gen(startvalue=1): return filter(lambda n:(~n & n-1).bit_length()&1,count(max(startvalue,1))) # generator of terms >= startvalue
    A036554_list = list(islice(A036554_gen(),30)) # Chai Wah Wu, Jul 05 2022
    
  • Python
    is_A036554 = lambda n: A001511(n)&1==0 # M. F. Hasler, Nov 26 2024
    
  • Python
    def A036554(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            kmin = kmax >> 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x):
            c, s = n+x, bin(x)[2:]
            l = len(s)
            for i in range(l&1,l,2):
                c -= int(s[i])+int('0'+s[:i],2)
            return c
        return bisection(f,n,n) # Chai Wah Wu, Jan 29 2025

Formula

a(n) = A079523(n)+1 = A072939(n)-1.
a(n) = A003156(n) + n = A003157(n) - n = A003158(n) - n + 1. - Philippe Deléham, Apr 10 2004
Values of k such that A091297(k) = 2. - Philippe Deléham, Feb 25 2004
a(n) ~ 3n. - Charles R Greathouse IV, Nov 20 2012 [In fact, a(n) = 3n + O(log n). - Charles R Greathouse IV, Nov 27 2024]
a(n) = 2*A003159(n). - Clark Kimberling, Sep 30 2014
{a(n)} = A052330({A005408(n)}), where {a(n)} denotes the set of integers in the sequence. - Peter Munn, Aug 26 2019

Extensions

Incorrect equation removed from formula by Peter Munn, Dec 04 2020