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

A357689 a(n) = n/A204455(n), where A204455(n) is the product of odd noncomposite divisors of n.

Original entry on oeis.org

1, 2, 1, 4, 1, 2, 1, 8, 3, 2, 1, 4, 1, 2, 1, 16, 1, 6, 1, 4, 1, 2, 1, 8, 5, 2, 9, 4, 1, 2, 1, 32, 1, 2, 1, 12, 1, 2, 1, 8, 1, 2, 1, 4, 3, 2, 1, 16, 7, 10, 1, 4, 1, 18, 1, 8, 1, 2, 1, 4, 1, 2, 3, 64, 1, 2, 1, 4, 1, 2, 1, 24, 1, 2, 5, 4, 1, 2, 1, 16, 27, 2, 1, 4, 1, 2, 1, 8, 1, 6, 1, 4, 1, 2, 1, 32, 1, 14, 3, 20
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Oct 09 2022

Keywords

Examples

			n = A204455(n)*a(n): 1 = 1*1, 2 = 1*2, 3 = 3*1, 4 = 1*4, 5 = 5*1, 6 = 3*2.
		

Crossrefs

Equals A324873 up to a(32) = 32.

Programs

  • Magma
    [(2*n)/&*PrimeDivisors(2*n): n in [1..100]];
    
  • Magma
    [n/&*[d: d in Divisors(n) | d*#[m: m in [0..n-1] | -m^d mod d eq m] eq
      #[m: m in [0..n-1] | m^d mod d eq m]]: n in [1..100]];
  • Mathematica
    f[p_, e_] := p^(e - If[p == 2, 0, 1]); a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Oct 10 2022 *)

Formula

a(n)*A204455(n) = n.
a(n) = EvenPart(n)*A003557(OddPart(n)). - Peter Munn, Oct 09 2022
Multiplicative with a(p^e) = p^(e-1) if p > 2 and a(2^e) = 2^e. - Amiram Eldar, Oct 10 2022
a(n) = A003557(2*n). - Ridouane Oudra, Jul 12 2025

A000079 Powers of 2: a(n) = 2^n.

Original entry on oeis.org

1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, 536870912, 1073741824, 2147483648, 4294967296, 8589934592
Offset: 0

Views

Author

Keywords

Comments

2^0 = 1 is the only odd power of 2.
Number of subsets of an n-set.
There are 2^(n-1) compositions (ordered partitions) of n (see for example Riordan). This is the unlabeled analog of the preferential labelings sequence A000670.
This is also the number of weakly unimodal permutations of 1..n + 1, that is, permutations with exactly one local maximum. E.g., a(4) = 16: 12345, 12354, 12453, 12543, 13452, 13542, 14532 and 15432 and their reversals. - Jon Perry, Jul 27 2003 [Proof: see next line! See also A087783.]
Proof: n must appear somewhere and there are 2^(n-1) possible choices for the subset that precedes it. These must appear in increasing order and the rest must follow n in decreasing order. QED. - N. J. A. Sloane, Oct 26 2003
a(n+1) is the smallest number that is not the sum of any number of (distinct) earlier terms.
Same as Pisot sequences E(1, 2), L(1, 2), P(1, 2), T(1, 2). See A008776 for definitions of Pisot sequences.
With initial 1 omitted, same as Pisot sequences E(2, 4), L(2, 4), P(2, 4), T(2, 4). - David W. Wilson
Not the sum of two or more consecutive numbers. - Lekraj Beedassy, May 14 2004
Least deficient or near-perfect numbers (i.e., n such that sigma(n) = A000203(n) = 2n - 1). - Lekraj Beedassy, Jun 03 2004. [Comment from Max Alekseyev, Jan 26 2005: All the powers of 2 are least deficient numbers but it is not known if there exists a least deficient number that is not a power of 2.]
Almost-perfect numbers referred to as least deficient or slightly defective (Singh 1997) numbers. Does "near-perfect numbers" refer to both almost-perfect numbers (sigma(n) = 2n - 1) and quasi-perfect numbers (sigma(n) = 2n + 1)? There are no known quasi-perfect or least abundant or slightly excessive (Singh 1997) numbers.
The sum of the numbers in the n-th row of Pascal's triangle; the sum of the coefficients of x in the expansion of (x+1)^n.
The Collatz conjecture (the hailstone sequence will eventually reach the number 1, regardless of which positive integer is chosen initially) may be restated as (the hailstone sequence will eventually reach a power of 2, regardless of which positive integer is chosen initially).
The only hailstone sequence which doesn't rebound (except "on the ground"). - Alexandre Wajnberg, Jan 29 2005
With p(n) as the number of integer partitions of n, p(i) is the number of parts of the i-th partition of n, d(i) is the number of different parts of the i-th partition of n, m(i,j) is the multiplicity of the j-th part of the i-th partition of n, one has: a(n) = Sum_{i = 1..p(n)} (p(i)! / (Product_{j=1..d(i)} m(i,j)!)). - Thomas Wieder, May 18 2005
The number of binary relations on an n-element set that are both symmetric and antisymmetric. Also the number of binary relations on an n-element set that are symmetric, antisymmetric and transitive.
The first differences are the sequence itself. - Alexandre Wajnberg and Eric Angelini, Sep 07 2005
a(n) is the largest number with shortest addition chain involving n additions. - David W. Wilson, Apr 23 2006
Beginning with a(1) = 0, numbers not equal to the sum of previous distinct natural numbers. - Giovanni Teofilatto, Aug 06 2006
For n >= 1, a(n) is equal to the number of functions f:{1, 2, ..., n} -> {1, 2} such that for a fixed x in {1, 2, ..., n} and a fixed y in {1, 2} we have f(x) != y. - Aleksandar M. Janjic and Milan Janjic, Mar 27 2007
Let P(A) be the power set of an n-element set A. Then a(n) is the number of pairs of elements {x,y} of P(A) for which x = y. - Ross La Haye, Jan 09 2008
a(n) is the number of permutations on [n+1] such that every initial segment is an interval of integers. Example: a(3) counts 1234, 2134, 2314, 2341, 3214, 3241, 3421, 4321. The map "p -> ascents of p" is a bijection from these permutations to subsets of [n]. An ascent of a permutation p is a position i such that p(i) < p(i+1). The permutations shown map to 123, 23, 13, 12, 3, 2, 1 and the empty set respectively. - David Callan, Jul 25 2008
2^(n-1) is the largest number having n divisors (in the sense of A077569); A005179(n) is the smallest. - T. D. Noe, Sep 02 2008
a(n) appears to match the number of divisors of the modified primorials (excluding 2, 3 and 5). Very limited range examined, PARI example shown. - Bill McEachen, Oct 29 2008
Successive k such that phi(k)/k = 1/2, where phi is Euler's totient function. - Artur Jasinski, Nov 07 2008
A classical transform consists (for general a(n)) in swapping a(2n) and a(2n+1); examples for Jacobsthal A001045 and successive differences: A092808, A094359, A140505. a(n) = A000079 leads to 2, 1, 8, 4, 32, 16, ... = A135520. - Paul Curtz, Jan 05 2009
This is also the (L)-sieve transform of {2, 4, 6, 8, ..., 2n, ...} = A005843. (See A152009 for the definition of the (L)-sieve transform.) - John W. Layman, Jan 23 2009
a(n) = a(n-1)-th even natural number (A005843) for n > 1. - Jaroslav Krizek, Apr 25 2009
For n >= 0, a(n) is the number of leaves in a complete binary tree of height n. For n > 0, a(n) is the number of nodes in an n-cube. - K.V.Iyer, May 04 2009
Permutations of n+1 elements where no element is more than one position right of its original place. For example, there are 4 such permutations of three elements: 123, 132, 213, and 312. The 8 such permutations of four elements are 1234, 1243, 1324, 1423, 2134, 2143, 3124, and 4123. - Joerg Arndt, Jun 24 2009
Catalan transform of A099087. - R. J. Mathar, Jun 29 2009
a(n) written in base 2: 1,10,100,1000,10000,..., i.e., (n+1) times 1, n times 0 (A011557(n)). - Jaroslav Krizek, Aug 02 2009
Or, phi(n) is equal to the number of perfect partitions of n. - Juri-Stepan Gerasimov, Oct 10 2009
These are the 2-smooth numbers, positive integers with no prime factors greater than 2. - Michael B. Porter, Oct 04 2009
A064614(a(n)) = A000244(n) and A064614(m) < A000244(n) for m < a(n). - Reinhard Zumkeller, Feb 08 2010
a(n) is the largest number m such that the number of steps of iterations of {r - (largest divisor d < r)} needed to reach 1 starting at r = m is equal to n. Example (a(5) = 32): 32 - 16 = 16; 16 - 8 = 8; 8 - 4 = 4; 4 - 2 = 2; 2 - 1 = 1; number 32 has 5 steps and is the largest such number. See A105017, A064097, A175125. - Jaroslav Krizek, Feb 15 2010
a(n) is the smallest proper multiple of a(n-1). - Dominick Cancilla, Aug 09 2010
The powers-of-2 triangle T(n, k), n >= 0 and 0 <= k <= n, begins with: {1}; {2, 4}; {8, 16, 32}; {64, 128, 256, 512}; ... . The first left hand diagonal T(n, 0) = A006125(n + 1), the first right hand diagonal T(n, n) = A036442(n + 1) and the center diagonal T(2*n, n) = A053765(n + 1). Some triangle sums, see A180662, are: Row1(n) = A122743(n), Row2(n) = A181174(n), Fi1(n) = A181175(n), Fi2(2*n) = A181175(2*n) and Fi2(2*n + 1) = 2*A181175(2*n + 1). - Johannes W. Meijer, Oct 10 2010
Records in the number of prime factors. - Juri-Stepan Gerasimov, Mar 12 2011
Row sums of A152538. - Gary W. Adamson, Dec 10 2008
A078719(a(n)) = 1; A006667(a(n)) = 0. - Reinhard Zumkeller, Oct 08 2011
The compositions of n in which each natural number is colored by one of p different colors are called p-colored compositions of n. For n>=1, a(n) equals the number of 2-colored compositions of n such that no adjacent parts have the same color. - Milan Janjic, Nov 17 2011
Equals A001405 convolved with its right-shifted variant: (1 + 2x + 4x^2 + ...) = (1 + x + 2x^2 + 3x^3 + 6x^4 + 10x^5 + ...) * (1 + x + x^2 + 2x^3 + 3x^4 + 6x^5 + ...). - Gary W. Adamson, Nov 23 2011
The number of odd-sized subsets of an n+1-set. For example, there are 2^3 odd-sized subsets of {1, 2, 3, 4}, namely {1}, {2}, {3}, {4}, {1, 2, 3}, {1, 2, 4}, {1, 3, 4}, and {2, 3, 4}. Also, note that 2^n = Sum_{k=1..floor((n+1)/2)} C(n+1, 2k-1). - Dennis P. Walsh, Dec 15 2011
a(n) is the number of 1's in any row of Pascal's triangle (mod 2) whose row number has exactly n 1's in its binary expansion (see A007318 and A047999). (The result of putting together A001316 and A000120.) - Marcus Jaiclin, Jan 31 2012
A204455(k) = 1 if and only if k is in this sequence. - Wolfdieter Lang, Feb 04 2012
For n>=1 apparently the number of distinct finite languages over a unary alphabet, whose minimum regular expression has alphabetic width n (verified up to n=17), see the Gruber/Lee/Shallit link. - Hermann Gruber, May 09 2012
First differences of A000225. - Omar E. Pol, Feb 19 2013
This is the lexicographically earliest sequence which contains no arithmetic progression of length 3. - Daniel E. Frohardt, Apr 03 2013
a(n-2) is the number of bipartitions of {1..n} (i.e., set partitions into two parts) such that 1 and 2 are not in the same subset. - Jon Perry, May 19 2013
Numbers n such that the n-th cyclotomic polynomial has a root mod 2; numbers n such that the n-th cyclotomic polynomial has an even number of odd coefficients. - Eric M. Schmidt, Jul 31 2013
More is known now about non-power-of-2 "Almost Perfect Numbers" as described in Dagal. - Jonathan Vos Post, Sep 01 2013
Number of symmetric Ferrers diagrams that fit into an n X n box. - Graham H. Hawkes, Oct 18 2013
Numbers n such that sigma(2n) = 2n + sigma(n). - Jahangeer Kholdi, Nov 23 2013
a(1), ..., a(floor(n/2)) are all values of permanent on set of square (0,1)-matrices of order n>=2 with row and column sums 2. - Vladimir Shevelev, Nov 26 2013
Numbers whose base-2 expansion has exactly one bit set to 1, and thus has base-2 sum of digits equal to one. - Stanislav Sykora, Nov 29 2013
A072219(a(n)) = 1. - Reinhard Zumkeller, Feb 20 2014
a(n) is the largest number k such that (k^n-2)/(k-2) is an integer (for n > 1); (k^a(n)+1)/(k+1) is never an integer (for k > 1 and n > 0). - Derek Orr, May 22 2014
If x = A083420(n), y = a(n+1) and z = A087289(n), then x^2 + 2*y^2 = z^2. - Vincenzo Librandi, Jun 09 2014
The mini-sequence b(n) = least number k > 0 such that 2^k ends in n identical digits is given by {1, 18, 39}. The repeating digits are {2, 4, 8} respectively. Note that these are consecutive powers of 2 (2^1, 2^2, 2^3), and these are the only powers of 2 (2^k, k > 0) that are only one digit. Further, this sequence is finite. The number of n-digit endings for a power of 2 with n or more digits id 4*5^(n-1). Thus, for b(4) to exist, one only needs to check exponents up to 4*5^3 = 500. Since b(4) does not exist, it is clear that no other number will exist. - Derek Orr, Jun 14 2014
The least number k > 0 such that 2^k ends in n consecutive decreasing digits is a 3-number sequence given by {1, 5, 25}. The consecutive decreasing digits are {2, 32, 432}. There are 100 different 3-digit endings for 2^k. There are no k-values such that 2^k ends in '987', '876', '765', '654', '543', '321', or '210'. The k-values for which 2^k ends in '432' are given by 25 mod 100. For k = 25 + 100*x, the digit immediately before the run of '432' is {4, 6, 8, 0, 2, 4, 6, 8, 0, 2, ...} for x = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, ...}, respectively. Thus, we see the digit before '432' will never be a 5. So, this sequence is complete. - Derek Orr, Jul 03 2014
a(n) is the number of permutations of length n avoiding both 231 and 321 in the classical sense which are breadth-first search reading words of increasing unary-binary trees. For more details, see the entry for permutations avoiding 231 at A245898. - Manda Riehl, Aug 05 2014
Numbers n such that sigma(n) = sigma(2n) - phi(4n). - Farideh Firoozbakht, Aug 14 2014
This is a B_2 sequence: for i < j, differences a(j) - a(i) are all distinct. Here 2*a(n) < a(n+1) + 1, so a(n) - a(0) < a(n+1) - a(n). - Thomas Ordowski, Sep 23 2014
a(n) counts n-walks (closed) on the graph G(1-vertex; 1-loop, 1-loop). - David Neil McGrath, Dec 11 2014
a(n-1) counts walks (closed) on the graph G(1-vertex; 1-loop, 2-loop, 3-loop, 4-loop, ...). - David Neil McGrath, Jan 01 2015
b(0) = 4; b(n+1) is the smallest number not in the sequence such that b(n+1) - Prod_{i=0..n} b(i) divides b(n+1) - Sum_{i=0..n} b(i). Then b(n) = a(n) for n > 2. - Derek Orr, Jan 15 2015
a(n) counts the permutations of length n+2 whose first element is 2 such that the permutation has exactly one descent. - Ran Pan, Apr 17 2015
a(0)-a(30) appear, with a(26)-a(30) in error, in tablet M 08613 (see CDLI link) from the Old Babylonian period (c. 1900-1600 BC). - Charles R Greathouse IV, Sep 03 2015
Subsequence of A028982 (the squares or twice squares sequence). - Timothy L. Tiffin, Jul 18 2016
A000120(a(n)) = 1. A000265(a(n)) = 1. A000593(a(n)) = 1. - Juri-Stepan Gerasimov, Aug 16 2016
Number of monotone maps f : [0..n] -> [0..n] which are order-increasing (i <= f(i)) and idempotent (f(f(i)) = f(i)). In other words, monads on the n-th ordinal (seen as a posetal category). Any monad f determines a subset of [0..n] that contains n, by considering its set of monad algebras = fixed points { i | f(i) = i }. Conversely, any subset S of [0..n] containing n determines a monad on [0..n], by the function i |-> min { j | i <= j, j in S }. - Noam Zeilberger, Dec 11 2016
Consider n points lying on a circle. Then for n>=2 a(n-2) gives the number of ways to connect two adjacent points with nonintersecting chords. - Anton Zakharov, Dec 31 2016
Satisfies Benford's law [Diaconis, 1977; Berger-Hill, 2017] - N. J. A. Sloane, Feb 07 2017
Also the number of independent vertex sets and vertex covers in the n-empty graph. - Eric W. Weisstein, Sep 21 2017
Also the number of maximum cliques in the n-halved cube graph for n > 4. - Eric W. Weisstein, Dec 04 2017
Number of pairs of compositions of n corresponding to a seaweed algebra of index n-1. - Nick Mayers, Jun 25 2018
The multiplicative group of integers modulo a(n) is cyclic if and only if n = 0, 1, 2. For n >= 3, it is a product of two cyclic groups. - Jianing Song, Jun 27 2018
k^n is the determinant of n X n matrix M_(i, j) = binomial(k + i + j - 2, j) - binomial(i+j-2, j), in this case k=2. - Tony Foster III, May 12 2019
Solutions to the equation Phi(2n + 2*Phi(2n)) = 2n. - M. Farrokhi D. G., Jan 03 2020
a(n-1) is the number of subsets of {1,2,...,n} which have an element that is the size of the set. For example, for n = 4, a(3) = 8 and the subsets are {1}, {1,2}, {2,3}, {2,4}, {1,2,3}, {1,3,4}, {2,3,4}, {1,2,3,4}. - Enrique Navarrete, Nov 21 2020
a(n) is the number of self-inverse (n+1)-order permutations with 231-avoiding. E.g., a(3) = 8: [1234, 1243, 1324, 1432, 2134, 2143, 3214, 4321]. - Yuchun Ji, Feb 26 2021
For any fixed k > 0, a(n) is the number of ways to tile a strip of length n+1 with tiles of length 1, 2, ... k, where the tile of length k can be black or white, with the restriction that the first tile cannot be black. - Greg Dresden and Bora Bursalı, Aug 31 2023

