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

A143204 Union of A143207 and A033847.

Original entry on oeis.org

14, 28, 30, 56, 60, 90, 98, 112, 120, 150, 180, 196, 224, 240, 270, 300, 360, 392, 448, 450, 480, 540, 600, 686, 720, 750, 784, 810, 896, 900, 960, 1080, 1200, 1350, 1372, 1440, 1500, 1568, 1620, 1792, 1800, 1920, 2160, 2250, 2400, 2430, 2700, 2744, 2880
Offset: 1

Views

Author

Reinhard Zumkeller, Aug 12 2008

Keywords

Comments

Subsequence of A195238. - Harvey P. Dale, Sep 13 2011

Examples

			a(1)  =  14 = 2 * 7 = A033847(1).
a(2)  =  28 = 2^2 * 7 = A033847(2).
a(3)  =  30 = 2 * 3 * 5 = A143207(1).
a(4)  =  56 = 2^3 * 7 = A033847(3).
a(5)  =  60 = 2^2 * 3 * 5 = A143207(2).
a(6)  =  90 = 2 * 3^2 * 5 = A143207(3).
a(7)  =  98 = 2 * 7^2 = A033847(4).
a(8)  = 112 = 2^4 * 7 = A033847(5).
a(9)  = 120 = 2^3 * 3 * 5 = A143207(4).
a(10) = 150 = 2 * 3 * 5^2 = A143207(5).
a(11) = 180 = 2^2 * 3^2 * 5 = A143207(6).
a(12) = 196 = 2^2 * 7^2 = A033847(6).
		

Crossrefs

Programs

  • Mathematica
    q[n_] := Module[{p1 = {2, 3, 5}, p2 = {2, 7}, e1, e2}, e1 = IntegerExponent[n, p1]; e2 = IntegerExponent[n, p2]; (Times @@ e1 > 0 && Times @@ (p1^e1) == n) || (Times @@ e2 > 0 && Times @@ (p2^e2) == n)]; Select[Range[3000], q] (* Amiram Eldar, Oct 25 2024 *)

Formula

A143201(a(n)) = 6. - Harvey P. Dale, Sep 13 2011
Sum_{n>=1} 1/a(n) = 7/24. - Amiram Eldar, Oct 25 2024

Extensions

Corrected by Harvey P. Dale, Aug 21 2011
Revised version with improved definition; thanks to Harvey P. Dale, who noticed that the original definition was not sufficient.

A008472 Sum of the distinct primes dividing n.

Original entry on oeis.org

0, 2, 3, 2, 5, 5, 7, 2, 3, 7, 11, 5, 13, 9, 8, 2, 17, 5, 19, 7, 10, 13, 23, 5, 5, 15, 3, 9, 29, 10, 31, 2, 14, 19, 12, 5, 37, 21, 16, 7, 41, 12, 43, 13, 8, 25, 47, 5, 7, 7, 20, 15, 53, 5, 16, 9, 22, 31, 59, 10, 61, 33, 10, 2, 18, 16, 67, 19, 26, 14, 71, 5, 73
Offset: 1

Views

Author

Keywords

Comments

Sometimes called sopf(n).
Sum of primes dividing n (without repetition) (compare A001414).
Equals A051731 * A061397 = inverse Mobius transform of [0, 2, 3, 0, 5, 0, 7, ...]. - Gary W. Adamson, Feb 14 2008
Equals row sums of triangle A143535. - Gary W. Adamson, Aug 23 2008
a(n) = n if and only if n is prime. - Daniel Forgues, Mar 24 2009
a(n) = n is a new record if and only if n is prime. - Zak Seidov, Jun 27 2009
a(A001043(n)) = A191583(n);
For n > 0: a(A000079(n)) = 2, a(A000244(n)) = 3, a(A000351(n)) = 5, a(A000420(n)) = 7;
a(A006899(n)) <= 3; a(A003586(n)) = 5; a(A033846(n)) = 7; a(A033849(n)) = 8; a(A033847(n)) = 9; a(A033850(n)) = 10; a(A143207(n)) = 10. - Reinhard Zumkeller, Jun 28 2011
For n > 1: a(n) = Sum(A027748(n,k): 1 <= k <= A001221(n)). - Reinhard Zumkeller, Aug 27 2011
If n is the product of twin primes (A037074), a(n) = 2*sqrt(n+1) = sqrt(4n+4). - Wesley Ivan Hurt, Sep 07 2013
From Wilf A. Wilson, Jul 21 2017: (Start)
a(n) + 2, n > 2, is the number of maximal subsemigroups of the monoid of orientation-preserving or -reversing mappings on a set with n elements.
a(n) + 3, n > 2, is the number of maximal subsemigroups of the monoid of orientation-preserving or -reversing partial mappings on a set with n elements.
(End)
The smallest m such that a(m) = n, or 0 if no such number m exists is A064502(n). The only integers that are not in the sequence are 1, 4 and 6. - Bernard Schott, Feb 07 2022

Examples

			a(18) = 5 because 18 = 2 * 3^2 and 2 + 3 = 5.
a(19) = 19 because 19 is prime.
a(20) = 7 because 20 = 2^2 * 5 and 2 + 5 = 7.
		

Crossrefs

First difference of A024924.
Sum of the k-th powers of the primes dividing n for k=0..10 : A001221 (k=0), this sequence (k=1), A005063 (k=2), A005064 (k=3), A005065 (k=4), A351193 (k=5), A351194 (k=6), A351195 (k=7), this sequence (k=8), A351197 (k=9), A351198 (k=10).
Cf. A010051.

