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

A220262 Number of even semiprimes < 10^n. Number of terms of A100484 < 10^n.

Original entry on oeis.org

0, 3, 15, 95, 669, 5133, 41538, 348513, 3001134, 26355867, 234954223, 2119654578, 19308136142, 177291661649, 1638923764567, 15237833654620, 142377417196364, 1336094767763971, 12585956566571620, 118959989688273472, 1127779923790184543, 10720710117789005897
Offset: 0

Views

Author

Robert G. Wilson v, Dec 08 2012

Keywords

Comments

All such semiprimes have the form 2*p, where p is prime. - T. D. Noe, Dec 09 2012

Crossrefs

Programs

  • Mathematica
    Table[PrimePi[10^n/2], {n, 0, 14}]
  • PARI
    a(n)=primepi(10^n\2) \\ Charles R Greathouse IV, Sep 08 2015
    
  • Python
    from sympy import primepi
    def A220262(n): return primepi(10**n>>1) # Chai Wah Wu, Oct 17 2024

Formula

a(n) = A066265(n) - A085770(n) for n > 1.

Extensions

a(15)-a(20) from Hugo Pfoertner, Oct 14 2017
a(21) from Jinyuan Wang, Jul 30 2021

A114058 Start of record gap in even semiprimes (A100484).

Original entry on oeis.org

4, 6, 14, 46, 178, 226, 1046, 1774, 2258, 2654, 19102, 31366, 39218, 62794, 311842, 721306, 740522, 984226, 2699066, 2714402, 4021466, 9304706, 34103414, 41662646, 94653386, 244329494, 379391318, 383825566, 774192266
Offset: 1

Views

Author

Jonathan Vos Post, Feb 02 2006

Keywords

Comments

5 of the first 6 values of record gaps in even semiprimes are also record merits = (A100484(k+1)-A100484(k))/log_10(A100484(k)), namely: (6 - 4) / log_10(4) = 3.32192809; (10 - 6) / log_10(6) = 5.14038884; (22 - 14) / log_10(14) = 6.98002296; (58 - 46) / log_10(46) = 7.21692586; (254 - 226) / log_10(226) = 11.8940995. It is easy to prove that there are gaps of arbitrary length in even semiprimes (A100484), as 2*(n!+2), 2*(n!+3), 2*(n!+4), ..., 2*(n!+n) gives (n-1) consecutive even nonsemiprimes. Can we prove that there are gaps of arbitrary length in odd semiprimes (A046315) and in semiprimes (A001358)?
For every n, a(n) = 2*A002386(n). - John W. Nicholson, Jul 26 2012

Examples

			gap[a(1)] = A100484(2)-A100484(1) = 6 - 4 = 2.
gap[a(2)] = A100484(3)-A100484(2) = 10 - 6 = 4.
gap[a(3)] = A100484(5)-A100484(4) = 22 - 14 = 8.
gap[a(4)] = A100484(10)-A100484(9) = 58 - 46 = 12.
gap[a(5)] = A100484(25)-A100484(24) = 194 - 178 = 16.
gap[a(6)] = A100484(31)-A100484(30) = 254 - 226 = 28.
		

Crossrefs

Cf. A001358, A046315, A065516, A085809, A100484, A114412, A114021. Maximal gap small prime A002386.

Programs

  • Mathematica
    f[n_] := Block[{k = n + 2}, While[ Plus @@ Last /@ FactorInteger@k != 2, k += 2]; k]; lst = {}; d = 0; a = b = 4; Do[{a, b} = {b, f[a]}; If[b - a > d, d = b - a; AppendTo[lst, a]], {n, 10^8}]; lst (* Robert G. Wilson v *)

Formula

a(n) = A100484(k) such that A100484(k+1)-A100484(k) is a record.

Extensions

a(7)-a(25) from Robert G. Wilson v, Feb 03 2006
a(26)-a(31) from Donovan Johnson, Mar 14 2010

A001358 Semiprimes (or biprimes): products of two primes.

Original entry on oeis.org

4, 6, 9, 10, 14, 15, 21, 22, 25, 26, 33, 34, 35, 38, 39, 46, 49, 51, 55, 57, 58, 62, 65, 69, 74, 77, 82, 85, 86, 87, 91, 93, 94, 95, 106, 111, 115, 118, 119, 121, 122, 123, 129, 133, 134, 141, 142, 143, 145, 146, 155, 158, 159, 161, 166, 169, 177, 178, 183, 185, 187
Offset: 1

Views

Author

Keywords

Comments