Examples

			There are 2^3 = 8 subsets of a 3-element set {1,2,3}, namely { -, 1, 2, 3, 12, 13, 23, 123 }.
		

References

  • Milton Abramowitz and Irene A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 1016.
  • Mohammad K. Azarian, A Generalization of the Climbing Stairs Problem, Mathematics and Computer Education Journal, Vol. 31, No. 1, pp. 24-28, Winter 1997.
  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See pp. 73, 84.
  • Jan Gullberg, Mathematics from the Birth of Numbers, W. W. Norton & Co., NY & London, 1997, §4.5 Logarithms and §8.1 Terminology, pp. 150, 264.
  • Paul J. Nahin, An Imaginary Tale: The Story of sqrt(-1), Princeton University Press, Princeton, NJ. 1998, pp. 69-70.
  • Alfred S. Posamentier, Math Charmers, Tantalizing Tidbits for the Mind, Prometheus Books, NY, 2003, page 273.
  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 124.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • V. E. Tarakanov, Combinatorial problems on binary matrices, Combin. Analysis, MSU, 5 (1980), 4-15. (Russian)
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 141.
  • S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 55.

Crossrefs

This is the Hankel transform (see A001906 for the definition) of A000984, A002426, A026375, A026387, A026569, A026585, A026671 and A032351. - John W. Layman, Jul 31 2000
Euler transform of A001037, A209406 (multisets), inverse binomial transform of A000244, binomial transform of A000012.
Complement of A057716.
Boustrophedon transforms: A000734, A000752.
Range of values of A006519, A007875, A011782, A030001, A034444, A037445, A053644, and A054243.
Cf. A018900, A014311, A014312, A014313, A023688, A023689, A023690, A023691 (sum of 2, ..., 9 distinct powers of 2).
Cf. A090129.
The following are parallel families: A000079 (2^n), A004094 (2^n reversed), A028909 (2^n sorted up), A028910 (2^n sorted down), A036447 (double and reverse), A057615 (double and sort up), A263451 (double and sort down); A000244 (3^n), A004167 (3^n reversed), A321540 (3^n sorted up), A321539 (3^n sorted down), A163632 (triple and reverse), A321542 (triple and sort up), A321541 (triple and sort down).