Programs

  • Haskell
    a008472 = sum . a027748_row  -- Reinhard Zumkeller, Mar 29 2012
    
  • Magma
    [n eq 1 select 0 else &+[p[1]: p in Factorization(n)]: n in [1..100]]; // Vincenzo Librandi, Jun 24 2017
    
  • Maple
    A008472 := n -> add(d, d = select(isprime, numtheory[divisors](n))):
    seq(A008472(i), i = 1..40); # Peter Luschny, Jan 31 2012
    A008472 := proc(n)
            add( d, d= numtheory[factorset](n)) ;
    end proc: # R. J. Mathar, Jul 08 2012
  • Mathematica
    Prepend[Array[Plus @@ First[Transpose[FactorInteger[#]]] &, 100, 2], 0]
    Join[{0}, Rest[Total[Transpose[FactorInteger[#]][[1]]]&/@Range[100]]] (* Harvey P. Dale, Jun 18 2012 *)
    (* Requires version 7.0+ *) Table[DivisorSum[n, # &, PrimeQ[#] &], {n, 75}] (* Alonso del Arte, Dec 13 2014 *)
    Table[Sum[p, {p, Select[Divisors[n], PrimeQ]}], {n, 1, 100}] (* Vaclav Kotesovec, May 20 2020 *)
  • PARI
    sopf(n) = local(fac=factor(n)); sum(i=1,matsize(fac)[1],fac[i,1])
    
  • PARI
    vector(100,n,vecsum(factor(n)[,1]~)) \\ Derek Orr, May 13 2015
    
  • PARI
    A008472(n)=vecsum(factor(n)[,1]) \\ M. F. Hasler, Jul 18 2015
    
  • Python
    from sympy import primefactors
    def A008472(n): return sum(primefactors(n)) # Chai Wah Wu, Feb 03 2022
  • Sage
    def A008472(n):
        return add(d for d in divisors(n) if is_prime(d))
    print([A008472(i) for i in (1..40)]) # Peter Luschny, Jan 31 2012
    
  • Sage
    [sum(prime_factors(n)) for n in range(1,74)] # Giuseppe Coppoletta, Jan 19 2015
    

Formula

Let n = Product_j prime(j)^k(j) where k(j) >= 1, then a(n) = Sum_j prime(j).
Additive with a(p^e) = p.
G.f.: Sum_{k >= 1} prime(k)*x^prime(k)/(1-x^prime(k)). - Franklin T. Adams-Watters, Sep 01 2009
L.g.f.: -log(Product_{k>=1} (1 - x^prime(k))) = Sum_{n>=1} a(n)*x^n/n. - Ilya Gutkovskiy, May 06 2017
Dirichlet g.f.: primezeta(s-1)*zeta(s). - Benedict W. J. Irwin, Jul 11 2018
a(n) = Sum_{p|n, p prime} p. - Wesley Ivan Hurt, Feb 04 2022
From Bernard Schott, Feb 07 2022: (Start)
For n > 0: a(A001020(n)) = 11, a(A001022(n)) = 13, a(A001026(n)) = 17, a(A001029(n)) = 19, a(A009967(n)) = 23, a(A009973(n)) = 29, a(A009975(n)) = 31, a(A009981(n)) = 37, a(A009985(n)) = 41, a(A009987(n)) = 43, a(A009991(n)) = 47.
For p odd prime, a(2*p) = p+2 <==> a(A100484(n)) = A052147(n) for n > 1. (End)
a(n) = Sum_{d|n} d * c(d), where c = A010051. - Wesley Ivan Hurt, Jun 22 2024

A001399 a(n) is the number of partitions of n into at most 3 parts; also partitions of n+3 in which the greatest part is 3; also number of unlabeled multigraphs with 3 nodes and n edges.

Original entry on oeis.org

1, 1, 2, 3, 4, 5, 7, 8, 10, 12, 14, 16, 19, 21, 24, 27, 30, 33, 37, 40, 44, 48, 52, 56, 61, 65, 70, 75, 80, 85, 91, 96, 102, 108, 114, 120, 127, 133, 140, 147, 154, 161, 169, 176, 184, 192, 200, 208, 217, 225, 234, 243, 252, 261, 271, 280, 290, 300, 310, 320, 331, 341
Offset: 0

Views

Author

Keywords

Comments

Also number of tripods (trees with exactly 3 leaves) on n vertices. - Eric W. Weisstein, Mar 05 2011
Also number of partitions of n+3 into exactly 3 parts; number of partitions of n in which the greatest part is less than or equal to 3; and the number of nonnegative solutions to b + 2c + 3d = n.
Also a(n) gives number of partitions of n+6 into 3 distinct parts and number of partitions of 2n+9 into 3 distinct and odd parts, e.g., 15 = 11 + 3 + 1 = 9 + 5 + 1 = 7 + 5 + 3. - Jon Perry, Jan 07 2004
Also bracelets with n+3 beads 3 of which are red (so there are 2 possibilities with 5 beads).
More generally, the number of partitions of n into at most k parts is also the number of partitions of n+k into k positive parts, the number of partitions of n+k in which the greatest part is k, the number of partitions of n in which the greatest part is less than or equal to k, the number of partitions of n+k(k+1)/2 into exactly k distinct positive parts, the number of nonnegative solutions to b + 2c + 3d + ... + kz = n and the number of nonnegative solutions to 2c + 3d + ... + kz <= n. - Henry Bottomley, Apr 17 2001
Also coefficient of q^n in the expansion of (m choose 3)_q as m goes to infinity. - Y. Kelly Itakura (yitkr(AT)mta.ca), Aug 21 2002
From Winston C. Yang (winston(AT)cs.wisc.edu), Apr 30 2002: (Start)
Write 1,2,3,4,... in a hexagonal spiral around 0, then a(n) for n > 0 is formed by the folding points (including the initial 1). The spiral begins:
.
85--84--83--82--81--80
/ \
86 56--55--54--53--52 79
/ / \ \
87 57 33--32--31--30 51 78
/ / / \ \ \
88 58 34 16--15--14 29 50 77
/ / / / \ \ \ \
89 59 35 17 5---4 13 28 49 76
/ / / / / \ \ \ \ \
90 60 36 18 6 0 3 12 27 48 75
/ / / / / / / / / / /
91 61 37 19 7 1---2 11 26 47 74
\ \ \ \ / / / /
62 38 20 8---9--10 25 46 73
\ \ \ / / /
63 39 21--22--23--24 45 72
\ \ / /
64 40--41--42--43--44 71
\ /
65--66--67--68--69--70
.
a(p) is maximal number of hexagons in a polyhex with perimeter at most 2p + 6. (End)
a(n-3) is the number of partitions of n into 3 distinct parts, where 0 is allowed as a part. E.g., at n=9, we can write 8+1+0, 7+2+0, 6+3+0, 4+5+0, 1+2+6, 1+3+5 and 2+3+4, which is a(6)=7. - Jon Perry, Jul 08 2003
a(n) gives number of partitions of n+6 into parts <=3 where each part is used at least once (subtract 6=1+2+3 from n). - Jon Perry, Jul 03 2004
This is also the number of partitions of n+3 into exactly 3 parts (there is a 1-to-1 correspondence between the number of partitions of n+3 in which the greatest part is 3 and the number of partitions of n+3 into exactly three parts). - Graeme McRae, Feb 07 2005
Apply the Riordan array (1/(1-x^3),x) to floor((n+2)/2). - Paul Barry, Apr 16 2005
Also, number of triangles that can be created with odd perimeter 3,5,7,9,11,... with all sides whole numbers. Note that triangles with even perimeter can be generated from the odd ones by increasing each side by 1. E.g., a(1) = 1 because perimeter 3 can make {1,1,1} 1 triangle. a(4) = 3 because perimeter 9 can make {1,4,4} {2,3,4} {3,3,3} 3 possible triangles. - Bruce Love (bruce_love(AT)ofs.edu.sg), Nov 20 2006
Also number of nonnegative solutions of the Diophantine equation x+2*y+3*z=n, cf. Pólya/Szegő reference.
From Vladimir Shevelev, Apr 23 2011: (Start)
Also a(n-3), n >= 3, is the number of non-equivalent necklaces of 3 beads each of them painted by one of n colors.
The sequence {a(n-3), n >= 3} solves the so-called Reis problem about convex k-gons in case k=3 (see our comment to A032279).
a(n-3) (n >= 3) is an essentially unimprovable upper estimate for the number of distinct values of the permanent in (0,1)-circulants of order n with three 1's in every row. (End)
A001399(n) is the number of 3-tuples (w,x,y) having all terms in {0,...,n} and w = 2*x+3*y. - Clark Kimberling, Jun 04 2012
Also, for n >= 3, a(n-3) is the number of the distinct triangles in an n-gon, see the Ngaokrajang links. - Kival Ngaokrajang, Mar 16 2013
Also, a(n) is the total number of 5-curve coin patterns (5C4S type: 5 curves covering full 4 coins and symmetry) packing into fountain of coins base (n+3). See illustration in links. - Kival Ngaokrajang, Oct 16 2013
Also a(n) = half the number of minimal zero sequences for Z_n of length 3 [Ponomarenko]. - N. J. A. Sloane, Feb 25 2014
Also, a(n) equals the number of linearly-independent terms at 2n-th order in the power series expansion of an Octahedral Rotational Energy Surface (cf. Harter & Patterson). - Bradley Klee, Jul 31 2015
Also Molien series for invariants of finite Coxeter groups D_3 and A_3. - N. J. A. Sloane, Jan 10 2016
Number of different distributions of n+6 identical balls in 3 boxes as x,y,z where 0 < x < y < z. - Ece Uslu and Esin Becenen, Jan 11 2016
a(n) is also the number of partitions of 2*n with <= n parts and no part >= 4. The bijection to partitions of n with no part >= 4 is: 1 <-> 2, 2 <-> 1 + 3, 3 <-> 3 + 3 (observing the order of these rules). The <- direction uses the following fact for partitions of 2*n with <= n parts and no part >=4: for each part 1 there is a part 3, and an even number (including 0) of remaining parts 3. - Wolfdieter Lang, May 21 2019
List of the terms in A000567(n>=1), A049450(n>=1), A033428(n>=1), A049451(n>=1), A045944(n>=1), and A003215(n) in nondecreasing order. List of the numbers A056105(n)-1, A056106(n)-1, A056107(n)-1, A056108(n)-1, A056109(n)-1, and A003215(m) with n >= 1 and m >= 0 in nondecreasing order. Numbers of the forms 3n*(n-1)+1, n*(3n-2), n*(3n-1), 3n^2, n*(3n+1), n*(3n+2) with n >= 1 listed in nondecreasing order. Integers m such that lattice points from 1 through m on a hexagonal spiral starting at 1 forms a convex polygon. - Ya-Ping Lu, Jan 24 2024

Examples

			G.f. = 1 + x + 2*x^2 + 3*x^3 + 4*x^4 + 5*x^5 + 7*x^6 + 8*x^7 + 10*x^8 + 12*x^9 + ...
Recall that in a necklace the adjacent beads have distinct colors. Suppose we have n colors with labels 1,...,n. Two colorings of the beads are equivalent if the cyclic sequences of the distances modulo n between labels of adjacent colors have the same period. If n=4, all colorings are equivalent. E.g., for the colorings {1,2,3} and {1,2,4} we have the same period {1,1,2} of distances modulo 4. So, a(n-3)=a(1)=1. If n=5, then we have two such periods {1,1,3} and {1,2,2} modulo 5. Thus a(2)=2. - _Vladimir Shevelev_, Apr 23 2011
a(0) = 1, i.e., {1,2,3} Number of different distributions of 6 identical balls to 3 boxes as x,y and z where 0 < x < y < z. - _Ece Uslu_, Esin Becenen, Jan 11 2016
a(3) = 3, i.e., {1,2,6}, {1,3,5}, {2,3,4} Number of different distributions of 9 identical balls in 3 boxes as x,y and z where 0 < x < y < z. - _Ece Uslu_, Esin Becenen, Jan 11 2016
From _Gus Wiseman_, Apr 15 2019: (Start)
The a(0) = 1 through a(8) = 10 integer partitions of n with at most three parts are the following. The Heinz numbers of these partitions are given by A037144.
  ()  (1)  (2)   (3)    (4)    (5)    (6)    (7)    (8)
           (11)  (21)   (22)   (32)   (33)   (43)   (44)
                 (111)  (31)   (41)   (42)   (52)   (53)
                        (211)  (221)  (51)   (61)   (62)
                               (311)  (222)  (322)  (71)
                                      (321)  (331)  (332)
                                      (411)  (421)  (422)
                                             (511)  (431)
                                                    (521)
                                                    (611)
The a(0) = 1 through a(7) = 8 integer partitions of n + 3 whose greatest part is 3 are the following. The Heinz numbers of these partitions are given by A080193.
  (3)  (31)  (32)   (33)    (322)    (332)     (333)      (3322)
             (311)  (321)   (331)    (3221)    (3222)     (3331)
                    (3111)  (3211)   (3311)    (3321)     (32221)
                            (31111)  (32111)   (32211)    (33211)
                                     (311111)  (33111)    (322111)
                                               (321111)   (331111)
                                               (3111111)  (3211111)
                                                          (31111111)
Non-isomorphic representatives of the a(0) = 1 through a(5) = 5 unlabeled multigraphs with 3 vertices and n edges are the following.
  {}  {12}  {12,12}  {12,12,12}  {12,12,12,12}  {12,12,12,12,12}
            {13,23}  {12,13,23}  {12,13,23,23}  {12,13,13,23,23}
                     {13,23,23}  {13,13,23,23}  {12,13,23,23,23}
                                 {13,23,23,23}  {13,13,23,23,23}
                                                {13,23,23,23,23}
The a(0) = 1 through a(8) = 10 strict integer partitions of n - 6 with three parts are the following (A = 10, B = 11). The Heinz numbers of these partitions are given by A007304.
  (321)  (421)  (431)  (432)  (532)  (542)  (543)  (643)   (653)
                (521)  (531)  (541)  (632)  (642)  (652)   (743)
                       (621)  (631)  (641)  (651)  (742)   (752)
                              (721)  (731)  (732)  (751)   (761)
                                     (821)  (741)  (832)   (842)
                                            (831)  (841)   (851)
                                            (921)  (931)   (932)
                                                   (A21)   (941)
                                                           (A31)
                                                           (B21)
The a(0) = 1 through a(8) = 10 integer partitions of n + 3 with three parts are the following. The Heinz numbers of these partitions are given by A014612.
  (111)  (211)  (221)  (222)  (322)  (332)  (333)  (433)  (443)
                (311)  (321)  (331)  (422)  (432)  (442)  (533)
                       (411)  (421)  (431)  (441)  (532)  (542)
                              (511)  (521)  (522)  (541)  (551)
                                     (611)  (531)  (622)  (632)
                                            (621)  (631)  (641)
                                            (711)  (721)  (722)
                                                   (811)  (731)
                                                          (821)
                                                          (911)
The a(0) = 1 through a(8) = 10 integer partitions of n whose greatest part is <= 3 are the following. The Heinz numbers of these partitions are given by A051037.
  ()  (1)  (2)   (3)    (22)    (32)     (33)      (322)      (332)
           (11)  (21)   (31)    (221)    (222)     (331)      (2222)
                 (111)  (211)   (311)    (321)     (2221)     (3221)
                        (1111)  (2111)   (2211)    (3211)     (3311)
                                (11111)  (3111)    (22111)    (22211)
                                         (21111)   (31111)    (32111)
                                         (111111)  (211111)   (221111)
                                                   (1111111)  (311111)
                                                              (2111111)
                                                              (11111111)
The a(0) = 1 through a(6) = 7 strict integer partitions of 2n+9 with 3 parts, all of which are odd, are the following. The Heinz numbers of these partitions are given by A307534.
  (5,3,1)  (7,3,1)  (7,5,1)  (7,5,3)   (9,5,3)   (9,7,3)   (9,7,5)
                    (9,3,1)  (9,5,1)   (9,7,1)   (11,5,3)  (11,7,3)
                             (11,3,1)  (11,5,1)  (11,7,1)  (11,9,1)
                                       (13,3,1)  (13,5,1)  (13,5,3)
                                                 (15,3,1)  (13,7,1)
                                                           (15,5,1)
                                                           (17,3,1)
The a(0) = 1 through a(8) = 10 strict integer partitions of n + 3 with 3 parts where 0 is allowed as a part (A = 10):
  (210)  (310)  (320)  (420)  (430)  (530)  (540)  (640)  (650)
                (410)  (510)  (520)  (620)  (630)  (730)  (740)
                       (321)  (610)  (710)  (720)  (820)  (830)
                              (421)  (431)  (810)  (910)  (920)
                                     (521)  (432)  (532)  (A10)
                                            (531)  (541)  (542)
                                            (621)  (631)  (632)
                                                   (721)  (641)
                                                          (731)
                                                          (821)
The a(0) = 1 through a(7) = 7 integer partitions of n + 6 whose distinct parts are 1, 2, and 3 are the following. The Heinz numbers of these partitions are given by A143207.
  (321)  (3211)  (3221)   (3321)    (32221)    (33221)     (33321)
                 (32111)  (32211)   (33211)    (322211)    (322221)
                          (321111)  (322111)   (332111)    (332211)
                                    (3211111)  (3221111)   (3222111)
                                               (32111111)  (3321111)
                                                           (32211111)
                                                           (321111111)
(End)
Partitions of 2*n with <= n parts and no part >= 4: a(3) = 3 from (2^3), (1,2,3), (3^2) mapping to (1^3), (1,2), (3), the partitions of 3 with no part >= 4, respectively. - _Wolfdieter Lang_, May 21 2019
		

References

  • R. Ayoub, An Introduction to the Analytic Theory of Numbers, Amer. Math. Soc., 1963; Chapter III, Problem 33.
  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 110, D(n); page 263, #18, P_n^{3}.
  • J. L. Gross and J. Yellen, eds., Handbook of Graph Theory, CRC Press, 2004; p. 517.
  • H. Gupta et al., Tables of Partitions. Royal Society Mathematical Tables, Vol. 4, Cambridge Univ. Press, 1958, p. 2.
  • F. Harary and E. M. Palmer, Graphical Enumeration, Academic Press, NY, 1973, p. 88, (4.1.18).
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers. 3rd ed., Oxford Univ. Press, 1954, p. 275.
  • R. Honsberger, Mathematical Gems III, Math. Assoc. Amer., 1985, p. 39.
  • J. H. van Lint, Combinatorial Seminar Eindhoven, Lecture Notes Math., 382 (1974), see pp. 33-34.
  • G. Pólya and G. Szegő, Problems and Theorems in Analysis I (Springer 1924, reprinted 1972), Part One, Chap. 1, Sect. 1, Problem 25.
  • 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).

Crossrefs

Programs

  • Haskell
    a001399 = p [1,2,3] where
       p _      0 = 1
       p []     _ = 0
       p ks'@(k:ks) m = if m < k then 0 else p ks' (m - k) + p ks m
    -- Reinhard Zumkeller, Feb 28 2013
    
  • Magma
    I:=[1,1,2,3,4,5]; [n le 6 select I[n] else Self(n-1)+Self(n-2)-Self(n-4)-Self(n-5)+Self(n-6): n in [1..80]]; // Vincenzo Librandi, Feb 14 2015
    
  • Magma
    [#RestrictedPartitions(n,{1,2,3}): n in [0..62]]; // Marius A. Burtea, Jan 06 2019
    
  • Magma
    [Round((n+3)^2/12): n in [0..70]]; // Marius A. Burtea, Jan 06 2019
    
  • Maple
    A001399 := proc(n)
        round( (n+3)^2/12) ;
    end proc:
    seq(A001399(n),n=0..40) ;
    with(combstruct):ZL4:=[S,{S=Set(Cycle(Z,card<4))}, unlabeled]:seq(count(ZL4,size=n),n=0..61); # Zerinvary Lajos, Sep 24 2007
    B:=[S,{S = Set(Sequence(Z,1 <= card),card <=3)},unlabelled]: seq(combstruct[count](B, size=n), n=0..61); # Zerinvary Lajos, Mar 21 2009
  • Mathematica
    CoefficientList[ Series[ 1/((1 - x)*(1 - x^2)*(1 - x^3)), {x, 0, 65} ], x ]
    Table[ Length[ IntegerPartitions[n, 3]], {n, 0, 61} ] (* corrected by Jean-François Alcover, Aug 08 2012 *)
    k = 3; Table[(Apply[Plus, Map[EulerPhi[ # ]Binomial[n/#, k/# ] &, Divisors[GCD[n, k]]]]/n + Binomial[If[OddQ[n], n - 1, n - If[OddQ[k], 2, 0]]/2, If[OddQ[k], k - 1, k]/2])/2, {n, k, 50}] (* Robert A. Russell, Sep 27 2004 *)
    LinearRecurrence[{1,1,0,-1,-1,1},{1,1,2,3,4,5},70] (* Harvey P. Dale, Jun 21 2012 *)
    a[ n_] := With[{m = Abs[n + 3] - 3}, Length[ IntegerPartitions[ m, 3]]]; (* Michael Somos, Dec 25 2014 *)
    k=3 (* Number of red beads in bracelet problem *);CoefficientList[Series[(1/k Plus@@(EulerPhi[#] (1-x^#)^(-(k/#))&/@Divisors[k])+(1+x)/(1-x^2)^Floor[(k+2)/2])/2,{x,0,50}],x] (* Herbert Kociemba, Nov 04 2016 *)
    Table[Length[Select[IntegerPartitions[n,{3}],UnsameQ@@#&]],{n,0,30}] (* Gus Wiseman, Apr 15 2019 *)
  • PARI
    {a(n) = round((n + 3)^2 / 12)}; /* Michael Somos, Sep 04 2006 */
    
  • Python
    [round((n+3)**2 / 12) for n in range(0,62)] # Ya-Ping Lu, Jan 24 2024

Formula

G.f.: 1/((1 - x) * (1 - x^2) * (1 - x^3)) = -1/((x+1)*(x^2+x+1)*(x-1)^3); Simon Plouffe in his 1992 dissertation
a(n) = round((n + 3)^2/12). Note that this cannot be of the form (2*i + 1)/2, so ties never arise.
a(n) = A008284(n+3, 3), n >= 0.
a(n) = 1 + a(n-2) + a(n-3) - a(n-5) for all n in Z. - Michael Somos, Sep 04 2006
a(n) = a(-6 - n) for all n in Z. - Michael Somos, Sep 04 2006
a(6*n) = A003215(n), a(6*n + 1) = A000567(n + 1), a(6*n + 2) = A049450(n + 1), a(6*n + 3) = A033428(n + 1), a(6*n + 4) = A049451(n + 1), a(6*n + 5) = A045944(n + 1).
a(n) = a(n-1) + A008615(n+2) = a(n-2) + A008620(n) = a(n-3) + A008619(n) = A001840(n+1) - a(n-1) = A002620(n+2) - A001840(n) = A000601(n) - A000601(n-1). - Henry Bottomley, Apr 17 2001
P(n, 3) = (1/72) * (6*n^2 - 7 - 9*pcr{1, -1}(2, n) + 8*pcr{2, -1, -1}(3, n)) (see Comtet). [Here "pcr" stands for "prime circulator" and it is defined on p. 109 of Comtet, while the formula appears on p. 110. - Petros Hadjicostas, Oct 03 2019]
Let m > 0 and -3 <= p <= 2 be defined by n = 6*m+p-3; then for n > -3, a(n) = 3*m^2 + p*m, and for n = -3, a(n) = 3*m^2 + p*m + 1. - Floor van Lamoen, Jul 23 2001
72*a(n) = 17 + 6*(n+1)*(n+5) + 9*(-1)^n - 8*A061347(n). - Benoit Cloitre, Feb 09 2003
From Jon Perry, Jun 17 2003: (Start)
a(n) = 6*t(floor(n/6)) + (n%6) * (floor(n/6) + 1) + (n mod 6 == 0?1:0), where t(n) = n*(n+1)/2.
a(n) = ceiling(1/12*n^2 + 1/2*n) + (n mod 6 == 0?1:0).
[Here "n%6" means "n mod 6" while "(n mod 6 == 0?1:0)" means "if n mod 6 == 0 then 1, else 0" (as in C).]
(End)
a(n) = Sum_{i=0..floor(n/3)} 1 + floor((n - 3*i)/2). - Jon Perry, Jun 27 2003
a(n) = Sum_{k=0..n} floor((k + 2)/2) * (cos(2*Pi*(n - k)/3 + Pi/3)/3 + sqrt(3) * sin(2*Pi*(n-k)/3 + Pi/3)/3 + 1/3). - Paul Barry, Apr 16 2005
(m choose 3)_q = (q^m-1) * (q^(m-1) - 1) * (q^(m-2) - 1)/((q^3 - 1) * (q^2 - 1) * (q - 1)).
a(n) = Sum_{k=0..floor(n/2)} floor((3 + n - 2*k)/3). - Paul Barry, Nov 11 2003
A117220(n) = a(A003586(n)). - Reinhard Zumkeller, Mar 04 2006
a(n) = 3 * Sum_{i=2..n+1} floor(i/2) - floor(i/3). - Thomas Wieder, Feb 11 2007
Identical to the number of points inside or on the boundary of the integer grid of {I, J}, bounded by the three straight lines I = 0, I - J = 0 and I + 2J = n. - Jonathan Vos Post, Jul 03 2007
a(n) = A026820(n,3) for n > 2. - Reinhard Zumkeller, Jan 21 2010
Euler transform of length 3 sequence [ 1, 1, 1]. - Michael Somos, Feb 25 2012
a(n) = A005044(2*n + 3) = A005044(2*n + 6). - Michael Somos, Feb 25 2012
a(n) = A000212(n+3) - A002620(n+3). - Richard R. Forberg, Dec 08 2013
a(n) = a(n-1) + a(n-2) - a(n-4) - a(n-5) + a(n-6). - David Neil McGrath, Feb 14 2015
a(n) = floor((n^2+3)/12) + floor((n+2)/2). - Giacomo Guglieri, Apr 02 2019
From Devansh Singh, May 28 2020: (Start)
Let p(n, 3) be the number of 3-part integer partitions in which every part is > 0.
Then for n >= 3, p(n, 3) is equal to:
(n^2 - 1)/12 when n is odd and 3 does not divide n.
(n^2 + 3)/12 when n is odd and 3 divides n.
(n^2 - 4)/12 when n is even and 3 does not divide n.
(n^2)/12 when n is even and 3 divides n.
For n >= 3, p(n, 3) = a(n-3). (End)
a(n) = floor(((n+3)^2 + 4)/12). - Vladimír Modrák, Zuzana Soltysova, Dec 08 2020
Sum_{n>=0} 1/a(n) = 15/4 - Pi/(2*sqrt(3)) + Pi^2/18 + tanh(Pi/(2*sqrt(3)))*Pi/sqrt(3). - Amiram Eldar, Sep 29 2022
E.g.f.: exp(-x)*(9 + exp(2*x)*(47 + 42*x + 6*x^2) + 16*exp(x/2)*cos(sqrt(3)*x/2))/72. - Stefano Spezia, Mar 05 2023
a(6n) = 1+6*A000217(n); Sum_{i=1..n} a(6*i) = A000578(n+1). - David García Herrero, May 05 2024

Extensions

Name edited by Gus Wiseman, Apr 15 2019

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

A087207 A binary representation of the primes that divide a number, shown in decimal.

Original entry on oeis.org

0, 1, 2, 1, 4, 3, 8, 1, 2, 5, 16, 3, 32, 9, 6, 1, 64, 3, 128, 5, 10, 17, 256, 3, 4, 33, 2, 9, 512, 7, 1024, 1, 18, 65, 12, 3, 2048, 129, 34, 5, 4096, 11, 8192, 17, 6, 257, 16384, 3, 8, 5, 66, 33, 32768, 3, 20, 9, 130, 513, 65536, 7, 131072, 1025, 10, 1, 36, 19, 262144, 65, 258
Offset: 1

Views

Author

Mitch Cervinka (puritan(AT)planetkc.com), Oct 26 2003

Keywords

Comments

The binary representation of a(n) shows which prime numbers divide n, but not the multiplicities. a(2)=1, a(3)=10, a(4)=1, a(5)=100, a(6)=11, a(10)=101, a(30)=111, etc.
For n > 1, a(n) gives the (one-based) index of the column where n is located in array A285321. A008479 gives the other index. - Antti Karttunen, Apr 17 2017
From Antti Karttunen, Jun 18 & 20 2017: (Start)
A268335 gives all n such that a(n) = A248663(n); the squarefree numbers (A005117) are all the n such that a(n) = A285330(n) = A048675(n).
For all n > 1 for which the value of A285331(n) is well-defined, we have A285331(a(n)) <= floor(A285331(n)/2), because then n is included in the binary tree A285332 and a(n) is one of its ancestors (in that tree), and thus must be at least one step nearer to its root than n itself.
Conjecture: Starting at any n and iterating the map n -> a(n), we will always reach 0 (see A288569). This conjecture is equivalent to the conjecture that at any n that is neither a prime nor a power of two, we will eventually hit a prime number (which then becomes a power of two in the next iteration). If this conjecture is false then sequence A285332 cannot be a permutation of natural numbers. On the other hand, if the conjecture is true, then A285332 must be a permutation of natural numbers, because all primes and powers of 2 occur in definite positions in that tree. This conjecture also implies the conjectures made in A019565 and A285320 that essentially claim that there are neither finite nor infinite cycles in A019565.
If there are any 2-cycles in this sequence, then both terms of the cycle should be present in A286611 and the larger one should be present in A286612.
(End)
Binary rank of the distinct prime indices of n, where the binary rank of an integer partition y is given by Sum_i 2^(y_i-1). For all prime indices (with multiplicity) we have A048675. - Gus Wiseman, May 25 2024

Examples

			a(38) = 129 because 38 = 2*19 = prime(1)*prime(8) and 129 = 2^0 + 2^7 (in binary 10000001).
a(140) = 13, binary 1101 because 140 is divisible by the first, third and fourth primes and 2^(1-1) + 2^(3-1) + 2^(4-1) = 13.
		

Crossrefs

For partial sums see A288566.
Sequences with related definitions: A007947, A008472, A027748, A048675, A248663, A276379 (same sequence shown in base 2), A288569, A289271, A297404.
Cf. A286608 (numbers n for which a(n) < n), A286609 (n for which a(n) > n), and also A286611, A286612.
A003986, A003961, A059896 are used to express relationship between terms of this sequence.
Related to A267116 via A225546.
Positions of particular values are: A000079\{1} (1), A000244\{1} (2), A033845 (3), A000351\{1} (4), A033846 (5), A033849 (6), A143207 (7), A000420\{1} (8), A033847 (9), A033850 (10), A033851 (12), A147576 (14), A147571 (15), A001020\{1} (16), A033848 (17).
A048675 gives binary rank of prime indices.
A061395 gives greatest prime index, least A055396.
A112798 lists prime indices, length A001222, reverse A296150, sum A056239.
Binary indices (listed A048793):
- length A000120, complement A023416
- min A001511, opposite A000012
- sum A029931, product A096111
- max A029837 or A070939, opposite A070940
- complement A368494, sum A359400
- opposite complement A371571, sum A359359
- opposite A371572, sum A230877

Programs

  • Haskell
    a087207 = sum . map ((2 ^) . (subtract 1) . a049084) . a027748_row
    -- Reinhard Zumkeller, Jul 16 2013
    
  • Mathematica
    a[n_] := Total[ 2^(PrimePi /@ FactorInteger[n][[All, 1]] - 1)]; a[1] = 0; Table[a[n], {n, 1, 69}] (* Jean-François Alcover, Dec 12 2011 *)
  • PARI
    a(n) = {if (n==1, 0, my(f=factor(n), v = []); forprime(p=2, vecmax(f[,1]), v = concat(v, vecsearch(f[,1], p)!=0);); fromdigits(Vecrev(v), 2));} \\ Michel Marcus, Jun 05 2017
    
  • PARI
    A087207(n)=vecsum(apply(p->1<M. F. Hasler, Jun 23 2017
    
  • Python
    from sympy import factorint, primepi
    def a(n):
        return sum(2**primepi(i - 1) for i in factorint(n))
    print([a(n) for n in range(1, 101)]) # Indranil Ghosh, Jun 06 2017
    
  • Scheme
    (definec (A087207 n) (if (= 1 n) 0 (+ (A000079 (+ -1 (A055396 n))) (A087207 (A028234 n))))) ;; This uses memoization-macro definec
    (define (A087207 n) (A048675 (A007947 n))) ;; Needs code from A007947 and A048675. - Antti Karttunen, Jun 19 2017

Formula

Additive with a(p^e) = 2^(i-1) where p is the i-th prime. - Vladeta Jovovic, Oct 29 2003
a(n) gives the m such that A019565(m) = A007947(n). - Naohiro Nomoto, Oct 30 2003
A000120(a(n)) = A001221(n); a(n) = Sum(2^(A049084(p)-1): p prime-factor of n). - Reinhard Zumkeller, Nov 30 2003
G.f.: Sum_{k>=1} 2^(k-1)*x^prime(k)/(1-x^prime(k)). - Franklin T. Adams-Watters, Sep 01 2009
From Antti Karttunen, Apr 17 2017, Jun 19 2017 & Dec 06 2018: (Start)
a(n) = A048675(A007947(n)).
a(1) = 0; for n > 1, a(n) = 2^(A055396(n)-1) + a(A028234(n)).
A000035(a(n)) = 1 - A000035(n). [a(n) and n are of opposite parity.]
A248663(n) <= a(n) <= A048675(n). [XOR-, OR- and +-variants.]
a(A293214(n)) = A218403(n).
a(A293442(n)) = A267116(n).
A069010(a(n)) = A287170(n).
A007088(a(n)) = A276379(n).
A038374(a(n)) = A300820(n) for n >= 1.
(End)
From Peter Munn, Jan 08 2020: (Start)
a(A059896(n,k)) = a(n) OR a(k) = A003986(a(n), a(k)).
a(A003961(n)) = 2*a(n).
a(n^2) = a(n).
a(n) = A267116(A225546(n)).
a(A225546(n)) = A267116(n).
(End)

Extensions

More terms from Don Reble, Ray Chandler and Naohiro Nomoto, Oct 28 2003
Name clarified by Antti Karttunen, Jun 18 2017

A109395 Denominator of phi(n)/n = Product_{p|n} (1 - 1/p); phi(n)=A000010(n), the Euler totient function.

Original entry on oeis.org

1, 2, 3, 2, 5, 3, 7, 2, 3, 5, 11, 3, 13, 7, 15, 2, 17, 3, 19, 5, 7, 11, 23, 3, 5, 13, 3, 7, 29, 15, 31, 2, 33, 17, 35, 3, 37, 19, 13, 5, 41, 7, 43, 11, 15, 23, 47, 3, 7, 5, 51, 13, 53, 3, 11, 7, 19, 29, 59, 15, 61, 31, 7, 2, 65, 33, 67, 17, 69, 35, 71, 3, 73, 37, 15, 19, 77, 13, 79, 5, 3
Offset: 1

Views

Author

Franz Vrabec, Aug 26 2005

Keywords

Comments

a(n)=2 iff n=2^k (k>0); otherwise a(n) is odd. If p is prime, a(p)=p; the converse is false, e.g.: a(15)=15. It is remarkable that this sequence often coincides with A006530, the largest prime P dividing n. Theorem: a(n)=P if and only if for every prime p < P in n there is some prime q in n with p|(q-1). - Franz Vrabec, Aug 30 2005

Examples

			a(10) = 10/gcd(10,phi(10)) = 10/gcd(10,4) = 10/2 = 5.
		

Crossrefs

Cf. A076512 for the numerator.
Phi(m)/m = k: A000079 \ {1} (k=1/2), A033845 (k=1/3), A000244 \ {1} (k=2/3), A033846 (k=2/5), A000351 \ {1} (k=4/5), A033847 (k=3/7), A033850 (k=4/7), A000420 \ {1} (k=6/7), A033848 (k=5/11), A001020 \ {1} (k=10/11), A288162 (k=6/13), A001022 \ {1} (12/13), A143207 (k=4/15), A033849 (k=8/15), A033851 (k=24/35).

Programs

Formula

a(n) = n/gcd(n, phi(n)) = n/A009195(n).
From Antti Karttunen, Feb 09 2019: (Start)
a(n) = denominator of A173557(n)/A007947(n).
a(2^n) = 2 for all n >= 1.
(End)
From Amiram Eldar, Jul 31 2020: (Start)
Asymptotic mean of phi(n)/n: lim_{m->oo} (1/m) * Sum_{n=1..m} A076512(n)/a(n) = 6/Pi^2 (A059956).
Asymptotic mean of n/phi(n): lim_{m->oo} (1/m) * Sum_{n=1..m} a(n)/A076512(n) = zeta(2)*zeta(3)/zeta(6) (A082695). (End)

A076512 Denominator of cototient(n)/totient(n).

Original entry on oeis.org

1, 1, 2, 1, 4, 1, 6, 1, 2, 2, 10, 1, 12, 3, 8, 1, 16, 1, 18, 2, 4, 5, 22, 1, 4, 6, 2, 3, 28, 4, 30, 1, 20, 8, 24, 1, 36, 9, 8, 2, 40, 2, 42, 5, 8, 11, 46, 1, 6, 2, 32, 6, 52, 1, 8, 3, 12, 14, 58, 4, 60, 15, 4, 1, 48, 10, 66, 8, 44, 12, 70, 1, 72, 18, 8, 9, 60, 4, 78, 2, 2, 20, 82, 2, 64, 21
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 15 2002

Keywords

Comments

a(n)=1 iff n=A007694(k) for some k.
Numerator of phi(n)/n=Prod_{p|n} (1-1/p). - Franz Vrabec, Aug 26 2005
From Wolfdieter Lang, May 12 2011: (Start)
For n>=2, a(n)/A109395(n) = sum(((-1)^r)*sigma_r,r=0..M(n)) with the elementary symmetric functions (polynomials) sigma_r of the indeterminates {1/p_1,...,1/p_M(n)} if n = prod((p_j)^e(j),j=1..M(n)) where M(n)=A001221(n) and sigma_0=1.
This follows by expanding the above given product for phi(n)/n.
The n-th member of this rational sequence 1/2, 2/3, 1/2, 4/5, 1/3, 6/7, 1/2, 2/3, 2/5,... is also (2/n^2)*sum(k,with 1<=k=2.
Therefore, this scaled sum depends only on the distinct prime factors of n.
See also A023896. Proof via PIE (principle of inclusion and exclusion). (End)
In the sequence of rationals r(n)=eulerphi(n)/n: 1, 1/2, 2/3, 1/2, 4/5, 1/3, 6/7, 1/2, 2/3, 2/5, 10/11, 1/3, ... one can observe that new values are obtained for squarefree indices (A005117); while for a nonsquarefree number n (A013929), r(n) = r(A007947(n)), where A007947(n) is the squarefree kernel of n. - Michel Marcus, Jul 04 2015

Crossrefs

Cf. A076511 (numerator of cototient(n)/totient(n)), A051953.
Phi(m)/m = k: A000079 \ {1} (k=1/2), A033845 (k=1/3), A000244 \ {1} (k=2/3), A033846 (k=2/5), A000351 \ {1} (k=4/5), A033847 (k=3/7), A033850 (k=4/7), A000420 \ {1} (k=6/7), A033848 (k=5/11), A001020 \ {1} (k=10/11), A288162 (k=6/13), A001022 \ {1} (12/13), A143207 (k=4/15), A033849 (k=8/15), A033851 (k=24/35).

Programs

  • Magma
    [Numerator(EulerPhi(n)/n): n in [1..100]]; // Vincenzo Librandi, Jul 04 2015
  • Mathematica
    Table[Denominator[(n - EulerPhi[n])/EulerPhi[n]], {n, 80}] (* Alonso del Arte, May 12 2011 *)
  • PARI
    vector(80, n, numerator(eulerphi(n)/n)) \\ Michel Marcus, Jul 04 2015
    

Formula

a(n) = A000010(n)/A009195(n).

A003595 Numbers of the form 5^i*7^j with i, j >= 0.

Original entry on oeis.org

1, 5, 7, 25, 35, 49, 125, 175, 245, 343, 625, 875, 1225, 1715, 2401, 3125, 4375, 6125, 8575, 12005, 15625, 16807, 21875, 30625, 42875, 60025, 78125, 84035, 109375, 117649, 153125, 214375, 300125, 390625, 420175, 546875, 588245, 765625, 823543, 1071875, 1500625
Offset: 1

Views

Author

Keywords

Comments

Successive k such that phi(35*k) = 24*k: 35*a(n) = A033851(n). - Artur Jasinski, Nov 09 2008

Crossrefs

Programs

  • Haskell
    import Data.Set (singleton, deleteFindMin, insert)
    a003595 n = a003595_list !! (n-1)
    a003595_list = f $ singleton 1 where
       f s = y : f (insert (5 * y) $ insert (7 * y) s')
                   where (y, s') = deleteFindMin s
    -- Reinhard Zumkeller, May 16 2015
    
  • Magma
    [n: n in [1..600000] | PrimeDivisors(n) subset [5,7]]; // Bruno Berselli, Sep 24 2012
    
  • Mathematica
    a = {}; Do[If[EulerPhi[35 k] == 24 k, AppendTo[a, k]], {k, 1, 10000}]; a (* Artur Jasinski, Nov 09 2008 *)
    fQ[n_] := PowerMod[35, n, n] == 0; Select[Range[600000], fQ] (* Bruno Berselli, Sep 24 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*=5));vecsort(Vec(v)) \\ Charles R Greathouse IV, Jun 28 2011
    
  • Python
    from sympy import integer_log
    def A003595(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(integer_log(x//7**i,5)[0]+1 for i in range(integer_log(x,7)[0]+1))
        return bisection(f,n,n) # Chai Wah Wu, Sep 16 2024

Formula

Sum_{n>=1} 1/a(n) = (5*7)/((5-1)*(7-1)) = 35/24. - Amiram Eldar, Sep 22 2020
a(n) ~ exp(sqrt(2*log(5)*log(7)*n)) / sqrt(35). - Vaclav Kotesovec, Sep 22 2020
a(n) = 5^A025652(n) * 7^A025667(n). - R. J. Mathar, Jul 06 2025

A147571 Numbers with exactly 4 distinct prime divisors {2,3,5,7}.

Original entry on oeis.org

210, 420, 630, 840, 1050, 1260, 1470, 1680, 1890, 2100, 2520, 2940, 3150, 3360, 3780, 4200, 4410, 5040, 5250, 5670, 5880, 6300, 6720, 7350, 7560, 8400, 8820, 9450, 10080, 10290, 10500, 11340, 11760, 12600, 13230, 13440, 14700, 15120, 15750, 16800
Offset: 1

Views

Author

Artur Jasinski, Nov 07 2008

Keywords

Comments

Successive numbers k such that EulerPhi(x)/x = m:
( Family of sequences for successive n primes )
m=1/2 numbers with exactly 1 distinct prime divisor {2} see A000079
m=1/3 numbers with exactly 2 distinct prime divisors {2,3} see A033845
m=4/15 numbers with exactly 3 distinct prime divisors {2,3,5} see A143207
m=8/35 numbers with exactly 4 distinct prime divisors {2,3,5,7} see A147571
m=16/77 numbers with exactly 5 distinct prime divisors {2,3,5,7,11} see A147572
m=192/1001 numbers with exactly 6 distinct prime divisors {2,3,5,7,11,13} see A147573
m=3072/17017 numbers with exactly 7 distinct prime divisors {2,3,5,7,11,13,17} see A147574
m=55296/323323 numbers with exactly 8 distinct prime divisors {2,3,5,7,11,13,17,19} see A147575

Crossrefs

Programs

  • Magma
    [n: n in [1..2*10^4] | PrimeDivisors(n) eq [2,3,5,7]]; // Vincenzo Librandi, Sep 15 2015
    
  • Mathematica
    a = {}; Do[If[EulerPhi[x]/x == 8/35, AppendTo[a, x]], {x, 1, 100000}]; a
    Select[Range[20000],PrimeNu[#]==4&&Max[FactorInteger[#][[;;,1]]]<11&] (* Harvey P. Dale, Nov 05 2024 *)
  • PARI
    is(n)=n%210==0 && n==2^valuation(n,2) * 3^valuation(n,3) * 5^valuation(n,5) * 7^valuation(n,7) \\ Charles R Greathouse IV, Jun 19 2016

Formula

a(n) = 210 * A002473(n). - David A. Corneth, May 14 2019
Sum_{n>=1} 1/a(n) = 1/48. - Amiram Eldar, Nov 12 2020

A147576 Numbers with exactly 3 distinct odd prime divisors {3,5,7}.

Original entry on oeis.org

105, 315, 525, 735, 945, 1575, 2205, 2625, 2835, 3675, 4725, 5145, 6615, 7875, 8505, 11025, 13125, 14175, 15435, 18375, 19845, 23625, 25515, 25725, 33075, 36015, 39375, 42525, 46305, 55125, 59535, 65625, 70875, 76545, 77175, 91875, 99225
Offset: 1

Views

Author

Artur Jasinski, Nov 07 2008

Keywords

Comments

Numbers k such that phi(k)/k = m
( Family of sequences for successive n odd primes )
m=2/3 numbers with exactly 1 distinct prime divisor {3} see A000244
m=8/15 numbers with exactly 2 distinct prime divisors {3,5} see A033849
m=16/35 numbers with exactly 3 distinct prime divisors {3,5,7} see A147576
m=32/77 numbers with exactly 4 distinct prime divisors {3,5,7,11} see A147577
m=384/1001 numbers with exactly 5 distinct prime divisors {3,5,7,11,13} see A147578
m=6144/17017 numbers with exactly 6 distinct prime divisors {3,5,7,11,13,17} see A147579
m=3072/323323 numbers with exactly 7 distinct prime divisors {3,5,7,11,13,17,19} see A147580
m=110592/323323 numbers with exactly 8 distinct prime divisors {3,5,7,11,13,17,19,23} see A147581

Crossrefs

Programs

  • Mathematica
    a = {}; Do[If[EulerPhi[x]/x == 16/35, AppendTo[a, x]], {x, 1, 100000}]; a
    Select[Range[100000],EulerPhi[#]/#==16/35&] (* Harvey P. Dale, Dec 01 2013 *)

Formula

a(n) = 105 * A108347(n). - Amiram Eldar, Mar 10 2020
Sum_{n>=1} 1/a(n) = 1/48. - Amiram Eldar, Dec 22 2020
Showing 1-10 of 35 results. Next