Numbers of the form p*q where p and q are primes, not necessarily distinct.
These numbers are sometimes called semiprimes or 2-almost primes.
Numbers n such that Omega(n) = 2 where Omega(n) = A001222(n) is the sum of the exponents in the prime decomposition of n.
Complement of A100959; A064911(a(n)) = 1. - Reinhard Zumkeller, Nov 22 2004
The graph of this sequence appears to be a straight line with slope 4. However, the asymptotic formula shows that the linearity is an illusion and in fact a(n)/n ~ log(n)/log(log(n)) goes to infinity. See also the graph of A066265 = number of semiprimes < 10^n.
For numbers between 33 and 15495, semiprimes are more plentiful than any other k-almost prime. See A125149.
Numbers that are divisible by exactly 2 prime powers (not including 1). - Jason Kimberley, Oct 02 2011
The (disjoint) union of A006881 and A001248. - Jason Kimberley, Nov 11 2015
An equivalent definition of this sequence is a'(n) = smallest composite number which is not divided by any smaller composite number a'(1),...,a'(n-1). - Meir-Simchah Panzer, Jun 22 2016
The above characterization can be simplified to "Composite numbers not divisible by a smaller term." This shows that this is the equivalent of primes computed via Eratosthenes's sieve, but starting with the set of composite numbers (i.e., complement of 1 union primes) instead of all positive integers > 1. It's easy to see that iterating the method (using Eratosthenes's sieve each time on the remaining numbers, complement of the previously computed set) yields numbers with bigomega = k for k = 0, 1, 2, 3, ..., i.e., {1}, A000040, this, A014612, etc. - M. F. Hasler, Apr 24 2019
For all n except n = 2, a(n) is a deficient number. - Amrit Awasthi, Sep 10 2024
It is reasonable to assume that the "comforting numbers" which John T. Williams found in Chapter 3 of Milne's book "The House at Pooh Corner" are these semiprimes. Winnie-the-Pooh wonders whether he has 14 or 15 honey pots and concludes: "It's sort of comforting." To arrange a semiprime number of honey pots in a rectangular way, let's say on a shelf, with the larger divisor parallel to the wall, there is only one solution and this is for a simple mind like Winnie-the-Pooh comforting. - Ruediger Jehn, Dec 12 2024

Examples

			From _Gus Wiseman_, May 27 2021: (Start)
The sequence of terms together with their prime factors begins:
   4 = 2*2     46 = 2*23     91 = 7*13    141 = 3*47
   6 = 2*3     49 = 7*7      93 = 3*31    142 = 2*71
   9 = 3*3     51 = 3*17     94 = 2*47    143 = 11*13
  10 = 2*5     55 = 5*11     95 = 5*19    145 = 5*29
  14 = 2*7     57 = 3*19    106 = 2*53    146 = 2*73
  15 = 3*5     58 = 2*29    111 = 3*37    155 = 5*31
  21 = 3*7     62 = 2*31    115 = 5*23    158 = 2*79
  22 = 2*11    65 = 5*13    118 = 2*59    159 = 3*53
  25 = 5*5     69 = 3*23    119 = 7*17    161 = 7*23
  26 = 2*13    74 = 2*37    121 = 11*11   166 = 2*83
  33 = 3*11    77 = 7*11    122 = 2*61    169 = 13*13
  34 = 2*17    82 = 2*41    123 = 3*41    177 = 3*59
  35 = 5*7     85 = 5*17    129 = 3*43    178 = 2*89
  38 = 2*19    86 = 2*43    133 = 7*19    183 = 3*61
  39 = 3*13    87 = 3*29    134 = 2*67    185 = 5*37
(End)
		

References

  • Archimedeans Problems Drive, Eureka, 17 (1954), 8.
  • Raymond Ayoub, An Introduction to the Analytic Theory of Numbers, Amer. Math. Soc., 1963; Chapter II, Problem 60.
  • Edmund Landau, Handbuch der Lehre von der Verteilung der Primzahlen, Vol. 1, Teubner, Leipzig; third edition: Chelsea, New York (1974). See p. 211.
  • 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).
  • John T. Williams, Pooh and the Philosophers, Dutton Books, 1995.

Crossrefs

Cf. A064911 (characteristic function).
Cf. A048623, A048639, A000040 (primes), A014612 (products of 3 primes), A014613, A014614, A072000 ("pi" for semiprimes), A065516 (first differences).
Sequences listing r-almost primes, that is, the n such that A001222(n) = r: A000040 (r=1), this sequence (r=2), A014612 (r=3), A014613 (r=4), A014614 (r=5), A046306 (r=6), A046308 (r=7), A046310 (r=8), A046312 (r=9), A046314 (r=10), A069272 (r=11), A069273 (r=12), A069274 (r=13), A069275 (r=14), A069276 (r=15), A069277 (r=16), A069278 (r=17), A069279 (r=18), A069280 (r=19), A069281 (r=20).
These are the Heinz numbers of length-2 partitions, counted by A004526.
The squarefree case is A006881 with odd/even terms A046388/A100484 (except 4).
Including primes gives A037143.
The odd/even terms are A046315/A100484.
Partial sums are A062198.
The prime factors are A084126/A084127.
Grouping by greater factor gives A087112.
The product/sum/difference of prime indices is A087794/A176504/A176506.
Positions of even/odd terms are A115392/A289182.
The terms with relatively prime/divisible prime indices are A300912/A318990.
Factorizations using these terms are counted by A320655.
The prime indices are A338898/A338912/A338913.
Grouping by weight (sum of prime indices) gives A338904, with row sums A024697.
The terms with even/odd weight are A338906/A338907.
The terms with odd/even prime indices are A338910/A338911.
The least/greatest term of weight n is A339114/A339115.