Programs

  • Haskell
    a000079 = (2 ^)
    a000079_list = iterate (* 2) 1
    -- Reinhard Zumkeller, Jan 22 2014, Mar 05 2012, Dec 29 2011
    
  • Magma
    [2^n: n in [0..40]]; // Vincenzo Librandi, Feb 17 2014
    
  • Magma
    [n le 2 select n else 5*Self(n-1)-6*Self(n-2): n in [1..40]]; // Vincenzo Librandi, Feb 17 2014
    
  • Maple
    A000079 := n->2^n; [ seq(2^n,n=0..50) ];
    isA000079 := proc(n)
        local fs;
        fs := numtheory[factorset](n) ;
        if n = 1 then
            true ;
        elif nops(fs) <> 1 then
            false;
        elif op(1,fs) = 2 then
            true;
        else
            false ;
        end if;
    end proc: # R. J. Mathar, Jan 09 2017
  • Mathematica
    Table[2^n, {n, 0, 50}]
    2^Range[0, 50] (* Wesley Ivan Hurt, Jun 14 2014 *)
    LinearRecurrence[{2}, {2}, {0, 20}] (* Eric W. Weisstein, Sep 21 2017 *)
    CoefficientList[Series[1/(1 - 2 x), {x, 0, 20}], x] (* Eric W. Weisstein, Sep 21 2017 *)
    NestList[2# &, 1, 40] (* Harvey P. Dale, Oct 07 2019 *)
  • Maxima
    A000079(n):=2^n$ makelist(A000079(n),n,0,30); /* Martin Ettl, Nov 05 2012 */
    
  • PARI
    A000079(n)=2^n \\ Edited by M. F. Hasler, Aug 27 2014
    
  • PARI
    unimodal(n)=local(x,d,um,umc); umc=0; for (c=0,n!-1, x=numtoperm(n,c); d=0; um=1; for (j=2,n,if (x[j]x[j-1] && d==1,um=0); if (um==0,break)); if (um==1,print(x)); umc+=um); umc
    
  • Python
    def a(n): return 1<Michael S. Branicky, Jul 28 2022
    
  • Python
    def is_powerof2(n) -> bool: return n and (n & (n - 1)) == 0  # Peter Luschny, Apr 10 2025
  • Scala
    (List.fill(20)(2: BigInt)).scanLeft(1: BigInt)( * ) // Alonso del Arte, Jan 16 2020
    
  • Scheme
    (define (A000079 n) (expt 2 n)) ;; Antti Karttunen, Mar 21 2017
    

Formula

a(n) = 2^n.
a(0) = 1; a(n) = 2*a(n-1).
G.f.: 1/(1 - 2*x).
E.g.f.: exp(2*x).
a(n)= Sum_{k = 0..n} binomial(n, k).
a(n) is the number of occurrences of n in A000523. a(n) = A001045(n) + A001045(n+1). a(n) = 1 + Sum_{k = 0..(n - 1)} a(k). The Hankel transform of this sequence gives A000007 = [1, 0, 0, 0, 0, 0, ...]. - Philippe Deléham, Feb 25 2004
n such that phi(n) = n/2, for n > 1, where phi is Euler's totient (A000010). - Lekraj Beedassy, Sep 07 2004
a(n + 1) = a(n) XOR 3*a(n) where XOR is the binary exclusive OR operator. - Philippe Deléham, Jun 19 2005
a(n) = StirlingS2(n + 1, 2) + 1. - Ross La Haye, Jan 09 2008
a(n+2) = 6a(n+1) - 8a(n), n = 1, 2, 3, ... with a(1) = 1, a(2) = 2. - Yosu Yurramendi, Aug 06 2008
a(n) = ka(n-1) + (4 - 2k)a(n-2) for any integer k and n > 1, with a(0) = 1, a(1) = 2. - Jaume Oliver Lafont, Dec 05 2008
a(n) = Sum_{l_1 = 0..n + 1} Sum_{l_2 = 0..n}...Sum_{l_i = 0..n - i}...Sum_{l_n = 0..1} delta(l_1, l_2, ..., l_i, ..., l_n) where delta(l_1, l_2, ..., l_i, ..., l_n) = 0 if any l_i <= l_(i+1) and l_(i+1) != 0 and delta(l_1, l_2, ..., l_i, ..., l_n) = 1 otherwise. - Thomas Wieder, Feb 25 2009
a(0) = 1, a(1) = 2; a(n) = a(n-1)^2/a(n-2), n >= 2. - Jaume Oliver Lafont, Sep 22 2009
a(n) = A173786(n, n)/2 = A173787(n + 1, n). - Reinhard Zumkeller, Feb 28 2010
If p[i] = i - 1 and if A is the Hessenberg matrix of order n defined by: A[i, j] = p[j - i + 1], (i <= j), A[i, j] = -1, (i = j + 1), and A[i, j] = 0 otherwise. Then, for n >= 1, a(n-1) = det A. - Milan Janjic, May 02 2010
If p[i] = Fibonacci(i-2) and if A is the Hessenberg matrix of order n defined by: A[i, j] = p[j - i + 1], (i <= j), A[i, j] = -1, (i = j + 1), and A[i, j] = 0 otherwise. Then, for n >= 2, a(n-2) = det A. - Milan Janjic, May 08 2010
The sum of reciprocals, 1/1 + 1/2 + 1/4 + 1/8 + ... + 1/(2^n) + ... = 2. - Mohammad K. Azarian, Dec 29 2010
a(n) = 2*A001045(n) + A078008(n) = 3*A001045(n) + (-1)^n. - Paul Barry, Feb 20 2003
a(n) = A118654(n, 2).
a(n) = A140740(n+1, 1).
a(n) = A131577(n) + A011782(n) = A024495(n) + A131708(n) + A024493(n) = A000749(n) + A038503(n) + A038504(n) + A038505(n) = A139761(n) + A139748(n) + A139714(n) + A133476(n) + A139398(n). - Paul Curtz, Jul 25 2011
a(n) = row sums of A007318. - Susanne Wienand, Oct 21 2011
a(n) = Hypergeometric([-n], [], -1). - Peter Luschny, Nov 01 2011
G.f.: A(x) = B(x)/x, B(x) satisfies B(B(x)) = x/(1 - x)^2. - Vladimir Kruchinin, Nov 10 2011
a(n) = Sum_{k = 0..n} A201730(n, k)*(-1)^k. - Philippe Deléham, Dec 06 2011
2^n = Sum_{k = 1..floor((n+1)/2)} C(n+1, 2k-1). - Dennis P. Walsh, Dec 15 2011
A209229(a(n)) = 1. - Reinhard Zumkeller, Mar 07 2012
A001227(a(n)) = 1. - Reinhard Zumkeller, May 01 2012
Sum_{n >= 1} mobius(n)/a(n) = 0.1020113348178103647430363939318... - R. J. Mathar, Aug 12 2012
E.g.f.: 1 + 2*x/(U(0) - x) where U(k) = 6*k + 1 + x^2/(6*k+3 + x^2/(6*k + 5 + x^2/U(k+1) )); (continued fraction, 3-step). - Sergei N. Gladkovskii, Dec 04 2012
a(n) = det(|s(i+2,j)|, 1 <= i,j <= n), where s(n,k) are Stirling numbers of the first kind. - Mircea Merca, Apr 04 2013
a(n) = det(|ps(i+1,j)|, 1 <= i,j <= n), where ps(n,k) are Legendre-Stirling numbers of the first kind (A129467). - Mircea Merca, Apr 06 2013
G.f.: W(0), where W(k) = 1 + 2*x*(k+1)/(1 - 2*x*(k+1)/( 2*x*(k+2) + 1/W(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Aug 28 2013
a(n-1) = Sum_{t_1 + 2*t_2 + ... + n*t_n = n} multinomial(t_1 + t_2 + ... + t_n; t_1, t_2, ..., t_n). - Mircea Merca, Dec 06 2013
Construct the power matrix T(n,j) = [A^*j]*[S^*(j-1)] where A(n)=(1,1,1,...) and S(n)=(0,1,0,0,...) (where * is convolution operation). Then a(n-1) = Sum_{j=1..n} T(n,j). - David Neil McGrath, Jan 01 2015
a(n) = A000005(A002110(n)). - Ivan N. Ianakiev, May 23 2016
From Ilya Gutkovskiy, Jul 18 2016: (Start)
Exponential convolution of A000012 with themselves.
a(n) = Sum_{k=0..n} A011782(k).
Sum_{n>=0} a(n)/n! = exp(2) = A072334.
Sum_{n>=0} (-1)^n*a(n)/n! = exp(-2) = A092553. (End)
G.f.: (r(x) * r(x^2) * r(x^4) * r(x^8) * ...) where r(x) = A090129(x) = (1 + 2x + 2x^2 + 4x^3 + 8x^4 + ...). - Gary W. Adamson, Sep 13 2016
a(n) = A000045(n + 1) + A000045(n) + Sum_{k = 0..n - 2} A000045(k + 1)*2^(n - 2 - k). - Melvin Peralta, Dec 22 2017
a(n) = 7*A077020(n)^2 + A077021(n)^2, n>=3. - Ralf Steiner, Aug 08 2021
a(n)= n + 1 + Sum_{k=3..n+1} (2*k-5)*J(n+2-k), where Jacobsthal number J(n) = A001045(n). - Michael A. Allen, Jan 12 2022
Integral_{x=0..Pi} cos(x)^n*cos(n*x) dx = Pi/a(n) (see Nahin, pp. 69-70). - Stefano Spezia, May 17 2023

Extensions

Clarified a comment T. D. Noe, Aug 30 2009
Edited by Daniel Forgues, May 12 2010
Incorrect comment deleted by Matthew Vandermast, May 17 2014
Comment corrected to match offset by Geoffrey Critzer, Nov 28 2014

A003586 3-smooth numbers: numbers of the form 2^i*3^j with i, j >= 0.

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 9, 12, 16, 18, 24, 27, 32, 36, 48, 54, 64, 72, 81, 96, 108, 128, 144, 162, 192, 216, 243, 256, 288, 324, 384, 432, 486, 512, 576, 648, 729, 768, 864, 972, 1024, 1152, 1296, 1458, 1536, 1728, 1944, 2048, 2187, 2304, 2592, 2916, 3072, 3456, 3888
Offset: 1

Views

Author

Paul Zimmermann, Dec 11 1996

Keywords

Comments

This sequence is easily confused with A033845, which gives numbers of the form 2^i*3^j with i, j >= 1. Don't simply say "numbers of the form 2^i*3^j", but specify which sequence you mean. - N. J. A. Sloane, May 26 2024
These numbers were once called "harmonic numbers", see Lenstra links. - N. J. A. Sloane, Jul 03 2015
Successive numbers k such that phi(6k) = 2k. - Artur Jasinski, Nov 05 2008
Where record values greater than 1 occur in A088468: A160519(n) = A088468(a(n)). - Reinhard Zumkeller, May 16 2009
Also numbers that are divisible by neither 6k - 1 nor 6k + 1, for all k > 0. - Robert G. Wilson v, Oct 26 2010
Also numbers m such that the rooted tree with Matula-Goebel number m has m antichains. The Matula-Goebel number of a rooted tree can be defined in the following recursive manner: to the one-vertex tree there corresponds the number 1; to a tree T with root degree 1 there corresponds the t-th prime number, where t is the Matula-Goebel number of the tree obtained from T by deleting the edge emanating from the root; to a tree T with root degree m>=2 there corresponds the product of the Matula-Goebel numbers of the m branches of T. The vertices of a rooted tree can be regarded as a partially ordered set, where u<=v holds for two vertices u and v if and only if u lies on the unique path between v and the root. An antichain is a nonempty set of mutually incomparable vertices. Example: m=4 is in the sequence because the corresponding rooted tree is \/=ARB (R is the root) having 4 antichains (A, R, B, AB). - Emeric Deutsch, Jan 30 2012
A204455(3*a(n)) = 3, and only for these numbers. - Wolfdieter Lang, Feb 04 2012
The number of terms less than or equal to n is Sum_{i=0..floor(log_2(n))} floor(log_3(n/2^i) + 1), or Sum_{i=0..floor(log_3(n))} floor(log_2(n/3^i) + 1), which requires fewer terms to compute. - Robert G. Wilson v, Aug 17 2012
Named 3-friables in French. - Michel Marcus, Jul 17 2013
In the 14th century Levi Ben Gerson proved that the only pairs of terms which differ by 1 are (1,2), (2,3), (3,4), and (8,9); see A235365, A235366, A236210. - Jonathan Sondow, Jan 20 2014
Range of values of A000005(n) (and also A181819(n)) for cubefree numbers n. - Matthew Vandermast, May 14 2014
A036561 is a permutation of this sequence. - L. Edson Jeffery, Sep 22 2014
Also the sorted union of A000244 and A007694. - Lei Zhou, Apr 19 2017
The sum of the reciprocals of the 3-smooth numbers is equal to 3. Brief proof: 1 + 1/2 + 1/3 + 1/4 + 1/6 + 1/8 + 1/9 + ... = (Sum_{k>=0} 1/2^k) * (Sum_{m>=0} 1/3^m) = (1/(1-1/2)) * (1/(1-1/3)) = (2/(2-1)) * (3/(3-1)) = 3. - Bernard Schott, Feb 19 2019
Also those integers k for which, for every prime p > 3, p^(2k) - 1 == 0 (mod 24k). - Federico Provvedi, May 23 2022
For n>1, the exponents’ parity {parity(i), parity(j)} of one out of four consecutive terms is {odd, odd}. Therefore, for n>1, at least one out of every four consecutive terms is a Zumkeller number (A083207). If for the term whose parity is {even, odd}, even also means nonzero, then this term is also a Zumkeller number (as is the case with the last of the four consecutive terms 1296, 1458, 1536, 1728). - Ivan N. Ianakiev, Jul 10 2022
Except the initial terms 2, 3, 4, 8, 9 and 16, these are numbers k such that k^6 divides 6^k. Except the initial terms 2, 3, 4, 6, 8, 9, 16, 18 and 27, these are numbers k such that k^12 divides 12^k. - Mohammed Yaseen, Jul 21 2022
In music theory, a comma is a ratio, close to 1 (typically less than 1.04), between two natural numbers divisible by only small primes (typically single digit). In this sequence, a(131) / a(130) = 531441 / 524288 ~ 1.013643 is the Pythagorean comma (A221363), the difference between 12 perfect fifths and 7 octaves. - Hal M. Switkay, Mar 23 2025

References

  • J.-M. De Koninck & A. Mercier, 1001 Problèmes en Théorie Classique des Nombres, Problème 654 pp. 85, 287-8, Ellipses Paris 2004.
  • S. Ramanujan, Collected Papers, Ed. G. H. Hardy et al., Cambridge 1927; Chelsea, NY, 1962, p. xxiv.
  • R. Tijdeman, Some applications of Diophantine approximation, pp. 261-284 of Surveys in Number Theory (Urbana, May 21, 2000), ed. M. A. Bennett et al., Peters, 2003.

Crossrefs

Cf. A051037, A002473, A051038, A080197, A080681, A080682, A117221, A105420, A062051, A117222, A117220, A090184, A131096, A131097, A186711, A186712, A186771, A088468, A061987, A080683 (p-smooth numbers with other values of p), A025613 (a subsequence).
Cf. also A000244, A007694. - Lei Zhou, Apr 19 2017
Cf. A191475 (successive values of i), A191476 (successive values of j), A022330 (indices of the pure terms 2^i), A022331 (indices of the pure terms 3^j). - N. J. A. Sloane, May 26 2024
Cf. A221363.

Programs

  • Haskell
    import Data.Set (Set, singleton, insert, deleteFindMin)
    smooth :: Set Integer -> [Integer]
    smooth s = x : smooth (insert (3*x) $ insert (2*x) s')
      where (x, s') = deleteFindMin s
    a003586_list = smooth (singleton 1)
    a003586 n = a003586_list !! (n-1)
    -- Reinhard Zumkeller, Dec 16 2010
    
  • Magma
    [n: n in [1..4000] | PrimeDivisors(n) subset [2,3]]; // Bruno Berselli, Sep 24 2012
  • Maple
    A003586 := proc(n) option remember; if n = 1 then 1; else for a from procname(n-1)+1 do numtheory[factorset](a) minus {2,3} ; if % = {} then return a; end if; end do: end if; end proc: # R. J. Mathar, Feb 28 2011
    with(numtheory): for i from 1 to 23328 do if(i/phi(i)=3)then print(i/6) fi od; # Gary Detlefs, Jun 28 2011
  • Mathematica
    a[1] = 1; j = 1; k = 1; n = 100; For[k = 2, k <= n, k++, If[2*a[k - j] < 3^j, a[k] = 2*a[k - j], {a[k] = 3^j, j++}]]; Table[a[i], {i, 1, n}] (* Hai He (hai(AT)mathteach.net) and Gilbert Traub, Dec 28 2004 *)
    aa = {}; Do[If[EulerPhi[6 n] == 2 n, AppendTo[aa, n]], {n, 1, 1000}]; aa (* Artur Jasinski, Nov 05 2008 *)
    fQ[n_] := Union[ MemberQ[{1, 5}, # ] & /@ Union@ Mod[ Rest@ Divisors@ n, 6]] == {False}; fQ[1] = True; Select[ Range@ 4000, fQ] (* Robert G. Wilson v, Oct 26 2010 *)
    powerOfTwo = 12; Select[Nest[Union@Join[#, 2*#, 3*#] &, {1}, powerOfTwo-1], # < 2^powerOfTwo &] (* Robert G. Wilson v and T. D. Noe, Mar 03 2011 *)
    fQ[n_] := n == 3 EulerPhi@ n; Select[6 Range@ 4000, fQ]/6 (* Robert G. Wilson v, Jul 08 2011 *)
    mx = 4000; Sort@ Flatten@ Table[2^i*3^j, {i, 0, Log[2, mx]}, {j, 0, Log[3, mx/2^i]}] (* Robert G. Wilson v, Aug 17 2012 *)
    f[n_] := Block[{p2, p3 = 3^Range[0, Floor@ Log[3, n] + 1]}, p2 = 2^Floor[Log[2, n/p3] + 1]; Min[ Select[ p2*p3, IntegerQ]]]; NestList[f, 1, 54] (* Robert G. Wilson v, Aug 22 2012 *)
    Select[Range@4000, Last@Map[First, FactorInteger@#] <= 3 &] (* Vincenzo Librandi, Aug 25 2016 *)
    Select[Range[4000],Max[FactorInteger[#][[All,1]]]<4&] (* Harvey P. Dale, Jan 11 2017 *)
  • PARI
    test(n)=for(p=2,3, while(n%p==0, n/=p)); n==1;
    for(n=1,4000,if(test(n),print1(n",")))
    
  • PARI
    list(lim)=my(v=List(),N);for(n=0,log(lim\1+.5)\log(3),N=3^n;while(N<=lim,listput(v,N);N<<=1));vecsort(Vec(v)) \\ Charles R Greathouse IV, Jun 28 2011
    
  • PARI
    is_A003586(n)=n<5||vecmax(factor(n,5)[, 1])<5 \\ M. F. Hasler, Jan 16 2015
    
  • PARI
    list(lim)=my(v=List(), N); for(n=0, logint(lim\=1,3), N=3^n; while(N<=lim, listput(v, N); N<<=1)); Set(v) \\ Charles R Greathouse IV, Jan 10 2018
    
  • Python
    from itertools import count, takewhile
    def aupto(lim):
        pows2 = list(takewhile(lambda x: xMichael S. Branicky, Jul 08 2022
    
  • Python
    from sympy import integer_log
    def A003586(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x): return n+x-sum((x//3**i).bit_length() for i in range(integer_log(x,3)[0]+1))
        return bisection(f,n,n) # Chai Wah Wu, Sep 15 2024
    
  • Python
    # faster for initial segment of sequence
    import heapq
    from itertools import islice
    def A003586gen(): # generator of terms
        v, oldv, h, psmooth_primes, = 1, 0, [1], [2, 3]
        while True:
            v = heapq.heappop(h)
            if v != oldv:
                yield v
                oldv = v
                for p in psmooth_primes:
                    heapq.heappush(h, v*p)
    print(list(islice(A003586gen(), 65))) # Michael S. Branicky, Sep 17 2024
    (C++) // Returns A003586 <= threshold without approximations nor sorting
    #include 
    std::forward_list A003586(const int threshold) {
        std::forward_list sequence;
        auto start_it = sequence.before_begin();
        for (int i = 1; i <= threshold; i *= 2) {
            for (int inc = 1; std::next(start_it) != sequence.end() && inc <= i; inc *= 3)
                ++start_it;
            auto it = start_it;
            for (int j = 1; i * j <= threshold; j *= 3) {
                sequence.emplace_after(it, i * j);
                for (int inc = 1; std::next(it) != sequence.end() && inc <= i; inc *= 2)
                    ++it;
            }
        }
        return sequence;
    } // Eben Gino Lester, Apr 17 2025
    
  • Sage
    def isA003586(n) :
        return not any(d != 2 and d != 3 for d in prime_divisors(n))
    @CachedFunction
    def A003586(n) :
        if n == 1 : return 1
        k = A003586(n-1) + 1
        while not isA003586(k) : k += 1
        return k
    [A003586(n) for n in (1..55)] # Peter Luschny, Jul 20 2012
    

Formula

An asymptotic formula for a(n) is roughly a(n) ~ 1/sqrt(6)*exp(sqrt(2*log(2)*log(3)*n)). - Benoit Cloitre, Nov 20 2001
A061987(n) = a(n + 1) - a(n), a(A084791(n)) = A084789(n), a(A084791(n) + 1) = A084790(n). - Reinhard Zumkeller, Jun 03 2003
Union of powers of 2 and 3 with n such that psi(n) = 2*n, where psi(n) = n*Product_(1 + 1/p) over all prime factors p of n = A001615(n). - Lekraj Beedassy, Sep 07 2004; corrected by Franklin T. Adams-Watters, Mar 19 2009
a(n) = 2^A022328(n)*3^A022329(n). - N. J. A. Sloane, Mar 19 2009
The characteristic function of this sequence is given by Sum_{n >= 1} x^a(n) = Sum_{n >= 1} moebius(6*n)*x^n/(1 - x^n). - Paul D. Hanna, Sep 18 2011
a(n) = A007694(n+1)/2. - Lei Zhou, Apr 19 2017

Extensions

Deleted claim that this sequence is union of 2^n (A000079) and 3^n (A000244) sequences -- this does not include the terms which are not pure powers. - Walter Roscello (wroscello(AT)comcast.net), Nov 16 2008

A051037 5-smooth numbers, i.e., numbers whose prime divisors are all <= 5.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 16, 18, 20, 24, 25, 27, 30, 32, 36, 40, 45, 48, 50, 54, 60, 64, 72, 75, 80, 81, 90, 96, 100, 108, 120, 125, 128, 135, 144, 150, 160, 162, 180, 192, 200, 216, 225, 240, 243, 250, 256, 270, 288, 300, 320, 324, 360, 375, 384, 400, 405
Offset: 1

Views

Author

Keywords

Comments

Sometimes called the Hamming sequence, since Hamming asked for an efficient algorithm to generate the list, in ascending order, of all numbers of the form 2^i*3^j*5^k for i,j,k >= 0. The problem was popularized by Edsger Dijkstra.
Numbers k such that 8*k = EulerPhi(30*k). - Artur Jasinski, Nov 05 2008
Where record values greater than 1 occur in A165704: A165705(n) = A165704(a(n)). - Reinhard Zumkeller, Sep 26 2009
Also called "harmonic whole numbers", see Howard and Longair, 1982, Table I, page 121. - Hugo Pfoertner, Jul 16 2020
Also called ugly numbers, although it is not clear why. - Gus Wiseman, May 21 2021
Some woody bamboo species have extraordinarily long and stable flowering intervals that belong to this sequence. The model by Veller, Nowak & Davis justifies this observation from the evolutionary point of view. - Andrey Zabolotskiy, Jun 27 2021
Also those integers k for which, for every prime p > 5, p^(4*k) - 1 == 0 (mod 240*k). - Federico Provvedi, May 23 2022
As noted in the comments to A085152, Størmer's theorem implies that the only pairs of consecutive integers that appear as consecutive terms of this sequence are (1,2), (2,3), (3,4), (4,5), (5,6), (8,9), (9,10), (15,16), (24,25), and (80,81). These all represent significant musical intervals. - Hal M. Switkay, Dec 05 2022

Examples

			From _Gus Wiseman_, May 21 2021: (Start)
The sequence of terms together with their prime indices begins:
      1: {}            25: {3,3}
      2: {1}           27: {2,2,2}
      3: {2}           30: {1,2,3}
      4: {1,1}         32: {1,1,1,1,1}
      5: {3}           36: {1,1,2,2}
      6: {1,2}         40: {1,1,1,3}
      8: {1,1,1}       45: {2,2,3}
      9: {2,2}         48: {1,1,1,1,2}
     10: {1,3}         50: {1,3,3}
     12: {1,1,2}       54: {1,2,2,2}
     15: {2,3}         60: {1,1,2,3}
     16: {1,1,1,1}     64: {1,1,1,1,1,1}
     18: {1,2,2}       72: {1,1,1,2,2}
     20: {1,1,3}       75: {2,3,3}
     24: {1,1,1,2}     80: {1,1,1,1,3}
(End)
		

Crossrefs

Subsequences: A003592, A003593, A051916 , A257997.
For p-smooth numbers with other values of p, see A003586, A002473, A051038, A080197, A080681, A080682, A080683.
The partitions with these Heinz numbers are counted by A001399.
The conjugate opposite is A033942, counted by A004250.
The opposite is A059485, counted by A004250.
The non-3-smooth case is A080193, counted by A069905.
The conjugate is A037144, counted by A001399.
The complement is A279622, counted by A035300.
Requiring the sum of prime indices to be even gives A344297.

Programs

  • Haskell
    import Data.Set (singleton, deleteFindMin, insert)
    a051037 n = a051037_list !! (n-1)
    a051037_list = f $ singleton 1 where
       f s = y : f (insert (5 * y) $ insert (3 * y) $ insert (2 * y) s')
                   where (y, s') = deleteFindMin s
    -- Reinhard Zumkeller, May 16 2015
    
  • Magma
    [n: n in [1..500] | PrimeDivisors(n) subset [2,3,5]]; // Bruno Berselli, Sep 24 2012
    
  • Maple
    A051037 := proc(n)
        option remember;
        local a;
        if n = 1 then
            1;
        else
            for a from procname(n-1)+1 do
                numtheory[factorset](a) minus {2, 3,5 } ;
                if % = {} then
                    return a;
                end if;
            end do:
        end if;
    end proc:
    seq(A051037(n),n=1..100) ; # R. J. Mathar, Nov 05 2017
  • Mathematica
    mx = 405; Sort@ Flatten@ Table[ 2^a*3^b*5^c, {a, 0, Log[2, mx]}, {b, 0, Log[3, mx/2^a]}, {c, 0, Log[5, mx/(2^a*3^b)]}] (* Or *)
    Select[ Range@ 405, Last@ Map[First, FactorInteger@ #] < 7 &] (* Robert G. Wilson v *)
    With[{nn=10},Select[Union[Times@@@Flatten[Table[Tuples[{2,3,5},n],{n,0,nn}],1]],#<=2^nn&]] (* Harvey P. Dale, Feb 28 2022 *)
  • PARI
    test(n)= {m=n; forprime(p=2,5, while(m%p==0,m=m/p)); return(m==1)}
    for(n=1,500,if(test(n),print1(n",")))
    
  • PARI
    a(n)=local(m); if(n<1,0,n=a(n-1); until(if(m=n, forprime(p=2,5, while(m%p==0,m/=p)); m==1),n++); n)
    
  • PARI
    list(lim)=my(v=List(),s,t); for(i=0,logint(lim\=1,5), t=5^i; for(j=0,logint(lim\t,3), s=t*3^j; while(s<=lim, listput(v,s); s<<=1))); Set(v) \\ Charles R Greathouse IV, Sep 21 2011; updated Sep 19 2016
    
  • PARI
    smooth(P:vec,lim)={ my(v=List([1]),nxt=vector(#P,i,1),indx,t);
    while(1, t=vecmin(vector(#P,i,v[nxt[i]]*P[i]),&indx);
    if(t>lim,break); if(t>v[#v],listput(v,t)); nxt[indx]++);
    Vec(v)
    };
    smooth([2,3,5], 1e4) \\ Charles R Greathouse IV, Dec 03 2013
    
  • PARI
    is_A051037(n)=n<7||vecmax(factor(n,6)[, 1])<7 \\ M. F. Hasler, Jan 16 2015
    
  • Python
    def isok(n):
      while n & 1 == 0: n >>= 1
      while n % 3 == 0: n //= 3
      while n % 5 == 0: n //= 5
      return n == 1 #  Darío Clavijo, Dec 30 2022
    
  • Python
    from sympy import integer_log
    def A051037(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: 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 = n+x
            for i in range(integer_log(x,5)[0]+1):
                for j in range(integer_log(y:=x//5**i,3)[0]+1):
                    c -= (y//3**j).bit_length()
            return c
        return bisection(f,n,n) # Chai Wah Wu, Sep 16 2024
    
  • Python
    # faster for initial segment of sequence
    import heapq
    from itertools import islice
    def A051037gen(): # generator of terms
        v, oldv, h, psmooth_primes, = 1, 0, [1], [2, 3, 5]
        while True:
            v = heapq.heappop(h)
            if v != oldv:
                yield v
                oldv = v
                for p in psmooth_primes:
                        heapq.heappush(h, v*p)
    print(list(islice(A051037gen(), 65))) # Michael S. Branicky, Sep 17 2024

Formula

Let s(n) = Card(k | a(k)Benoit Cloitre, Dec 30 2001
The characteristic function of this sequence is given by:
Sum_{n>=1} x^a(n) = Sum_{n>=1} -Möbius(30*n)*x^n/(1-x^n). - Paul D. Hanna, Sep 18 2011
a(n) = A143207(n) / 30. - Reinhard Zumkeller, Sep 13 2011
A204455(15*a(n)) = 15, and only for these numbers. - Wolfdieter Lang, Feb 04 2012
A006530(a(n)) <= 5. - Reinhard Zumkeller, May 16 2015
Sum_{n>=1} 1/a(n) = Product_{primes p <= 5} p/(p-1) = (2*3*5)/(1*2*4) = 15/4. - Amiram Eldar, Sep 22 2020

A003592 Numbers of the form 2^i*5^j with i, j >= 0.

Original entry on oeis.org

1, 2, 4, 5, 8, 10, 16, 20, 25, 32, 40, 50, 64, 80, 100, 125, 128, 160, 200, 250, 256, 320, 400, 500, 512, 625, 640, 800, 1000, 1024, 1250, 1280, 1600, 2000, 2048, 2500, 2560, 3125, 3200, 4000, 4096, 5000, 5120, 6250, 6400, 8000, 8192, 10000, 10240, 12500, 12800
Offset: 1

Views

Author

Keywords

Comments

These are the natural numbers whose reciprocals are terminating decimals. - David Wasserman, Feb 26 2002
A132726(a(n), k) = 0 for k <= a(n); A051626(a(n)) = 0; A132740(a(n)) = 1; A132741(a(n)) = a(n). - Reinhard Zumkeller, Aug 27 2007
Where record values greater than 1 occur in A165706: A165707(n) = A165706(a(n)). - Reinhard Zumkeller, Sep 26 2009
Also numbers that are divisible by neither 10k - 7, 10k - 3, 10k - 1 nor 10k + 1, for all k > 0. - Robert G. Wilson v, Oct 26 2010
A204455(5*a(n)) = 5, and only for these numbers. - Wolfdieter Lang, Feb 04 2012
Since p = 2 and q = 5 are coprime, sum_{n >= 1} 1/a(n) = sum_{i >= 0} sum_{j >= 0} 1/p^i * 1/q^j = sum_{i >= 0} 1/p^i q/(q - 1) = p*q/((p-1)*(q-1)) = 2*5/(1*4) = 2.5. - Franklin T. Adams-Watters, Jul 07 2014
Conjecture: Each positive integer n not among 1, 4 and 12 can be written as a sum of finitely many numbers of the form 2^a*5^b + 1 (a,b >= 0) with no one dividing another. This has been verified for n <= 3700. - Zhi-Wei Sun, Apr 18 2023
1,2 and 4,5 are the only consecutive terms in the sequence. - Robin Jones, May 03 2025

References

  • Albert H. Beiler, Recreations in the theory of numbers, New York, Dover, (2nd ed.) 1966. See p. 73.

Crossrefs

Complement of A085837. Cf. A094958, A022333 (list of j), A022332 (list of i).
Cf. A164768 (difference between consecutive terms)

Programs

  • GAP
    Filtered([1..10000],n->PowerMod(10,n,n)=0); # Muniru A Asiru, Mar 19 2019
  • Haskell
    import Data.Set (singleton, deleteFindMin, insert)
    a003592 n = a003592_list !! (n-1)
    a003592_list = f $ singleton 1 where
       f s = y : f (insert (2 * y) $ insert (5 * y) s')
                   where (y, s') = deleteFindMin s
    -- Reinhard Zumkeller, May 16 2015
    
  • Magma
    [n: n in [1..10000] | PrimeDivisors(n) subset [2,5]]; // Bruno Berselli, Sep 24 2012
    
  • Maple
    isA003592 := proc(n)
          if n = 1 then
            true;
        else
            return (numtheory[factorset](n) minus {2,5} = {} );
        end if;
    end proc:
    A003592 := proc(n)
         option remember;
         if n = 1 then
            1;
        else
            for a from procname(n-1)+1 do
                if isA003592(a) then
                    return a;
                end if;
            end do:
        end if;
    end proc: # R. J. Mathar, Jul 16 2012
  • Mathematica
    twoFiveableQ[n_] := PowerMod[10, n, n] == 0; Select[Range@ 10000, twoFiveableQ] (* Robert G. Wilson v, Jan 12 2012 *)
    twoFiveableQ[n_] := Union[ MemberQ[{1, 3, 7, 9}, # ] & /@ Union@ Mod[ Rest@ Divisors@ n, 10]] == {False}; twoFiveableQ[1] = True; Select[Range@ 10000, twoFiveableQ] (* Robert G. Wilson v, Oct 26 2010 *)
    maxExpo = 14; Sort@ Flatten@ Table[2^i * 5^j, {i, 0, maxExpo}, {j, 0, Log[5, 2^(maxExpo - i)]}] (* Or *)
    Union@ Flatten@ NestList[{2#, 4#, 5#} &, 1, 7] (* Robert G. Wilson v, Apr 16 2011 *)
  • PARI
    list(lim)=my(v=List(),N);for(n=0,log(lim+.5)\log(5),N=5^n;while(N<=lim,listput(v,N);N<<=1));vecsort(Vec(v)) \\ Charles R Greathouse IV, Jun 28 2011
    
  • Python
    # A003592.py
    from heapq import heappush, heappop
    def A003592():
        pq = [1]
        seen = set(pq)
        while True:
            value = heappop(pq)
            yield value
            seen.remove(value)
            for x in 2*value, 5*value:
                if x not in seen:
                    heappush(pq, x)
                    seen.add(x)
    sequence = A003592()
    A003592_list = [next(sequence) for _ in range(100)]
    
  • Python
    from sympy import integer_log
    def A003592(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): return n+x-sum((x//5**i).bit_length() for i in range(integer_log(x,5)[0]+1))
        return bisection(f,n,n) # Chai Wah Wu, Feb 24 2025
    
  • Sage
    def isA003592(n) :
        return not any(d != 2 and d != 5 for d in prime_divisors(n))
    @CachedFunction
    def A003592(n) :
        if n == 1 : return 1
        k = A003592(n-1) + 1
        while not isA003592(k) : k += 1
        return k
    [A003592(n) for n in (1..48)]  # Peter Luschny, Jul 20 2012
    

Formula

The characteristic function of this sequence is given by Sum_{n >= 1} x^a(n) = Sum_{n >= 1} mu(10*n)*x^n/(1 - x^n), where mu(n) is the Möbius function A008683. Cf. with the formula of Hanna in A051037. - Peter Bala, Mar 18 2019
a(n) ~ exp(sqrt(2*log(2)*log(5)*n)) / sqrt(10). - Vaclav Kotesovec, Sep 22 2020
a(n) = 2^A022332(n) * 5^A022333(n). - R. J. Mathar, Jul 06 2025

Extensions

Incomplete Python program removed by David Radcliffe, Jun 27 2016

A062570 a(n) = phi(2*n).

Original entry on oeis.org

1, 2, 2, 4, 4, 4, 6, 8, 6, 8, 10, 8, 12, 12, 8, 16, 16, 12, 18, 16, 12, 20, 22, 16, 20, 24, 18, 24, 28, 16, 30, 32, 20, 32, 24, 24, 36, 36, 24, 32, 40, 24, 42, 40, 24, 44, 46, 32, 42, 40, 32, 48, 52, 36, 40, 48, 36, 56, 58, 32, 60, 60, 36, 64, 48, 40, 66, 64, 44, 48, 70, 48, 72
Offset: 1

Views

Author

Jason Earls, Jul 03 2001

Keywords

Comments

a(n) is also the number of non-congruent solutions to x^2 - y^2 == 1 (mod n). - Yuval Dekel (dekelyuval(AT)hotmail.com), Sep 21 2003
a(n) is the size of a square companion matrix of the minimal cyclotomic polynomial of (-1)^(1/n). - Eric Desbiaux, Dec 08 2015
a(n) is the degree of the (2n)-th cyclotomic field Q(zeta_(2n)). Note that Q(zeta_n) = Q(zeta_(2n)) for odd n. - Jianing Song, May 17 2021
The number of integers k from 1 to n such that gcd(n,k) is a power of 2. - Amiram Eldar, May 18 2025

References

  • T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, p. 28.

Crossrefs

Column 1 of A129559, column 2 of A372673.
Row 1 of A379010.
Row sums of A129558 and of A129564.

Programs

  • Maple
    [phi(2*n)$n=1..80]; # Muniru A Asiru, Mar 18 2019
  • Mathematica
    Table[EulerPhi[2 n], {n, 80}] (* Vincenzo Librandi, Aug 23 2013 *)
  • PARI
    a(n) = eulerphi(2*n)
    
  • Python
    from sympy import totient
    def A062570(n): return totient(n) if n&1 else totient(n)<<1 # Chai Wah Wu, Aug 04 2024
  • Sage
    [euler_phi(2*n) for n in range(1,74)] # Zerinvary Lajos, Jun 06 2009
    

Formula

a(n) = Sum_{d|n and d is odd} n/d*mu(d).
Multiplicative with a(2^e) = 2^e and a(p^e) = p^e-p^(e-1), p>2.
Dirichlet g.f.: zeta(s-1)/zeta(s)*2^s/(2^s-1). - Ralf Stephan, Jun 17 2007
a(n) = A000010(2*n).
a(n) = phi(n)*(1+((n+1) mod 2)). - Gary Detlefs, Jul 13 2011
a(n) = A173557(n)*b(n) where b(n) = 1, 2, 1, 4, 1, 2, 1, 8, 3, 2, 1, 4, 1, 2, ... is the multiplicative function defined by b(p^e) = p^(e-1) if p<>2 and b(2^e)=2^e. b(n) = n/A204455(n). - R. J. Mathar, Jul 02 2013
a(n) = -c_{2n}(n) where c_q(n) is Ramanujan's sum. - Michael Somos, Aug 23 2013
a(n) = A055034(2*n), for n >= 2. - Wolfdieter Lang, Nov 30 2013
O.g.f.: Sum_{n >= 1} mu(2*n-1)*x^(2*n-1)/(1 - x^(2*n-1))^2. - Peter Bala, Mar 17 2019
a(n) = A000010(4*n)/2, for n > = 1 (see Apostol, Theorem 2.5, (b), p. 28). - Wolfdieter Lang, Nov 17 2019
a(n) = n - Sum_{d|n, n/d odd, d < n} a(d). - Ilya Gutkovskiy, May 30 2020
Dirichlet convolution of A000010 and A209229. - Werner Schulte, Jan 17 2021
From Richard L. Ollerton, May 07 2021: (Start)
a(n) = Sum_{k=1..n} A209229(gcd(n,k)).
a(n) = Sum_{k=1..n} A209229(n/gcd(n,k))*phi(gcd(n,k))/phi(n/gcd(n,k)). (End)
Sum_{k=1..n} a(k) ~ c * n^2, where c = 4/Pi^2 = 0.405284... (A185199). - Amiram Eldar, Oct 22 2022
a(n) = A000034(n) * A000010(n). - Amiram Eldar, May 18 2025

Extensions

Corrected by Vladeta Jovovic, Dec 04 2002

A003591 Numbers of form 2^i*7^j, with i, j >= 0.

Original entry on oeis.org

1, 2, 4, 7, 8, 14, 16, 28, 32, 49, 56, 64, 98, 112, 128, 196, 224, 256, 343, 392, 448, 512, 686, 784, 896, 1024, 1372, 1568, 1792, 2048, 2401, 2744, 3136, 3584, 4096, 4802, 5488, 6272, 7168, 8192, 9604, 10976, 12544, 14336, 16384, 16807, 19208, 21952, 25088
Offset: 1

Views

Author

Keywords

Comments

A204455(7*a(n)) = 7, and only for these numbers. - Wolfdieter Lang, Feb 04 2012

Crossrefs

Programs

  • GAP
    Filtered([1..30000],n->PowerMod(14,n,n)=0); # Muniru A Asiru, Mar 19 2019
    
  • Haskell
    import Data.Set (singleton, deleteFindMin, insert)
    a003591 n = a003591_list !! (n-1)
    a003591_list = f $ singleton 1 where
       f s = y : f (insert (2 * y) $ insert (7 * y) s')
                   where (y, s') = deleteFindMin s
    -- Reinhard Zumkeller, May 16 2015
    
  • Magma
    [n: n in [1..26000] | PrimeDivisors(n) subset [2,7]]; // Bruno Berselli, Sep 24 2012
    
  • Mathematica
    fQ[n_] := PowerMod[14,n,n]==0; Select[Range[30000], fQ] (* Vincenzo Librandi, Feb 04 2012 *)
  • PARI
    list(lim)=my(v=List(),N);for(n=0,log(lim)\log(7),N=7^n;while(N<=lim,listput(v,N);N<<=1));vecsort(Vec(v)) \\ Charles R Greathouse IV, Jun 28 2011
    
  • PARI
    isA003591(n)=n>>=valuation(n,2);ispower(n,,&n);n==1||n==7 \\ Charles R Greathouse IV, Jun 28 2011
    
  • Python
    from sympy import integer_log
    def A003591(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x): return n+x-sum((x//7**i).bit_length() for i in range(integer_log(x,7)[0]+1))
        return bisection(f,n,n) # Chai Wah Wu, Sep 16 2024

Formula

The characteristic function of this sequence is given by Sum_{n >= 1} x^a(n) = Sum_{n >= 1} mu(14*n)*x^n/(1 - x^n), where mu(n) is the Möbius function A008683. Cf. with the formula of Hanna in A051037. - Peter Bala, Mar 18 2019
Sum_{n>=1} 1/a(n) = (2*7)/((2-1)*(7-1)) = 7/3. - Amiram Eldar, Sep 22 2020
a(n) ~ exp(sqrt(2*log(2)*log(7)*n)) / sqrt(14). - Vaclav Kotesovec, Sep 22 2020
a(n) = 2^A025637(n) *7^A025664(n). - R. J. Mathar, Jul 06 2025

A003596 Numbers of the form 2^i * 11^j.

Original entry on oeis.org

1, 2, 4, 8, 11, 16, 22, 32, 44, 64, 88, 121, 128, 176, 242, 256, 352, 484, 512, 704, 968, 1024, 1331, 1408, 1936, 2048, 2662, 2816, 3872, 4096, 5324, 5632, 7744, 8192, 10648, 11264, 14641, 15488, 16384, 21296, 22528, 29282, 30976, 32768
Offset: 1

Views

Author

Keywords

Comments

A204455(11*a(n)) = 11, and only for these numbers. - Wolfdieter Lang, Feb 04 2012

Crossrefs

Programs

  • GAP
    Filtered([1..33000],n->PowerMod(22,n,n)=0); # Muniru A Asiru, Mar 19 2019
    
  • Haskell
    import Data.Set (singleton, deleteFindMin, insert)
    a003596 n = a003596_list !! (n-1)
    a003596_list = f $ singleton (1,0,0) where
       f s = y : f (insert (2 * y, i + 1, j) $ insert (11 * y, i, j + 1) s')
             where ((y, i, j), s') = deleteFindMin s
    -- Reinhard Zumkeller, May 15 2015
    
  • Magma
    [n: n in [1..2*10^5] | PrimeDivisors(n) subset [2, 11]]; // Vincenzo Librandi, Jun 27 2016
    
  • Mathematica
    fQ[n_] := PowerMod[22,n,n]==0; Select[Range[40000], fQ] (* Vincenzo Librandi, Feb 04 2012 *)
  • PARI
    list(lim)=my(v=List(),N);for(n=0,log(lim)\log(11),N=11^n;while(N<=lim,listput(v,N);N<<=1));vecsort(Vec(v)) \\ Charles R Greathouse IV, Jun 28 2011
    
  • Python
    from sympy import integer_log
    def A003596(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): return n+x-sum((x//11**i).bit_length() for i in range(integer_log(x,11)[0]+1))
        return bisection(f,n,n) # Chai Wah Wu, Mar 25 2025

Formula

The characteristic function of this sequence is given by Sum_{n >= 1} x^a(n) = Sum_{n >= 1} mu(22*n)*x^n/(1 - x^n), where mu(n) is the Möbius function A008683. Cf. with the formula of Hanna in A051037. - Peter Bala, Mar 18 2019
Sum_{n>=1} 1/a(n) = (2*11)/((2-1)*(11-1)) = 11/5. - Amiram Eldar, Sep 23 2020
a(n) ~ exp(sqrt(2*log(2)*log(11)*n)) / sqrt(22). - Vaclav Kotesovec, Sep 23 2020

A206787 Sum of the odd squarefree divisors of n.

Original entry on oeis.org

1, 1, 4, 1, 6, 4, 8, 1, 4, 6, 12, 4, 14, 8, 24, 1, 18, 4, 20, 6, 32, 12, 24, 4, 6, 14, 4, 8, 30, 24, 32, 1, 48, 18, 48, 4, 38, 20, 56, 6, 42, 32, 44, 12, 24, 24, 48, 4, 8, 6, 72, 14, 54, 4, 72, 8, 80, 30, 60, 24, 62, 32, 32, 1, 84, 48, 68, 18, 96, 48, 72, 4
Offset: 1

Views

Author

Reinhard Zumkeller, Feb 12 2012

Keywords

Comments

a(A000079(n)) = 1; a(A057716(n)) > 1; a(A065119(n)) = 4; a(A086761(n)) = 6.
Inverse Mobius transform of 1, 0, 3, 0, 5, 0, 7, 0, 0, 0, 11, 0, 13, 0, 15, 0, 17, 0, 19, 0, 21, 0, 23, 0, 0, 0, 0, 0, 29... - R. J. Mathar, Jul 12 2012

Crossrefs

Inverse Möbius transform of the absolute values of A349343.

Programs

  • Haskell
    a206787 = sum . filter odd . a206778_row
    
  • Magma
    [&+[d:d in Divisors(m)|IsOdd(d) and IsSquarefree(d)]:m in [1..72]]; // Marius A. Burtea, Aug 14 2019
    
  • Maple
    seq(add(d*mobius(2*d)^2, d in divisors(n)), n=1 .. 80); # Ridouane Oudra, Aug 14 2019
  • Mathematica
    a[n_] := DivisorSum[n, #*Boole[OddQ[#] && SquareFreeQ[#]]&]; Array[a, 80] (* Jean-François Alcover, Dec 05 2015 *)
    f[2, e_] := 1; f[p_, e_] := p + 1; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Sep 18 2020 *)
  • PARI
    a(n) = sumdiv(n, d, d*(d % 2)*issquarefree(d)); \\ Michel Marcus, Sep 21 2014
    
  • Python
    from math import prod
    from sympy import primefactors
    def A206787(n): return prod(1+(p if p>2 else 0) for p in primefactors(n)) # Chai Wah Wu, Oct 10 2024

Formula

a(n) = Sum_{k = 1..A034444(n)} (A206778(n,k) mod 2) * A206778(n,k).
a(n) = Sum_{d|n} d*mu(2*d)^2, where mu is the Möbius function (A008683). - Ridouane Oudra, Aug 14 2019
Multiplicative with a(2^e) = 1, and a(p^e) = p + 1 for p > 2. - Amiram Eldar, Sep 18 2020
Sum_{k=1..n} a(k) ~ (1/3) * n^2. - Amiram Eldar, Nov 17 2022
Dirichlet g.f.: (zeta(s)*zeta(s-1)/zeta(2*s-2))*(2^s/(2^s+2)). - Amiram Eldar, Jan 03 2023
From Antti Karttunen, Nov 22 2023: (Start)
a(n) = A000203(A204455(n)) = A000593(A007947(n)) = A048250(n)/A010684(n-1). [From Sequence Machine]
a(n) = Sum_{d|n} abs(A349343(d)). [See R. J. Mathar's Jul 12 2012 comment above]
(End)
a(n) = Sum_{d divides n, d odd} d * mu(d)^2. - Peter Bala, Feb 01 2024

A106609 Numerator of n/(n+8).

Original entry on oeis.org

0, 1, 1, 3, 1, 5, 3, 7, 1, 9, 5, 11, 3, 13, 7, 15, 2, 17, 9, 19, 5, 21, 11, 23, 3, 25, 13, 27, 7, 29, 15, 31, 4, 33, 17, 35, 9, 37, 19, 39, 5, 41, 21, 43, 11, 45, 23, 47, 6, 49, 25, 51, 13, 53, 27, 55, 7, 57, 29, 59, 15, 61, 31, 63, 8, 65, 33, 67, 17, 69, 35, 71, 9, 73, 37, 75, 19, 77, 39, 79
Offset: 0

Views

Author

N. J. A. Sloane, May 15 2005

Keywords

Comments

The graph of this sequence is made up of four linear functions: a(n_odd)=n, a(n=2+4i)=n/2, a(4+8i)=n/4, a(8i)=n/8. - Zak Seidov, Oct 30 2006. [In general, f(n) = numerator of n/(n+m) consists of linear functions n/d_i, where d_i are divisors of m (including 1 and m).]
a(n+2), n>=0, is the denominator of the harmonic mean H(n,2) = 4*n/(n+2). a(n+2) = (n+2)/gcd(n+2,8). a(n+5) = A227042(n+2, 2), n >= 0. - Wolfdieter Lang, Jul 04 2013
The sequence p(n) = a(n-4), n>=1, with a(-3) = a(3) = 3, a(-2) = a(2) = 1 and a(-1) = a(1) = 1, appears in the problem of writing 2*sin(2*Pi/n) as an integer in the algebraic number field Q(rho(q(n))), where rho(k) = 2*cos(Pi/k) and q(n) = A225975(n). One has 2*sin(2*Pi/n) = R(p(n), x) modulo C(q(n), x), with x = rho(q(n)) and the integer polynomials R and C given in A127672 and A187360, respectively. See a comment on A225975. - Wolfdieter Lang, Dec 04 2013
A204455(n) divides a(n) for n>=1. - Alexander R. Povolotsky, Apr 06 2015
A multiplicative sequence. Also, a(n) is a strong divisibility sequence, that is, gcd(a(n),a(m)) = a(gcd(n,m)) for n >= 1, m >= 1. In particular, a(n) is a divisibility sequence: if n divides m then a(n) divides a(m). - Peter Bala, Feb 20 2019

Crossrefs

Cf. A109049, A204455, A225975, A227042 (second column, starting with a(5)).
Cf. Sequences given by the formula numerator(n/(n + k)): A026741 (k = 2), A051176 (k = 3), A060819 (k = 4), A060791 (k = 5), A060789 (k = 6), A106608 thru A106612 (k = 7 thru 11), A051724 (k = 12), A106614 thru A106621 (k = 13 thru 20).

Programs

  • GAP
    List([0..80],n->NumeratorRat(n/(n+8))); # Muniru A Asiru, Feb 19 2019
  • Magma
    [Numerator(n/(n+8)): n in [0..100]]; // Vincenzo Librandi, Apr 18 2011
    
  • Maple
    a := n -> iquo(n, [8, 1, 2, 1, 4, 1, 2, 1][1 + modp(n, 8)]):
    seq(a(n), n=0..79); # using Wolfdieter Lang's formula, Peter Luschny, Feb 22 2019
  • Mathematica
    f[n_]:=Numerator[n/(n+8)];Array[f,100,0] (* Vladimir Joseph Stephan Orlovsky, Feb 16 2011 *)
    LinearRecurrence[{0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,-1},{0,1,1,3,1,5,3,7,1,9,5,11,3,13,7,15},100] (* Harvey P. Dale, Sep 27 2019 *)
  • PARI
    vector(100, n, n--; numerator(n/(n+8))) \\ G. C. Greubel, Feb 19 2019
    
  • Sage
    [lcm(n,8)/8 for n in range(0, 100)] # Zerinvary Lajos, Jun 09 2009
    

Formula

a(n) = 2*a(n-8) - a(n-16).
G.f.: x* (x^2-x+1) * (x^12 +2*x^11 +4*x^10 +3*x^9 +4*x^8 +4*x^7 +7*x^6 +4*x^5 +4*x^4 +3*x^3 +4*x^2 +2*x +1) / ( (x-1)^2 *(x+1)^2 *(x^2+1)^2 *(x^4+1)^2 ). - R. J. Mathar, Dec 02 2010
From R. J. Mathar, Apr 18 2011: (Start)
a(n) = A109049(n)/8.
Dirichlet g.f. zeta(s-1)*(1-1/2^s-1/2^(2s)-1/2^(3s)).
Multiplicative with a(2^e) = 2^max(0,e-3). a(p^e) = p^e if p>2. (End)
a(n) = n/gcd(n,8), n >= 0. See the harmonic mean comment above. - Wolfdieter Lang, Jul 04 2013
a(n) = n if n is odd; for n == 0 (mod 8) it is n/8, for n == 2 or 6 (mod 8) it is n/2 and for n == 4 (mod 8) it is n/4. - Wolfdieter Lang, Dec 04 2013
From Peter Bala, Feb 20 2019: (Start)
O.g.f.: Sum_{n >= 0} a(n)*x^n = F(x) - F(x^2) - F(x^4) - F(x^8), where F(x) = x/(1 - x)^2.
More generally, for m >= 1, Sum_{n >= 0} (a(n)^m)*x^n = F(m,x) + (1 - 2^m)*( F(m,x^2) + F(m,x^4) + F(m,x^8) ), where F(m,x) = A(m,x)/(1 - x)^(m+1) with A(m,x) the m-th Eulerian polynomial: A(1,x) = x, A(2,x) = x*(1 + x), A(3,x) = x*(1 + 4*x + x^2) - see A008292.
Sum_{n >= 1} (1/n)*a(n)*x^n = G(x) - (1/2)*G(x^2) - (1/4)*G(x^4) - (1/8)*G(x^8), where G(x) = x/(1 - x).
Sum_{n >= 1} (1/n^2)*a(n)*x^n = L(x) - (1/2^2)*L(x^2) - (1/4)^2*L(x^4) - (1/8)^2*L(x^8), where L(x) = Log(1/(1 - x)).
Sum_{n >= 1} (1/a(n))*x^n = L(x) + (1/2)*L(x^2) + (1/2)*L(x^4) + (1/2)*L(x^8). (End)
Sum_{k=1..n} a(k) ~ (43/128) * n^2. - Amiram Eldar, Nov 25 2022
Showing 1-10 of 22 results. Next