Programs

  • Haskell
    a001358 n = a001358_list !! (n-1)
    a001358_list = filter ((== 2) . a001222) [1..]
    
  • Magma
    [n: n in [2..200] | &+[d[2]: d in Factorization(n)] eq 2]; // Bruno Berselli, Sep 09 2015
    
  • Maple
    A001358 := proc(n) option remember; local a; if n = 1 then 4; else for a from procname(n-1)+1 do if numtheory[bigomega](a) = 2 then return a; end if; end do: end if; end proc:
    seq(A001358(n), n=1..120) ; # R. J. Mathar, Aug 12 2010
  • Mathematica
    Select[Range[200], Plus@@Last/@FactorInteger[#] == 2 &] (* Zak Seidov, Jun 14 2005 *)
    Select[Range[200], PrimeOmega[#]==2&] (* Harvey P. Dale, Jul 17 2011 *)
  • PARI
    select( isA001358(n)={bigomega(n)==2}, [1..199]) \\ M. F. Hasler, Apr 09 2008; added select() Apr 24 2019
    
  • PARI
    list(lim)=my(v=List(),t);forprime(p=2, sqrt(lim), t=p;forprime(q=p, lim\t, listput(v,t*q))); vecsort(Vec(v)) \\ Charles R Greathouse IV, Sep 11 2011
    
  • PARI
    A1358=List(4); A001358(n)={while(#A1358M. F. Hasler, Apr 24 2019
    
  • Python
    from sympy import factorint
    def ok(n): return sum(factorint(n).values()) == 2
    print([k for k in range(1, 190) if ok(k)]) # Michael S. Branicky, Apr 30 2022
    
  • Python
    from math import isqrt
    from sympy import primepi, prime
    def A001358(n):
        def f(x): return int(n+x-sum(primepi(x//prime(k))-k+1 for k in range(1, primepi(isqrt(x))+1)))
        m, k = n, f(n)
        while m != k:
            m, k = k, f(k)
        return m # Chai Wah Wu, Jul 23 2024

Formula

a(n) ~ n*log(n)/log(log(n)) as n -> infinity [Landau, p. 211], [Ayoub].
Recurrence: a(1) = 4; for n > 1, a(n) = smallest composite number which is not a multiple of any of the previous terms. - Amarnath Murthy, Nov 10 2002
A174956(a(n)) = n. - Reinhard Zumkeller, Apr 03 2010
a(n) = A088707(n) - 1. - Reinhard Zumkeller, Feb 20 2012
Sum_{n>=1} 1/a(n)^s = (1/2)*(P(s)^2 + P(2*s)), where P is the prime zeta function. - Enrique Pérez Herrero, Jun 24 2012
sigma(a(n)) + phi(a(n)) - mu(a(n)) = 2*a(n) + 1. mu(a(n)) = ceiling(sqrt(a(n))) - floor(sqrt(a(n))). - Wesley Ivan Hurt, May 21 2013
mu(a(n)) = -Omega(a(n)) + omega(a(n)) + 1, where mu is the Moebius function (A008683), Omega is the count of prime factors with repetition, and omega is the count of distinct prime factors. - Alonso del Arte, May 09 2014
a(n) = A078840(2,n). - R. J. Mathar, Jan 30 2019
A100484 UNION A046315. - R. J. Mathar, Apr 19 2023
Conjecture: a(n)/n ~ (log(n)/log(log(n)))*(1-(M/log(log(n)))) as n -> oo, where M is the Mertens's constant (A077761). - Alain Rocchelli, Feb 02 2025

Extensions

More terms from James Sellers, Aug 22 2000

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

A215366 Triangle T(n,k) read by rows in which n-th row lists in increasing order all partitions lambda of n encoded as Product_{i in lambda} prime(i); n>=0, 1<=k<=A000041(n).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 8, 7, 9, 10, 12, 16, 11, 14, 15, 18, 20, 24, 32, 13, 21, 22, 25, 27, 28, 30, 36, 40, 48, 64, 17, 26, 33, 35, 42, 44, 45, 50, 54, 56, 60, 72, 80, 96, 128, 19, 34, 39, 49, 52, 55, 63, 66, 70, 75, 81, 84, 88, 90, 100, 108, 112, 120, 144, 160, 192, 256
Offset: 0

Views

Author

Alois P. Heinz, Aug 08 2012

Keywords

Comments

The concatenation of all rows (with offset 1) gives a permutation of the natural numbers A000027 with fixed points 1-6, 9, 10, 14, 15, 21, 22, 33, 49, 1095199, ... and inverse permutation A215501.
Number m is positioned in row n = A056239(m). The number of different values m, such that both m and m+1 occur in row n is A088850(n). A215369 lists all values m, such that both m and m+1 are in the same row.
The power prime(i)^j of the i-th prime is in row i*j for j in {0,1,2, ... }.
Column k=2 contains the even semiprimes A100484, where 10 and 22 are replaced by the odd semiprimes 9 and 21, respectively.
This triangle is related to the triangle A145518, see in both triangles the first column, the right border, the second right border and the row sums. - Omar E. Pol, May 18 2015

Examples

			The partitions of n=3 are {[3], [2,1], [1,1,1]}, encodings give {prime(3), prime(2)*prime(1), prime(1)^3} = {5, 3*2, 2^3} => row 3 = [5, 6, 8].
For n=0 the empty partition [] gives the empty product 1.
Triangle T(n,k) begins:
   1;
   2;
   3,  4;
   5,  6,  8;
   7,  9, 10, 12, 16;
  11, 14, 15, 18, 20, 24, 32;
  13, 21, 22, 25, 27, 28, 30, 36, 40, 48, 64;
  17, 26, 33, 35, 42, 44, 45, 50, 54, 56, 60, 72, 80, 96, 128;
  ...
Corresponding triangle of integer partitions begins:
  ();
  1;
  2, 11;
  3, 21, 111;
  4, 22, 31, 211, 1111;
  5, 41, 32, 221, 311, 2111, 11111;
  6, 42, 51, 33, 222, 411, 321, 2211, 3111, 21111, 111111;
  7, 61, 52, 43, 421, 511, 322, 331, 2221, 4111, 3211, 22111, 31111, 211111, 1111111;  - _Gus Wiseman_, Dec 12 2016
		

Crossrefs

Column k=1 gives: A008578(n+1).
Last elements of rows give: A000079.
Second to last elements of rows give: A007283(n-2) for n>1.
Row sums give: A145519.
Row lengths are: A000041.
Cf. A129129 (with row elements using order of A080577).
LCM of terms in row n gives A138534(n).
Cf. A112798, A246867 (the same for partitions into distinct parts).

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0 or i<2, [2^n],
           [seq(map(p->p*ithprime(i)^j, b(n-i*j, i-1))[], j=0..n/i)])
        end:
    T:= n-> sort(b(n, n))[]:
    seq(T(n), n=0..10);
    # (2nd Maple program)
    with(combinat): A := proc (n) local P, A, i: P := partition(n): A := {}; for i to nops(P) do A := `union`(A, {mul(ithprime(P[i][j]), j = 1 .. nops(P[i]))}) end do: A end proc; # the command A(m) yields row m. # Emeric Deutsch, Jan 23 2016
    # (3rd Maple program)
    q:= 7: S[0] := {1}: for m to q do S[m] := `union`(seq(map(proc (f) options operator, arrow: ithprime(j)*f end proc, S[m-j]), j = 1 .. m)) end do; # for a given positive integer q, the program yields rows 0, 1, 2,...,q. # Emeric Deutsch, Jan 23 2016
  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0 || i<2, {2^n}, Table[Function[#*Prime[i]^j] /@ b[n - i*j, i-1], {j, 0, n/i}] // Flatten]; T[n_] := Sort[b[n, n]]; Table[T[n], {n, 0, 10}] // Flatten (* Jean-François Alcover, Mar 12 2015, after Alois P. Heinz *)
    nn=7;HeinzPartition[n_]:=If[n===1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]//Reverse];
    Take[GatherBy[Range[2^nn],Composition[Total,HeinzPartition]],nn+1] (* Gus Wiseman, Dec 12 2016 *)
    Table[Map[Times @@ Prime@ # &, IntegerPartitions[n]], {n, 0, 8}] // Flatten (* Michael De Vlieger, Jul 12 2017 *)
  • PARI
    \\ From M. F. Hasler, Dec 06 2016 (Start)
    A215366_row(n)=vecsort([vecprod([prime(p)|p<-P])|P<-partitions(n)]) \\ bug fix & syntax update by M. F. Hasler, Oct 20 2023
    A215366_vec(N)=concat(apply(A215366_row,[0..N])) \\ "flattened" rows 0..N (End)

Formula

Recurrence relation, explained for the set S(4) of entries in row 4: multiply the entries of S(3) by 2 (= 1st prime), multiply the entries of S(2) by 3 (= 2nd prime), multiply the entries of S(1) by 5 (= 3rd prime), multiply the entries of S(0) by 7 (= 4th prime); take the union of all the obtained products. The 3rd Maple program is based on this recurrence relation. - Emeric Deutsch, Jan 23 2016

A262626 Visible parts of the perspective view of the stepped pyramid whose structure essentially arises after the 90-degree-zig-zag folding of the isosceles triangle A237593.

Original entry on oeis.org

1, 1, 1, 3, 2, 2, 2, 2, 2, 1, 1, 2, 7, 3, 1, 1, 3, 3, 3, 3, 2, 2, 3, 12, 4, 1, 1, 1, 1, 4, 4, 4, 4, 2, 1, 1, 2, 4, 15, 5, 2, 1, 1, 2, 5, 5, 3, 5, 5, 2, 2, 2, 2, 5, 9, 9, 6, 2, 1, 1, 1, 1, 2, 6, 6, 6, 6, 3, 1, 1, 1, 1, 3, 6, 28, 7, 2, 2, 1, 1, 2, 2, 7, 7, 7, 7, 3, 2, 1, 1, 2, 3, 7, 12, 12, 8, 3, 1, 2, 2, 1, 3, 8, 8, 8, 8, 8, 3, 2, 1, 1
Offset: 1

Views

Author

Omar E. Pol, Sep 26 2015

Keywords

Comments

Also the rows of both triangles A237270 and A237593 interleaved.
Also, irregular triangle read by rows in which T(n,k) is the area of the k-th region (from left to right in ascending diagonal) of the n-th symmetric set of regions (from the top to the bottom in descending diagonal) in the two-dimensional diagram of the perspective view of the infinite stepped pyramid described in A245092 (see the diagram in the Links section).
The diagram of the symmetric representation of sigma is also the top view of the pyramid, see Links section. For more information about the diagram see also A237593 and A237270.
The number of cubes at the n-th level is also A024916(n), the sum of all divisors of all positive integers <= n.
Note that this pyramid is also a quarter of the pyramid described in A244050. Both pyramids have infinitely many levels.
Odd-indexed rows are also the rows of the irregular triangle A237270.
Even-indexed rows are also the rows of the triangle A237593.
Lengths of the odd-indexed rows are in A237271.
Lengths of the even-indexed rows give 2*A003056.
Row sums of the odd-indexed rows gives A000203, the sum of divisors function.
Row sums of the even-indexed rows give the positive even numbers (see A005843).
Row sums give A245092.
From the front view of the stepped pyramid emerges a geometric pattern which is related to A001227, the number of odd divisors of the positive integers.
The connection with the odd divisors of the positive integers is as follows: A261697 --> A261699 --> A237048 --> A235791 --> A237591 --> A237593 --> A237270 --> this sequence.

Examples

			Irregular triangle begins:
  1;
  1, 1;
  3;
  2, 2;
  2, 2;
  2, 1, 1, 2;
  7;
  3, 1, 1, 3;
  3, 3;
  3, 2, 2, 3;
  12;
  4, 1, 1, 1, 1, 4;
  4, 4;
  4, 2, 1, 1, 2, 4;
  15;
  5, 2, 1, 1, 2, 5;
  5, 3, 5;
  5, 2, 2, 2, 2, 5;
  9, 9;
  6, 2, 1, 1, 1, 1, 2, 6;
  6, 6;
  6, 3, 1, 1, 1, 1, 3, 6;
  28;
  7, 2, 2, 1, 1, 2, 2, 7;
  7, 7;
  7, 3, 2, 1, 1, 2, 3, 7;
  12, 12;
  8, 3, 1, 2, 2, 1, 3, 8;
  8, 8, 8;
  8, 3, 2, 1, 1, 1, 1, 2, 3, 8;
  31;
  9, 3, 2, 1, 1, 1, 1, 2, 3, 9;
  ...
Illustration of the odd-indexed rows of triangle as the diagram of the symmetric representation of sigma which is also the top view of the stepped pyramid:
.
   n  A000203    A237270    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
   1     1   =      1      |_| | | | | | | | | | | | | | | |
   2     3   =      3      |_ _|_| | | | | | | | | | | | | |
   3     4   =    2 + 2    |_ _|  _|_| | | | | | | | | | | |
   4     7   =      7      |_ _ _|    _|_| | | | | | | | | |
   5     6   =    3 + 3    |_ _ _|  _|  _ _|_| | | | | | | |
   6    12   =     12      |_ _ _ _|  _| |  _ _|_| | | | | |
   7     8   =    4 + 4    |_ _ _ _| |_ _|_|    _ _|_| | | |
   8    15   =     15      |_ _ _ _ _|  _|     |  _ _ _|_| |
   9    13   =  5 + 3 + 5  |_ _ _ _ _| |      _|_| |  _ _ _|
  10    18   =    9 + 9    |_ _ _ _ _ _|  _ _|    _| |
  11    12   =    6 + 6    |_ _ _ _ _ _| |  _|  _|  _|
  12    28   =     28      |_ _ _ _ _ _ _| |_ _|  _|
  13    14   =    7 + 7    |_ _ _ _ _ _ _| |  _ _|
  14    24   =   12 + 12   |_ _ _ _ _ _ _ _| |
  15    24   =  8 + 8 + 8  |_ _ _ _ _ _ _ _| |
  16    31   =     31      |_ _ _ _ _ _ _ _ _|
  ...
The above diagram arises from a simpler diagram as shown below.
Illustration of the even-indexed rows of triangle as the diagram of the deployed front view of the corner of the stepped pyramid:
.
.                                 A237593
Level                               _ _
1                                 _|1|1|_
2                               _|2 _|_ 2|_
3                             _|2  |1|1|  2|_
4                           _|3   _|1|1|_   3|_
5                         _|3    |2 _|_ 2|    3|_
6                       _|4     _|1|1|1|1|_     4|_
7                     _|4      |2  |1|1|  2|      4|_
8                   _|5       _|2 _|1|1|_ 2|_       5|_
9                 _|5        |2  |2 _|_ 2|  2|        5|_
10              _|6         _|2  |1|1|1|1|  2|_         6|_
11            _|6          |3   _|1|1|1|1|_   3|          6|_
12          _|7           _|2  |2  |1|1|  2|  2|_           7|_
13        _|7            |3    |2 _|1|1|_ 2|    3|            7|_
14      _|8             _|3   _|1|2 _|_ 2|1|_   3|_             8|_
15    _|8              |3    |2  |1|1|1|1|  2|    3|              8|_
16   |9                |3    |2  |1|1|1|1|  2|    3|                9|
...
The number of horizontal line segments in the n-th level in each side of the diagram equals A001227(n), the number of odd divisors of n.
The number of horizontal line segments in the left side of the diagram plus the number of the horizontal line segment in the right side equals A054844(n).
The total number of vertical line segments in the n-th level of the diagram equals A131507(n).
The diagram represents the first 16 levels of the pyramid.
The diagram of the isosceles triangle and the diagram of the top view of the pyramid shows the connection between the partitions into consecutive parts and the sum of divisors function (see also A286000 and A286001). - _Omar E. Pol_, Aug 28 2018
The connection between the isosceles triangle and the stepped pyramid is due to the fact that this object can also be interpreted as a pop-up card. - _Omar E. Pol_, Nov 09 2022
		

Crossrefs

Famous sequences that are visible in the stepped pyramid:
Cf. A000040 (prime numbers)......., for the characteristic shape see A346871.
Cf. A000079 (powers of 2)........., for the characteristic shape see A346872.
Cf. A000203 (sum of divisors)....., total area of the terraces in the n-th level.
Cf. A000217 (triangular numbers).., for the characteristic shape see A346873.
Cf. A000225 (Mersenne numbers)...., for a visualization see A346874.
Cf. A000384 (hexagonal numbers)..., for the characteristic shape see A346875.
Cf. A000396 (perfect numbers)....., for the characteristic shape see A346876.
Cf. A000668 (Mersenne primes)....., for a visualization see A346876.
Cf. A001097 (twin primes)........., for a visualization see A346871.
Cf. A001227 (# of odd divisors)..., number of subparts in the n-th level.
Cf. A002378 (oblong numbers)......, for a visualization see A346873.
Cf. A008586 (multiples of 4)......, perimeters of the successive levels.
Cf. A008588 (multiples of 6)......, for the characteristic shape see A224613.
Cf. A013661 (zeta(2))............., (area of the horizontal faces)/(n^2), n -> oo.
Cf. A014105 (second hexagonals)..., for the characteristic shape see A346864.
Cf. A067742 (# of middle divisors), # cells in the main diagonal in n-th level.
Apart from zeta(2) other constants that are related to the stepped pyramid are A072691, A353908, A354238.

A035363 Number of partitions of n into even parts.

Original entry on oeis.org

1, 0, 1, 0, 2, 0, 3, 0, 5, 0, 7, 0, 11, 0, 15, 0, 22, 0, 30, 0, 42, 0, 56, 0, 77, 0, 101, 0, 135, 0, 176, 0, 231, 0, 297, 0, 385, 0, 490, 0, 627, 0, 792, 0, 1002, 0, 1255, 0, 1575, 0, 1958, 0, 2436, 0, 3010, 0, 3718, 0, 4565, 0, 5604, 0, 6842, 0, 8349, 0, 10143, 0, 12310, 0
Offset: 0

Views

Author

Keywords

Comments

Convolved with A036469 = A000070. - Gary W. Adamson, Jun 09 2009
Note that these partitions are located in the head of the last section of the set of partitions of n (see A135010). - Omar E. Pol, Nov 20 2009
Number of symmetric unimodal compositions of n+2 where the maximal part appears twice, see example. Also number of symmetric unimodal compositions of n where the maximal part appears an even number of times. - Joerg Arndt, Jun 11 2013
Number of partitions of n having parts of even multiplicity. These are the conjugates of the partitions from the definition. Example: a(8)=5 because we have [4,4],[3,3,1,1],[2,2,2,2],[2,2,1,1,1,1], and [1,1,1,1,1,1,1,1]. - Emeric Deutsch, Jan 27 2016
From Gus Wiseman, May 22 2021: (Start)
The Heinz numbers of the conjugate partitions described in Emeric Deutsch's comment above are given by A000290.
For n > 1, also the number of integer partitions of n-1 whose only odd part is the smallest. The Heinz numbers of these partitions are given by A341446. For example, the a(2) = 1 through a(14) = 15 partitions (empty columns shown as dots, A..D = 10..13) are:
1 . 3 . 5 . 7 . 9 . B . D
21 41 43 63 65 85
221 61 81 83 A3
421 441 A1 C1
2221 621 443 643
4221 641 661
22221 821 841
4421 A21
6221 4441
42221 6421
222221 8221
44221
62221
422221
2222221
Also the number of integer partitions of n whose greatest part is the sum of all the other parts. The Heinz numbers of these partitions are given by A344415. For example, the a(2) = 1 through a(12) = 11 partitions (empty columns not shown) are:
(11) (22) (33) (44) (55) (66)
(211) (321) (422) (532) (633)
(3111) (431) (541) (642)
(4211) (5221) (651)
(41111) (5311) (6222)
(52111) (6321)
(511111) (6411)
(62211)
(63111)
(621111)
(6111111)
Also the number of integer partitions of n of length n/2. The Heinz numbers of these partitions are given by A340387. For example, the a(2) = 1 through a(14) = 15 partitions (empty columns not shown) are:
(2) (22) (222) (2222) (22222) (222222) (2222222)
(31) (321) (3221) (32221) (322221) (3222221)
(411) (3311) (33211) (332211) (3322211)
(4211) (42211) (333111) (3332111)
(5111) (43111) (422211) (4222211)
(52111) (432111) (4322111)
(61111) (441111) (4331111)
(522111) (4421111)
(531111) (5222111)
(621111) (5321111)
(711111) (5411111)
(6221111)
(6311111)
(7211111)
(8111111)
(End)

Examples

			From _Joerg Arndt_, Jun 11 2013: (Start)
There are a(12)=11 symmetric unimodal compositions of 12+2=14 where the maximal part appears twice:
01:  [ 1 1 1 1 1 2 2 1 1 1 1 1 ]
02:  [ 1 1 1 1 3 3 1 1 1 1 ]
03:  [ 1 1 1 4 4 1 1 1 ]
04:  [ 1 1 2 3 3 2 1 1 ]
05:  [ 1 1 5 5 1 1 ]
06:  [ 1 2 4 4 2 1 ]
07:  [ 1 6 6 1 ]
08:  [ 2 2 3 3 2 2 ]
09:  [ 2 5 5 2 ]
10:  [ 3 4 4 3 ]
11:  [ 7 7 ]
There are a(14)=15 symmetric unimodal compositions of 14 where the maximal part appears an even number of times:
01:  [ 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ]
02:  [ 1 1 1 1 1 2 2 1 1 1 1 1 ]
03:  [ 1 1 1 1 3 3 1 1 1 1 ]
04:  [ 1 1 1 2 2 2 2 1 1 1 ]
05:  [ 1 1 1 4 4 1 1 1 ]
06:  [ 1 1 2 3 3 2 1 1 ]
07:  [ 1 1 5 5 1 1 ]
08:  [ 1 2 2 2 2 2 2 1 ]
09:  [ 1 2 4 4 2 1 ]
10:  [ 1 3 3 3 3 1 ]
11:  [ 1 6 6 1 ]
12:  [ 2 2 3 3 2 2 ]
13:  [ 2 5 5 2 ]
14:  [ 3 4 4 3 ]
15:  [ 7 7 ]
(End)
a(8)=5 because we  have [8], [6,2], [4,4], [4,2,2], and [2,2,2,2]. - _Emeric Deutsch_, Jan 27 2016
From _Gus Wiseman_, May 22 2021: (Start)
The a(0) = 1 through a(12) = 11 partitions into even parts are the following (empty columns shown as dots, A = 10, C = 12). The Heinz numbers of these partitions are given by A066207.
  ()  .  (2)  .  (4)   .  (6)    .  (8)     .  (A)      .  (C)
                 (22)     (42)      (44)       (64)        (66)
                          (222)     (62)       (82)        (84)
                                    (422)      (442)       (A2)
                                    (2222)     (622)       (444)
                                               (4222)      (642)
                                               (22222)     (822)
                                                           (4422)
                                                           (6222)
                                                           (42222)
                                                           (222222)
(End)
		

References

  • Mohammad K. Azarian, A Generalization of the Climbing Stairs Problem, Mathematics and Computer Education, Vol. 31, No. 1, pp. 24-28, Winter 1997. MathEduc Database (Zentralblatt MATH, 1997c.01891).
  • Mohammad K. Azarian, A Generalization of the Climbing Stairs Problem II, Missouri Journal of Mathematical Sciences, Vol. 16, No. 1, Winter 2004, pp. 12-17. Zentralblatt MATH, Zbl 1071.05501.

Crossrefs

Bisection (even part) gives the partition numbers A000041.
Column k=0 of A103919, A264398.
Note: A-numbers of ranking sequences are in parentheses below.
The version for odd instead of even parts is A000009 (A066208).
The version for parts divisible by 3 instead of 2 is A035377.
The strict case is A035457.
The Heinz numbers of these partitions are given by A066207.
The ordered version (compositions) is A077957 prepended by (1,0).
This is column k = 2 of A168021.
The multiplicative version (factorizations) is A340785.
A000569 counts graphical partitions (A320922).
A004526 counts partitions of length 2 (A001358).
A025065 counts palindromic partitions (A265640).
A027187 counts partitions with even length/maximum (A028260/A244990).
A058696 counts partitions of even numbers (A300061).
A067661 counts strict partitions of even length (A030229).
A236913 counts partitions of even length and sum (A340784).
A340601 counts partitions of even rank (A340602).
The following count partitions of even length:
- A096373 cannot be partitioned into strict pairs (A320891).
- A338914 can be partitioned into strict pairs (A320911).
- A338915 cannot be partitioned into distinct pairs (A320892).
- A338916 can be partitioned into distinct pairs (A320912).
- A339559 cannot be partitioned into distinct strict pairs (A320894).
- A339560 can be partitioned into distinct strict pairs (A339561).

Programs

  • Maple
    ZL:= [S, {C = Cycle(B), S = Set(C), E = Set(B), B = Prod(Z,Z)}, unlabelled]: seq(combstruct[count](ZL, size=n), n=0..69); # Zerinvary Lajos, Mar 26 2008
    g := 1/mul(1-x^(2*k), k = 1 .. 100): gser := series(g, x = 0, 80): seq(coeff(gser, x, n), n = 0 .. 78); # Emeric Deutsch, Jan 27 2016
    # Using the function EULER from Transforms (see link at the bottom of the page).
    [1,op(EULER([0,1,seq(irem(n,2),n=0..66)]))]; # Peter Luschny, Aug 19 2020
    # next Maple program:
    a:= n-> `if`(n::odd, 0, combinat[numbpart](n/2)):
    seq(a(n), n=0..84);  # Alois P. Heinz, Jun 22 2021
  • Mathematica
    nmax = 50; s = Range[2, nmax, 2];
    Table[Count[IntegerPartitions@n, x_ /; SubsetQ[s, x]], {n, 0, nmax}] (* Robert Price, Aug 05 2020 *)
  • Python
    from sympy import npartitions
    def A035363(n): return 0 if n&1 else npartitions(n>>1) # Chai Wah Wu, Sep 23 2023

Formula

G.f.: Product_{k even} 1/(1 - x^k).
Convolution with the number of partitions into distinct parts (A000009, which is also number of partitions into odd parts) gives the number of partitions (A000041). - Franklin T. Adams-Watters, Jan 06 2006
If n is even then a(n)=A000041(n/2) otherwise a(n)=0. - Omar E. Pol, Nov 20 2009
G.f.: 1 + x^2*(1 - G(0))/(1-x^2) where G(k) = 1 - 1/(1-x^(2*k+2))/(1-x^2/(x^2-1/G(k+1) )); (recursively defined continued fraction). - Sergei N. Gladkovskii, Jan 23 2013
a(n) = A096441(n) - A000009(n), n >= 1. - Omar E. Pol, Aug 16 2013
G.f.: exp(Sum_{k>=1} x^(2*k)/(k*(1 - x^(2*k)))). - Ilya Gutkovskiy, Aug 13 2018

A018818 Number of partitions of n into divisors of n.

Original entry on oeis.org

1, 2, 2, 4, 2, 8, 2, 10, 5, 11, 2, 45, 2, 14, 14, 36, 2, 81, 2, 92, 18, 20, 2, 458, 7, 23, 23, 156, 2, 742, 2, 202, 26, 29, 26, 2234, 2, 32, 30, 1370, 2, 1654, 2, 337, 286, 38, 2, 9676, 9, 407, 38, 454, 2, 3132, 38, 3065, 42, 47, 2, 73155, 2, 50, 493, 1828, 44, 5257, 2, 740, 50, 5066
Offset: 1

Views

Author

Keywords

Comments

From Reinhard Zumkeller, Dec 11 2009: (Start)
For odd primes p: a(p^2) = p + 2; for n > 1: a(A001248(n)) = A052147(n);
For odd primes p > 3, a(3*p) = 2*p + 4; for n > 2: a(A001748(n)) = A100484(n) + 4. (End)
From Matthew Crawford, Jan 19 2021: (Start)
For a prime p, a(p^3) = (p^3 + p^2 + 2*p + 4)/2;
For distinct primes p and q, a(p*q) = (p+1)*(q+1)/2 + 2. (End)

Examples

			The a(6) = 8 representations of 6 are 6 = 3 + 3 = 3 + 2 + 1 = 3 + 1 + 1 + 1 = 2 + 2 + 2 = 2 + 2 + 1 + 1 = 2 + 1 + 1 + 1 + 1 = 1 + 1 + 1 + 1 + 1 + 1.
		

Crossrefs

Programs

  • Haskell
    a018818 n = p (init $ a027750_row n) n + 1 where
       p _      0 = 1
       p []     _ = 0
       p ks'@(k:ks) m | m < k     = 0
                      | otherwise = p ks' (m - k) + p ks m
    -- Reinhard Zumkeller, Apr 02 2012
    
  • Magma
    [#RestrictedPartitions(n,{d:d in Divisors(n)}): n in [1..100]]; // Marius A. Burtea, Jan 02 2019
  • Maple
    A018818 := proc(n)
        local a,p,w,el ;
        a := 0 ;
        for p in combinat[partition](n) do
            w := true ;
            for el in p do
                if modp(n,el) <> 0 then
                    w := false;
                    break;
                end if;
            end do:
            if w then
                a := a+1 ;
            end if;
        end do:
        a ;
    end proc: # R. J. Mathar, Mar 30 2017
  • Mathematica
    Table[d = Divisors[n]; Coefficient[Series[1/Product[1 - x^d[[i]], {i, Length[d]}], {x, 0, n}], x, n], {n, 100}] (* T. D. Noe, Jul 28 2011 *)
  • PARI
    a(n)=numbpartUsing(n, divisors(n));
    numbpartUsing(n, v, mx=#v)=if(n<1, return(n==0)); sum(i=1,mx, numbpartUsing(n-v[i],v,i)) \\ inefficient; Charles R Greathouse IV, Jun 21 2017
    
  • PARI
    A018818(n) = { my(p = Ser(1, 'x, 1+n)); fordiv(n, d, p /= (1 - 'x^d)); polcoef(p, n); }; \\ Antti Karttunen, Jan 23 2025, after Vladeta Jovovic
    

Formula

Coefficient of x^n in the expansion of 1/Product_{d|n} (1-x^d). - Vladeta Jovovic, Sep 28 2002
a(n) = 2 iff n is prime. - Juhani Heino, Aug 27 2009
a(n) = f(n,n,1), where f(n,m,k) = f(n,m,k+1) + f(n,m-k,k)*0^(n mod k) if k <= m, otherwise 0^m. - Reinhard Zumkeller, Dec 11 2009
Paul Erdős, Andrew M. Odlyzko, and the Editors of the AMM give bounds; see Bowman et al. - Charles R Greathouse IV, Dec 04 2012

A243055 Difference between the indices of the smallest and the largest prime dividing n: If n = p_i * ... * p_k, where p_i <= ... <= p_k, where p_h = A000040(h), then a(n) = (k-i), a(1) = 0 by convention.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 1, 0, 3, 1, 0, 0, 1, 0, 2, 2, 4, 0, 1, 0, 5, 0, 3, 0, 2, 0, 0, 3, 6, 1, 1, 0, 7, 4, 2, 0, 3, 0, 4, 1, 8, 0, 1, 0, 2, 5, 5, 0, 1, 2, 3, 6, 9, 0, 2, 0, 10, 2, 0, 3, 4, 0, 6, 7, 3, 0, 1, 0, 11, 1, 7, 1, 5, 0, 2, 0, 12, 0, 3, 4, 13, 8, 4, 0, 2
Offset: 1

Views

Author

Antti Karttunen, May 31 2014

Keywords

Comments

For n>=1, A100484(n+1) gives the position where n occurs for the first time (setting also the records for the sequence).
a(n) = the difference between the largest and the smallest parts of the partition having Heinz number n. We define the Heinz number of a partition p = [p_1, p_2, ..., p_r] as Product(p_j-th prime, j=1...r) (concept used by Alois P. Heinz in A215366 as an "encoding" of a partition). For example, for the partition [1, 1, 2, 4, 10] we get 2*2*3*7*29 = 2436. Example: a(57) = 6; indeed, the partition having Heinz number 57 = 3*19 is [2, 8]. - Emeric Deutsch, Jun 04 2015

Crossrefs

Differs from A242411 for the first time at n=30.
A000961 gives the positions of zeros.

Programs

  • Maple
    with(numtheory):
    a:= n-> `if`(n=1, 0, (f-> pi(max(f[]))-pi(min(f[])))(factorset(n))):
    seq(a(n), n=1..100);  # Alois P. Heinz, Jun 04 2015
  • Mathematica
    a[1]=0; a[n_] := Function[{f}, PrimePi[Max[f]] - PrimePi[Min[f]]][FactorInteger[n][[All, 1]]]; Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Jul 29 2015, after Alois P. Heinz *)
  • Python
    from sympy import primepi, primefactors
    def A243055(n): return primepi(max(p:=primefactors(n),default=0))-primepi(min(p,default=0)) # Chai Wah Wu, Oct 10 2023
  • Scheme
    (define (A243055 n) (- (A061395 n) (A055396 n)))
    

Formula

If n = p_i * ... * p_k, where p_i <= ... <= p_k are not necessarily distinct primes (sorted into nondescending order) in the prime factorization of n, where p_i = A000040(i), then a(n) = (k-i).
a(n) = A061395(n) - A055396(n).

A030229 Numbers that are the product of an even number of distinct primes.

Original entry on oeis.org

1, 6, 10, 14, 15, 21, 22, 26, 33, 34, 35, 38, 39, 46, 51, 55, 57, 58, 62, 65, 69, 74, 77, 82, 85, 86, 87, 91, 93, 94, 95, 106, 111, 115, 118, 119, 122, 123, 129, 133, 134, 141, 142, 143, 145, 146, 155, 158, 159, 161, 166, 177, 178, 183, 185, 187, 194, 201, 202, 203, 205, 206, 209, 210, 213, 214
Offset: 1

Views

Author

Keywords

Comments

These are the positive integers k with moebius(k) = 1 (cf. A008683). - N. J. A. Sloane, May 18 2021
From Enrique Pérez Herrero, Jul 06 2012: (Start)
This sequence and A030059 form a partition of the squarefree numbers set: A005117.
Also solutions to equation mu(n)=1.
Sum_{n>=1} 1/a(n)^s = (Zeta(s)^2 + Zeta(2*s))/(2*Zeta(s)*Zeta(2*s)).
(End)
A008683(a(n)) = 1; a(A220969(n)) mod 2 = 0; a(A220968(n)) mod 2 = 1. - Reinhard Zumkeller, Dec 27 2012
Characteristic function for values of a(n) = (mu(n)+1)! - 1, where mu(n) is the Mobius function (A008683). - Wesley Ivan Hurt, Oct 11 2013
Conjecture: For the matrix M(i,j) = 1 if j|i and 0 otherwise, Inverse(M)(a,1) = -1, for any a in this sequence. - Benedict W. J. Irwin, Jul 26 2016
Solutions to the equation Sum_{d|n} mu(d)*d = Sum_{d|n} mu(n/d)*d. - Torlach Rush, Jan 13 2018
Solutions to the equation Sum_{d|n} mu(d)*sigma(d) = n, where sigma(n) is the sum of divisors function (A000203). - Robert D. Rosales, May 20 2024
From Peter Munn, Oct 04 2019: (Start)
Numbers n such that omega(n) = bigomega(n) = 2*k for some integer k.
The squarefree numbers in A000379.
The squarefree numbers in A028260.
This sequence is closed with respect to the commutative binary operation A059897(.,.), thus it forms a subgroup of the positive integers under A059897(.,.). A006094 lists a minimal set of generators for this subgroup. The lexicographically earliest ordered minimal set of generators is A100484 with its initial 4 removed.
(End)
The asymptotic density of this sequence is 3/Pi^2 (cf. A104141). - Amiram Eldar, May 22 2020

Examples

			(empty product), 2*3, 2*5, 2*7, 3*5, 3*7, 2*11, 2*13, 3*11, 2*17, 5*7, 2*19, 3*13, 2*23,...
		

References

  • B. C. Berndt and R. A. Rankin, Ramanujan: Letters and Commentary, see p. 23; AMS Providence RI 1995
  • S. Ramanujan, Collected Papers, pp. xxiv, 21.

Crossrefs

Programs

  • Haskell
    import Data.List (elemIndices)
    a030229 n = a030229_list !! (n-1)
    a030229_list = map (+ 1) $ elemIndices 1 a008683_list
    -- Reinhard Zumkeller, Dec 27 2012
    
  • Maple
    a := n -> `if`(numtheory[mobius](n)=1,n,NULL); seq(a(i),i=1..214); # Peter Luschny, May 04 2009
    with(numtheory); t := [ ]: f := [ ]: for n from 1 to 250 do if mobius(n) = 1 then t := [ op(t), n ] else f := [ op(f), n ]; fi; od: t; # Wesley Ivan Hurt, Oct 11 2013
    # alternative
    A030229 := proc(n)
        option remember;
        local a;
        if n = 1 then
            1;
        else
            for a from procname(n-1)+1 do
                if numtheory[mobius](a) = 1 then
                    return a;
                end if;
            end do:
        end if;
    end proc:
    seq(A030229(n),n=1..40) ; # R. J. Mathar, Sep 22 2020
  • Mathematica
    Select[Range[214], MoebiusMu[#] == 1 &] (* Jean-François Alcover, Oct 04 2011 *)
  • PARI
    isA030229(n)= #(n=factor(n)[,2]) % 2 == 0 && (!n || vecmax(n)==1 )
    
  • PARI
    is(n)=moebius(n)==1 \\ Charles R Greathouse IV, Jan 31 2017
    for(n=1,500, isA030229(n)&print1(n",")) \\ M. F. Hasler
    
  • Python
    from math import isqrt, prod
    from sympy import primerange, integer_nthroot, primepi
    def A030229(n):
        def g(x,a,b,c,m): yield from (((d,) for d in enumerate(primerange(b+1,isqrt(x//c)+1),a+1)) if m==2 else (((a2,b2),)+d for a2,b2 in enumerate(primerange(b+1,integer_nthroot(x//c,m)[0]+1),a+1) for d in g(x,a2,b2,c*b2,m-1)))
        def f(x): return int(n-1+x-sum(sum(primepi(x//prod(c[1] for c in a))-a[-1][0] for a in g(x,0,1,1,i)) for i in range(2,x.bit_length(),2)))
        kmin, kmax = 0,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 # Chai Wah Wu, Aug 29 2024

Formula

a(n) < n*Pi^2/3 infinitely often; a(n) > n*Pi^2/3 infinitely often. - Charles R Greathouse IV, Oct 04 2011; corrected Sep 07 2017
{a(n)} = {m : m = A059897(A030059(k), p), k >= 1} for prime p, where {a(n)} denotes the set of integers in the sequence. - Peter Munn, Oct 04 2019
Showing 1-10 of 206 results. Next