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

A000961 Powers of primes. Alternatively, 1 and the prime powers (p^k, p prime, k >= 1).

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 8, 9, 11, 13, 16, 17, 19, 23, 25, 27, 29, 31, 32, 37, 41, 43, 47, 49, 53, 59, 61, 64, 67, 71, 73, 79, 81, 83, 89, 97, 101, 103, 107, 109, 113, 121, 125, 127, 128, 131, 137, 139, 149, 151, 157, 163, 167, 169, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227
Offset: 1

Views

Author

Keywords

Comments

The term "prime power" is ambiguous. To a mathematician it means any number p^k, p prime, k >= 0, including p^0 = 1.
Any nonzero integer is a product of primes and units, where the units are +1 and -1. This is tied to the Fundamental Theorem of Arithmetic which proves that the factorizations are unique up to order and units. (So, since 1 = p^0 does not have a well defined prime base p, it is sometimes not regarded as a prime power. See A246655 for the sequence without 1.)
These numbers are (apart from 1) the numbers of elements in finite fields. - Franz Vrabec, Aug 11 2004
Numbers whose divisors form a geometrical progression. The divisors of p^k are 1, p, p^2, p^3, ..., p^k. - Amarnath Murthy, Jan 09 2002
These are also precisely the orders of those finite affine planes that are known to exist as of today. (The order of a finite affine plane is the number of points in an arbitrarily chosen line of that plane. This number is unique for all lines comprise the same number of points.) - Peter C. Heinig (algorithms(AT)gmx.de), Aug 09 2006
Except for first term, the index of the second number divisible by n in A002378, if the index equals n. - Mats Granvik, Nov 18 2007
These are precisely the numbers such that lcm(1,...,m-1) < lcm(1,...,m) (=A003418(m) for m>0; here for m=1, the l.h.s. is taken to be 0). We have a(n+1)=a(n)+1 if a(n) is a Mersenne prime or a(n)+1 is a Fermat prime; the converse is true except for n=7 (from Catalan's conjecture) and n=1, since 2^1-1 and 2^0+1 are not considered as Mersenne resp. Fermat prime. - M. F. Hasler, Jan 18 2007, Apr 18 2010
The sequence is A000015 without repetitions, or more formally, A000961=Union[A000015]. - Zak Seidov, Feb 06 2008
Except for a(1)=1, indices for which the cyclotomic polynomial Phi[k] yields a prime at x=1, cf. A020500. - M. F. Hasler, Apr 04 2008
Also, {A138929(k) ; k>1} = {2*A000961(k) ; k>1} = {4,6,8,10,14,16,18,22,26,32,34,38,46,50,54,58,62,64,74,82,86,94,98,...} are exactly the indices for which Phi[k](-1) is prime. - M. F. Hasler, Apr 04 2008
A143201(a(n)) = 1. - Reinhard Zumkeller, Aug 12 2008
Number of distinct primes dividing n=omega(n) < 2. - Juri-Stepan Gerasimov, Oct 30 2009
Numbers n such that Sum_{p-1|p is prime and divisor of n} = Product_{p-1|p is prime and divisor of n}. A055631(n) = A173557(n-1). - Juri-Stepan Gerasimov, Dec 09 2009, Mar 10 2010
Numbers n such that A028236(n) = 1. Klaus Brockhaus, Nov 06 2010
A188666(k) = a(k+1) for k: 2*a(k) <= k < 2*a(k+1), k > 0; notably a(n+1) = A188666(2*a(n)). - Reinhard Zumkeller, Apr 25 2011
A003415(a(n)) = A192015(n); A068346(a(n)) = A192016(n); a(n)=A192134(n) + A192015(n). - Reinhard Zumkeller, Jun 26 2011
A089233(a(n)) = 0. - Reinhard Zumkeller, Sep 04 2013
The positive integers n such that every element of the symmetric group S_n which has order n is an n-cycle. - W. Edwin Clark, Aug 05 2014
Conjecture: these are numbers m such that Sum_{k=0..m-1} k^phi(m) == phi(m) (mod m), where phi(m) = A000010(m). - Thomas Ordowski and Giovanni Resta, Jul 25 2018
Numbers whose (increasingly ordered) divisors are alternatingly squares and nonsquares. - Michel Marcus, Jan 16 2019
Possible numbers of elements in a finite vector space. - Jianing Song, Apr 22 2021

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 870.
  • M. Koecher and A. Krieg, Ebene Geometrie, Springer, 1993.
  • R. Lidl and H. Niederreiter, Introduction to Finite Fields and Their Applications, Cambridge 1986, Theorem 2.5, p. 45.
  • 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

There are four different sequences which may legitimately be called "prime powers": A000961 (p^k, k >= 0), A246655 (p^k, k >= 1), A246547 (p^k, k >= 2), A025475 (p^k, k=0 and k >= 2). When you refer to "prime powers", be sure to specify which of these you mean. Also A001597 is the sequence of nontrivial powers n^k, n >= 1, k >= 2. - N. J. A. Sloane, Mar 24 2018
Cf. indices of record values of A003418; A000668 and A019434 give a member of twin pairs a(n+1)=a(n)+1.
A138929(n) = 2*a(n).
A028236 (if n = Product (p_j^k_j), a(n) = numerator of Sum 1/p_j^k_j). - Klaus Brockhaus, Nov 06 2010
A000015(n) = Min{term : >= n}; A031218(n) = Max{term : <= n}.
Complementary (in the positive integers) to sequence A024619. - Jason Kimberley, Nov 10 2015

Programs

  • Haskell
    import Data.Set (singleton, deleteFindMin, insert)
    a000961 n = a000961_list !! (n-1)
    a000961_list = 1 : g (singleton 2) (tail a000040_list) where
    g s (p:ps) = m : g (insert (m * a020639 m) $ insert p s') ps
    where (m, s') = deleteFindMin s
    -- Reinhard Zumkeller, May 01 2012, Apr 25 2011
    
  • Magma
    [1] cat [ n : n in [2..250] | IsPrimePower(n) ]; // corrected by Arkadiusz Wesolowski, Jul 20 2012
    
  • Maple
    readlib(ifactors): for n from 1 to 250 do if nops(ifactors(n)[2])=1 then printf(`%d,`,n) fi: od:
    # second Maple program:
    a:= proc(n) option remember; local k; for k from
          1+a(n-1) while nops(ifactors(k)[2])>1 do od; k
        end: a(1):=1: A000961:= a:
    seq(a(n), n=1..100);  # Alois P. Heinz, Apr 08 2013
  • Mathematica
    Select[ Range[ 2, 250 ], Mod[ #, # - EulerPhi[ # ] ] == 0 & ]
    Select[ Range[ 2, 250 ], Length[FactorInteger[ # ] ] == 1 & ]
    max = 0; a = {}; Do[m = FactorInteger[n]; w = Sum[m[[k]][[1]]^m[[k]][[2]], {k, 1, Length[m]}]; If[w > max, AppendTo[a, n]; max = w], {n, 1, 1000}]; a (* Artur Jasinski *)
    Join[{1}, Select[Range[2, 250], PrimePowerQ]] (* Jean-François Alcover, Jul 07 2015 *)
  • PARI
    A000961(n,l=-1,k=0)=until(n--<1,until(lA000961(lim=999,l=-1)=for(k=1,lim, l==lcm(l,k) && next; l=lcm(l,k); print1(k,",")) \\ M. F. Hasler, Jan 18 2007
    
  • PARI
    isA000961(n) = (omega(n) == 1 || n == 1) \\ Michael B. Porter, Sep 23 2009
    
  • PARI
    nextA000961(n)=my(m,r,p);m=2*n;for(e=1,ceil(log(n+0.01)/log(2)),r=(n+0.01)^(1/e);p=prime(primepi(r)+1);m=min(m,p^e));m \\ Michael B. Porter, Nov 02 2009
    
  • PARI
    is(n)=isprimepower(n) || n==1 \\ Charles R Greathouse IV, Nov 20 2012
    
  • PARI
    list(lim)=my(v=primes(primepi(lim)),u=List([1])); forprime(p=2,sqrtint(lim\1),for(e=2,log(lim+.5)\log(p),listput(u,p^e))); vecsort(concat(v,Vec(u))) \\ Charles R Greathouse IV, Nov 20 2012
    
  • Python
    from sympy import primerange
    def A000961_list(limit): # following Python style, list terms < limit
        L = [1]
        for p in primerange(1, limit):
            pe = p
            while pe < limit:
                L.append(pe)
                pe *= p
        return sorted(L) # Chai Wah Wu, Sep 08 2014, edited by M. F. Hasler, Jun 16 2022
    
  • Python
    from sympy import primepi
    from sympy.ntheory.primetest import integer_nthroot
    def A000961(n):
        def f(x): return int(n+x-1-sum(primepi(integer_nthroot(x,k)[0]) for k in range(1,x.bit_length())))
        m, k = n, f(n)
        while m != k:
            m, k = k, f(k)
        return m # Chai Wah Wu, Jul 23 2024
  • Sage
    def A000961_list(n):
        R = [1]
        for i in (2..n):
            if i.is_prime_power(): R.append(i)
        return R
    A000961_list(227) # Peter Luschny, Feb 07 2012
    

Formula

a(n) = A025473(n)^A025474(n). - David Wasserman, Feb 16 2006
a(n) = A117331(A117333(n)). - Reinhard Zumkeller, Mar 08 2006
Panaitopol (2001) gives many properties, inequalities and asymptotics, including a(n) ~ prime(n). - N. J. A. Sloane, Oct 31 2014, corrected by M. F. Hasler, Jun 12 2023 [The reference gives pi*(x) = pi(x) + pi(sqrt(x)) + ... where pi*(x) counts the terms up to x, so it is the inverse function to a(n).]
m=a(n) for some n <=> lcm(1,...,m-1) < lcm(1,...,m), where lcm(1...0):=0 as to include a(1)=1. a(n+1)=a(n)+1 <=> a(n+1)=A019434(k) or a(n)=A000668(k) for some k (by Catalan's conjecture), except for n=1 and n=7. - M. F. Hasler, Jan 18 2007, Apr 18 2010
A001221(a(n)) < 2. - Juri-Stepan Gerasimov, Oct 30 2009
A008480(a(n)) = 1 for all n >= 1. - Alois P. Heinz, May 26 2018
Sum_{k=1..n} 1/a(k) ~ log(log(a(n))) + 1 + A077761 + A136141. - François Huppé, Jul 31 2024

Extensions

Description modified by Ralf Stephan, Aug 29 2014

A006881 Squarefree semiprimes: Numbers that are the product of two distinct primes.

Original entry on oeis.org

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
Offset: 1

Views

Author

Keywords

Comments

Numbers k such that phi(k) + sigma(k) = 2*(k+1). - Benoit Cloitre, Mar 02 2002
Numbers k such that tau(k) = omega(k)^omega(k). - Benoit Cloitre, Sep 10 2002 [This comment is false. If k = 900 then tau(k) = omega(k)^omega(k) = 27 but 900 = (2*3*5)^2 is not the product of two distinct primes. - Peter Luschny, Jul 12 2023]
Could also be called 2-almost primes. - Rick L. Shepherd, May 11 2003
From the Goldston et al. reference's abstract: "lim inf [as n approaches infinity] [(a(n+1) - a(n))] <= 26. If an appropriate generalization of the Elliott-Halberstam Conjecture is true, then the above bound can be improved to 6." - Jonathan Vos Post, Jun 20 2005
The maximal number of consecutive integers in this sequence is 3 - there cannot be 4 consecutive integers because one of them would be divisible by 4 and therefore would not be product of distinct primes. There are several examples of 3 consecutive integers in this sequence. The first one is 33 = 3 * 11, 34 = 2 * 17, 35 = 5 * 7; (see A039833). - Matias Saucedo (solomatias(AT)yahoo.com.ar), Mar 15 2008
Number of terms less than or equal to 10^k for k >= 0 is A036351(k). - Robert G. Wilson v, Jun 26 2012
Are these the numbers k whose difference between the sum of proper divisors of k and the arithmetic derivative of k is equal to 1? - Omar E. Pol, Dec 19 2012
Intersection of A001358 and A030513. - Wesley Ivan Hurt, Sep 09 2013
A237114(n) (smallest semiprime k^prime(n)+1) is a term, for n != 2. - Jonathan Sondow, Feb 06 2014
a(n) are the reduced denominators of p_2/p_1 + p_4/p_3, where p_1 != p_2, p_3 != p_4, p_1 != p_3, and the p's are primes. In other words, (p_2*p_3 + p_1*p_4) never shares a common factor with p_1*p_3. - Richard R. Forberg, Mar 04 2015
Conjecture: The sums of two elements of a(n) forms a set that includes all primes greater than or equal to 29 and all integers greater than or equal to 83 (and many below 83). - Richard R. Forberg, Mar 04 2015
The (disjoint) union of this sequence and A001248 is A001358. - Jason Kimberley, Nov 12 2015
A263990 lists the subsequence of a(n) where a(n+1)=1+a(n). - R. J. Mathar, Aug 13 2019

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • Zervos, Marie: Sur une classe de nombres composés. Actes du Congrès interbalkanique de mathématiciens 267-268 (1935)

Crossrefs

Products of exactly k distinct primes, for k = 1 to 6: A000040, A006881. A007304, A046386, A046387, A067885.
Cf. A030229, A051709, A001221 (omega(n)), A001222 (bigomega(n)), A001358 (semiprimes), A005117 (squarefree), A007304 (squarefree 3-almost primes), A213952, A039833, A016105 (subsequences), A237114 (subsequence, n != 2).
Subsequence of A007422.
Cf. A259758 (subsequence), A036351, A363923.

Programs

  • Haskell
    a006881 n = a006881_list !! (n-1)
    a006881_list = filter chi [1..] where
       chi n = p /= q && a010051 q == 1 where
          p = a020639 n
          q = n `div` p
    -- Reinhard Zumkeller, Aug 07 2011
    
  • Magma
    [n: n in [1..210] | EulerPhi(n) + DivisorSigma(1,n) eq 2*(n+1)]; // Vincenzo Librandi, Sep 17 2015
    
  • Maple
    N:= 1001: # to get all terms < N
    Primes:= select(isprime, [2,seq(2*k+1,k=1..floor(N/2))]):
    {seq(seq(p*q,q=Primes[1..ListTools:-BinaryPlace(Primes,N/p)]),p=Primes)} minus {seq(p^2,p=Primes)};
    # Robert Israel, Jul 23 2014
    # Alternative, using A001221:
    isA006881 := proc(n)
         if numtheory[bigomega](n) =2 and A001221(n) = 2 then
            true ;
        else
            false ;
        end if;
    end proc:
    A006881 := proc(n) if n = 1 then 6; else for a from procname(n-1)+1 do if isA006881(a) then return a; end if; end do: end if;
    end proc: # R. J. Mathar, May 02 2010
    # Alternative:
    with(NumberTheory): isA006881 := n -> is(NumberOfPrimeFactors(n, 'distinct') = 2 and NumberOfPrimeFactors(n) = 2):
    select(isA006881, [seq(1..205)]); # Peter Luschny, Jul 12 2023
  • Mathematica
    mx = 205; Sort@ Flatten@ Table[ Prime[n]*Prime[m], {n, Log[2, mx/3]}, {m, n + 1, PrimePi[ mx/Prime[n]]}] (* Robert G. Wilson v, Dec 28 2005, modified Jul 23 2014 *)
    sqFrSemiPrimeQ[n_] := Last@# & /@ FactorInteger@ n == {1, 1}; Select[Range[210], sqFrSemiPrimeQ] (* Robert G. Wilson v, Feb 07 2012 *)
    With[{upto=250},Select[Sort[Times@@@Subsets[Prime[Range[upto/2]],{2}]],#<=upto&]] (* Harvey P. Dale, Apr 30 2018 *)
  • PARI
    for(n=1,214,if(bigomega(n)==2&&omega(n)==2,print1(n,",")))
    
  • PARI
    for(n=1,214,if(bigomega(n)==2&&issquarefree(n),print1(n,",")))
    
  • PARI
    list(lim)=my(v=List()); forprime(p=2,sqrt(lim), forprime(q=p+1, lim\p, listput(v,p*q))); vecsort(Vec(v)) \\ Charles R Greathouse IV, Jul 20 2011
    
  • Python
    from sympy import factorint
    def ok(n): f=factorint(n); return len(f) == 2 and sum(f[p] for p in f) == 2
    print(list(filter(ok, range(1, 206)))) # Michael S. Branicky, Jun 10 2021
    
  • Python
    from math import isqrt
    from sympy import primepi, primerange
    def A006881(n):
        def f(x): return int(n+x+(t:=primepi(s:=isqrt(x)))+(t*(t-1)>>1)-sum(primepi(x//k) for k in primerange(1, s+1)))
        m, k = n, f(n)
        while m != k:
            m, k = k, f(k)
        return m # Chai Wah Wu, Aug 15 2024
  • Sage
    def A006881_list(n) :
        R = []
        for i in (6..n) :
            d = prime_divisors(i)
            if len(d) == 2 :
                if d[0]*d[1] == i :
                    R.append(i)
        return R
    A006881_list(205)  # Peter Luschny, Feb 07 2012
    

Formula

A000005(a(n)^(k-1)) = A000290(k) for all k>0. - Reinhard Zumkeller, Mar 04 2007
A109810(a(n)) = 4; A178254(a(n)) = 6. - Reinhard Zumkeller, May 24 2010
A056595(a(n)) = 3. - Reinhard Zumkeller, Aug 15 2011
a(n) = A096916(n) * A070647(n). - Reinhard Zumkeller, Sep 23 2011
A211110(a(n)) = 3. - Reinhard Zumkeller, Apr 02 2012
Sum_{n >= 1} 1/a(n)^s = (1/2)*(P(s)^2 - P(2*s)), where P is Prime Zeta. - Enrique Pérez Herrero, Jun 24 2012
A050326(a(n)) = 2. - Reinhard Zumkeller, May 03 2013
sopf(a(n)) = a(n) - phi(a(n)) + 1 = sigma(a(n)) - a(n) - 1. - Wesley Ivan Hurt, May 18 2013
d(a(n)) = 4. Omega(a(n)) = 2. omega(a(n)) = 2. mu(a(n)) = 1. - Wesley Ivan Hurt, Jun 28 2013
a(n) ~ n log n/log log n. - Charles R Greathouse IV, Aug 22 2013
A089233(a(n)) = 1. - Reinhard Zumkeller, Sep 04 2013
From Peter Luschny, Jul 12 2023: (Start)
For k > 1: k is a term <=> k^A001221(k) = k*A007947(k).
For k > 1: k is a term <=> k^A001222(k) = k*A007947(k).
For k > 1: k is a term <=> A363923(k) = k. (End)
a(n) ~ n log n/log log n. - Charles R Greathouse IV, Jan 13 2025

Extensions

Name expanded (based on a comment of Rick L. Shepherd) by Charles R Greathouse IV, Sep 16 2015

A281116 Number of factorizations of n>=2 into factors greater than 1 with no common divisor other than 1 (a(1)=0 by convention).

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2, 0, 1, 1, 0, 0, 2, 0, 2, 1, 1, 0, 3, 0, 1, 0, 2, 0, 4, 0, 0, 1, 1, 1, 5, 0, 1, 1, 3, 0, 4, 0, 2, 2, 1, 0, 5, 0, 2, 1, 2, 0, 3, 1, 3, 1, 1, 0, 8, 0, 1, 2, 0, 1, 4, 0, 2, 1, 4, 0, 9, 0, 1, 2, 2, 1, 4, 0, 5, 0, 1, 0, 8, 1, 1, 1, 3, 0, 8, 1, 2, 1, 1, 1, 7, 0, 2, 2, 5
Offset: 1

Views

Author

Gus Wiseman, Jan 15 2017

Keywords

Comments

Let (e1, e2, ..., ek) be a prime-signature of n (that is, n = p^e1 * q^e2 * ... * r^ek for some primes, p, q, ..., r). Then a(n) is the number of ways of partitioning multiset {e1 x 1, e2 x 2, ..., ek x k} into multisets such that none of the numbers 1 .. k is present in all member multisets of that set partition. - Antti Karttunen, Sep 08 2018

Examples

			a(6)=1:  (2*3)
a(12)=2; (2*2*3)       (3*4)
a(24)=3: (2*2*2*3)     (2*3*4)     (3*8)
a(30)=4: (2*3*5)       (2*15)      (3*10)    (5*6)
a(36)=5: (2*2*3*3)     (2*2*9)     (2*3*6)   (3*3*4)   (4*9)
a(96)=7: (2*2*2*2*2*3) (2*2*2*3*4) (2*2*3*8) (2*3*4*4) (2*3*16) (3*4*8) (3*32).
		

Crossrefs

Programs

  • Mathematica
    postfacs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[postfacs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]];
    Table[Length[Select[postfacs[n],GCD@@#===1&]],{n,2,100}]
  • PARI
    A281116(n, m=n, facs=List([])) = if(1==n, (1==gcd(Vec(facs))), my(s=0, newfacs); fordiv(n, d, if((d>1)&&(d<=m), newfacs = List(facs); listput(newfacs,d); s += A281116(n/d, d, newfacs))); (s)); \\ Antti Karttunen, Sep 08 2018

Extensions

Term a(1) = 0 prepended by Antti Karttunen, Sep 08 2018

A054753 Numbers which are the product of a prime and the square of a different prime (p^2 * q).

Original entry on oeis.org

12, 18, 20, 28, 44, 45, 50, 52, 63, 68, 75, 76, 92, 98, 99, 116, 117, 124, 147, 148, 153, 164, 171, 172, 175, 188, 207, 212, 236, 242, 244, 245, 261, 268, 275, 279, 284, 292, 316, 325, 332, 333, 338, 356, 363, 369, 387, 388, 404, 412, 423, 425, 428, 436, 452
Offset: 1

Views

Author

Henry Bottomley, Apr 25 2000

Keywords

Comments

A178254(a(n)) = 4; union of A095990 and A096156. - Reinhard Zumkeller, May 24 2010
Numbers with prime signature (2,1) = union of numbers with ordered prime signature (1,2) and numbers with ordered prime signature (2,1) (restating second part of above comment). - Daniel Forgues, Feb 05 2011
A056595(a(n)) = 4. - Reinhard Zumkeller, Aug 15 2011
For k>1, Sum_{n>=1} 1/a(n)^k = P(k) * P(2*k) - P(3*k), where P is the prime zeta function. - Enrique Pérez Herrero, Jun 27 2012
Also numbers n with A001222(n)=3 and A001221(n)=2. - Enrique Pérez Herrero, Jun 27 2012
A089233(a(n)) = 2. - Reinhard Zumkeller, Sep 04 2013
Subsequence of the triprimes (A014612). If a(n) is even, then a(n)/2 is semiprime (A001358). - Wesley Ivan Hurt, Sep 08 2013
From Bernard Schott, Sep 16 2017: (Start)
These numbers are called "Nombres d'Einstein" on the French site "Diophante" (see link) because a(n) = m * c^2 where m and c are two different primes.
The numbers 44 = 2^2 * 11 and 45 = 3^2 * 5 are the two smallest consecutive "Einstein numbers"; 603, 604, 605 are the three smallest consecutive integers in this sequence. It's not possible to get more than five such consecutive numbers (proof in the link); the first set of five such consecutive numbers begins at the 17-digit number 10093613546512321. Where does the first sequence of four consecutive "Einstein numbers" begin? (End) [corrected by Jon E. Schoenfield, Sep 20 2017]
The first set of four consecutive integers in this sequence begins at the 11-digit number 17042641441. (Each such set must include two even numbers, one of which is of the form 2^2*q, the other of the form p^2*2; a quick search, taking the factorizations of consecutive integers before and after numbers of the latter form, shows that the number of sets of four consecutive k-digit integers in this sequence is 1, 7, 12, 18 for k = 11, 12, 13, 14, respectively.) - Jon E. Schoenfield, Sep 16 2017
The first 13 sets of 5 consecutive integers in this sequence have as their first terms 10093613546512321, 14414905793929921, 266667848769941521, 562672865058083521, 1579571757660876721, 1841337567664174321, 2737837351207392721, 4456162869973433521, 4683238426747860721, 4993613853242910721, 5037980611623036721, 5174116847290255921, 5344962129269790721. Each of these numbers except for the last is 7^2 times a prime; the last is 23^2 times a prime. - Jon E. Schoenfield, Sep 17 2017

Examples

			a(1) = 12 because 12 = 2^2*3 is the smallest number of the form p^2*q.
		

Crossrefs

Numbers with 6 divisors (A030515) which are not 5th powers of primes (A050997).
Subsequence of A325241. Supersequence of A096156.
Table giving for each subsequence the corresponding number of groups of order p^2*q, from Bernard Schott, Jan 23 2022
-------------------------------------------------------------------------------
| Subsequence | A350638 | A143928 | A350115 | A349495 | A350245 | A350422 (*)|
-------------------------------------------------------------------------------
|A000001(p^2*q)| (q+9)/2 | 5 | 5 | 4 | 3 | 2 |
-------------------------------------------------------------------------------
(*) A350422 equals disjoint union of A350332 (pA350421 (p>q).

Programs

  • Mathematica
    Select[Range[12,452], {1,2}==Sort[Last/@FactorInteger[ # ]]&] (* Zak Seidov, Jul 19 2009 *)
    With[{nn=60},Take[Union[Flatten[{#[[1]]#[[2]]^2,#[[1]]^2 #[[2]]}&/@ Subsets[ Prime[Range[nn]],{2}]]],nn]] (* Harvey P. Dale, Dec 15 2014 *)
  • PARI
    is(n)=vecsort(factor(n)[,2])==[1,2]~ \\ Charles R Greathouse IV, Dec 30 2014
    
  • PARI
    for(n=1, 1e3, if(numdiv(n) - bigomega(n) == 3, print1(n, ", "))) \\ Altug Alkan, Nov 24 2015
    
  • Python
    from sympy import factorint
    def ok(n): return sorted(factorint(n).values()) == [1, 2]
    print([k for k in range(453) if ok(k)]) # Michael S. Branicky, Dec 18 2021
    
  • Python
    from math import isqrt
    from sympy import primepi, primerange, integer_nthroot
    def A054753(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            kmin = kmax >> 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x): return n+x-sum(primepi(x//p**2) for p in primerange(isqrt(x)+1))+primepi(integer_nthroot(x,3)[0])
        return bisection(f,n,n) # Chai Wah Wu, Feb 21 2025

Extensions

Link added and incorrect Mathematica code removed by David Bevan, Sep 17 2011

A018892 Number of ways to write 1/n as a sum of exactly 2 unit fractions.

Original entry on oeis.org

1, 2, 2, 3, 2, 5, 2, 4, 3, 5, 2, 8, 2, 5, 5, 5, 2, 8, 2, 8, 5, 5, 2, 11, 3, 5, 4, 8, 2, 14, 2, 6, 5, 5, 5, 13, 2, 5, 5, 11, 2, 14, 2, 8, 8, 5, 2, 14, 3, 8, 5, 8, 2, 11, 5, 11, 5, 5, 2, 23, 2, 5, 8, 7, 5, 14, 2, 8, 5, 14, 2, 18, 2, 5, 8, 8, 5, 14, 2, 14, 5, 5, 2, 23, 5, 5, 5, 11, 2, 23, 5, 8, 5, 5, 5, 17, 2, 8, 8
Offset: 1

Views

Author

Keywords

Comments

Number of elements in the set {(x,y): x|n, y|n, x<=y, gcd(x,y)=1}. Number of divisors of n^2 less than or equal to n. - Vladeta Jovovic, May 03 2002
Equivalently, number of pairs (x,y) such that lcm(x,y)=n. - Benoit Cloitre, May 16 2002
Also, number of right triangles with an integer hypotenuse and height n. - Reinhard Zumkeller, Jul 10 2002
The triangles are to be considered as resting on their hypotenuse, with the height measured to the right angle. - Franklin T. Adams-Watters, Feb 19 2015
a(n) >= 2 for n>=2 because of the identities 1/n = 1/(2*n) + 1/(2*n) = 1/(n+1) + 1/(n*(n+1)). - Lekraj Beedassy, May 04 2004
a(n) is the number of divisors of n^2 that are <= n; e.g., a(12) counts these 8 divisors of 12: 1,2,3,4,6,8,9,12. - Clark Kimberling, Apr 21 2019

Examples

			n=1: 1/1 = 1/2 + 1/2.
n=2: 1/2 = 1/4 + 1/4 = 1/3 + 1/6.
n=3: 1/3 = 1/6 + 1/6 = 1/4 + 1/12.
		

References

  • K. S. Brown, Posting to netnews group sci.math, Aug 17 1996.
  • L. E. Dickson, History of The Theory of Numbers, Vol. 2 p. 690, Chelsea NY 1923.
  • A. M. and I. M. Yaglom, Challenging Mathematical Problems With Elementary Solutions, Vol. 1, Dover, N.Y., 1987, pp. 8 and 60, Problem 19.

Crossrefs

Programs

  • Haskell
    a018892 n = length [d | d <- [1..n], n^2 `mod` d == 0]
    -- Reinhard Zumkeller, Jan 08 2012
    
  • Mathematica
    f[j_, n_] := (Times @@ (j(Last /@ FactorInteger[n]) + 1) + j - 1)/j; Table[f[2, n], {n, 96}] (* Robert G. Wilson v, Aug 03 2005 *)
    a[n_] := (DivisorSigma[0, n^2] + 1)/2; Table[a[n], {n, 1, 99}](* Jean-François Alcover, Dec 19 2011, after Vladeta Jovovic *)
  • PARI
    A018892(n)=(numdiv(n^2)+1)/2 \\ M. F. Hasler, Dec 30 2007
    
  • PARI
    A018892s(n)=local(t=divisors(n^2));vector((#t+1)/2,i,[n+t[i],n+n^2/t[i]]) /* show solutions */ \\ M. F. Hasler, Dec 30 2007
    
  • PARI
    a(n)=sumdiv(n,d,sum(i=1,d,lcm(d,i)==n)) \\ Charles R Greathouse IV, Apr 08 2012
    
  • Python
    from math import prod
    from sympy import factorint
    def A018892(n): return prod((a<<1)+1 for a in factorint(n).values())+1>>1 # Chai Wah Wu, Aug 20 2023

Formula

If n = (p1^a1)(p2^a2)...(pt^at), a(n) = ((2*a1 + 1)(2*a2 + 1) ... (2*at + 1) + 1)/2.
a(n) = (tau(n^2)+1)/2. - Vladeta Jovovic, May 03 2002
a(n) = A063647(n)+1 = A046079(2*n)+1. - Lekraj Beedassy, Dec 01 2003
a(n) = Sum_{d|n} phi(2^omega(d)), where phi is A000010 and omega is A001221. - Enrique Pérez Herrero, Apr 13 2012
a(n) = A000005(n) + A089233(n). - James Spahlinger, Feb 16 2016
a(n) = n + Sum_{i=1..n} sign(n^2 mod -i). - Wesley Ivan Hurt, Apr 07 2021
a(n) = Sum_{d|n} mu(n/d)*A184389(d). - Ridouane Oudra, Feb 22 2022
Sum_{k=1..n} a(k) ~ (n/(2*zeta(2)))*(log(n)^2/2 + log(n)*(3*gamma - 1) + 1 - 3*gamma + 3*gamma^2 - 3*gamma_1 + zeta(2) + (2 - 6*gamma - 2*log(n))*zeta'(2)/zeta(2) + (2*zeta'(2)/zeta(2))^2 - 2*zeta''(2)/zeta(2)), where gamma is Euler's constant (A001620) and gamma_1 is the first Stieltjes constant (A082633). - Amiram Eldar, Oct 03 2024

Extensions

More terms from David W. Wilson, Sep 15 1996
First example corrected by Jason Orendorff (jason.orendorff(AT)gmail.com), Jan 02 2009
Incorrect Mathematica program deleted by N. J. A. Sloane, Jul 08 2009

A065036 Product of the cube of a prime (A030078) and a different prime.

Original entry on oeis.org

24, 40, 54, 56, 88, 104, 135, 136, 152, 184, 189, 232, 248, 250, 296, 297, 328, 344, 351, 375, 376, 424, 459, 472, 488, 513, 536, 568, 584, 621, 632, 664, 686, 712, 776, 783, 808, 824, 837, 856, 872, 875, 904, 999, 1016, 1029, 1048, 1096, 1107, 1112
Offset: 1

Views

Author

Alford Arnold, Nov 04 2001

Keywords

Comments

This sequence appears on row 8 of the list illustrated in A064839 and is similar to A054753 which appears on row 6. Previous rows are generated by A000007, A000040, A001248, A006881, A030078 respectively.
Or, the numbers n such that 20=number of perfect partitions of n. - Juri-Stepan Gerasimov, Sep 26 2009

Examples

			a(4)= 56 since 56 = 2*2*2*7.
		

Crossrefs

Programs

  • Mathematica
    Select[ Range[1500], Sort[ Transpose[ FactorInteger[ # ]] [[2]]] == {1, 3} & ]
    Module[{upto=1200},Select[(Union[Flatten[{#[[1]]^3 #[[2]],#[[1]]#[[2]]^3}&/@Subsets[Prime[Range[upto/8]],{2}]]]),#<=upto&]] (* Harvey P. Dale, May 23 2015 *)
  • PARI
    list(lim)=my(v=List(),t);forprime(p=2,(lim\2)^(1/3),t=p^3; forprime(q=2,lim\t,if(p==q,next);listput(v,t*q)));vecsort(Vec(v)) \\ Charles R Greathouse IV, Jul 20 2011
    
  • PARI
    is(n)=my(f=factor(n)[,2]); f==[3,1]~||f==[1,3]~ \\ Charles R Greathouse IV, Oct 15 2015
    
  • Python
    from sympy import primepi, primerange, integer_nthroot
    def A065036(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            kmin = kmax >> 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x): return n+x-sum(primepi(x//p**3) for p in primerange(integer_nthroot(x,3)[0]+1))+primepi(integer_nthroot(x,4)[0])
        return bisection(f,n,n) # Chai Wah Wu, Feb 21 2025

Formula

A002033(a(n)) = 20. - Juri-Stepan Gerasimov, Sep 26 2009
A089233(a(n)) = 3. - Reinhard Zumkeller, Sep 04 2013
A000005(a(n)) = 8. - Altug Alkan, Nov 11 2015

A259936 Number of ways to express the integer n as a product of its unitary divisors (A034444).

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 2, 1, 1, 2, 1, 2, 2, 2, 1, 2, 1, 2, 1, 2, 1, 5, 1, 1, 2, 2, 2, 2, 1, 2, 2, 2, 1, 5, 1, 2, 2, 2, 1, 2, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 1, 5, 1, 2, 2, 1, 2, 5, 1, 2, 2, 5, 1, 2, 1, 2, 2, 2, 2, 5, 1, 2, 1, 2, 1, 5, 2, 2, 2, 2, 1, 5, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 1, 5, 1, 2, 5
Offset: 1

Views

Author

Geoffrey Critzer, Jul 09 2015

Keywords

Comments

Equivalently, a(n) is the number of ways to express the cyclic group Z_n as a direct sum of its Hall subgroups. A Hall subgroup of a finite group G is a subgroup whose order is coprime to its index.
a(n) is the number of ways to partition the set of distinct prime factors of n.
Also the number of singleton or pairwise coprime factorizations of n. - Gus Wiseman, Sep 24 2019

Examples

			a(60) = 5 because we have: 60 = 4*3*5 = 4*15 = 3*20 = 5*12.
For n = 36, its unitary divisors are 1, 4, 9, 36. From these we obtain 36 either as 1*36 or 4*9, thus a(36) = 2. - _Antti Karttunen_, Oct 21 2017
		

Crossrefs

Differs from A050320 for the first time at n=36.
Differs from A354870 for the first time at n=210, where a(210) = 15, while A354870(210) = 12.
Related classes of factorizations:
- No conditions: A001055
- Strict: A045778
- Constant: A089723
- Distinct multiplicities: A255231
- Singleton or coprime: A259936
- Relatively prime: A281116
- Aperiodic: A303386
- Stable (indivisible): A305149
- Connected: A305193
- Strict relatively prime: A318721
- Uniform: A319269
- Intersecting: A319786
- Constant or distinct factors coprime: A327399
- Constant or relatively prime: A327400
- Coprime: A327517
- Not relatively prime: A327658
- Distinct factors coprime: A327695

Programs

  • Maple
    map(combinat:-bell @ nops @ numtheory:-factorset, [$1..100]); # Robert Israel, Jul 09 2015
  • Mathematica
    Table[BellB[PrimeNu[n]], {n, 1, 75}]
    (* second program *)
    facs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]];
    Table[Length[Select[facs[n],Length[#]==1||CoprimeQ@@#&]],{n,100}] (* Gus Wiseman, Sep 24 2019 *)
  • PARI
    a(n) = my(t=omega(n), x='x, m=contfracpnqn(matrix(2, t\2, y, z, if( y==1, -z*x^2, 1 - (z+1)*x)))); polcoeff(1/(1 - x + m[2, 1]/m[1, 1]) + O(x^(t+1)), t) \\ Charles R Greathouse IV, Jun 30 2017

Formula

a(n) = A000110(A001221(n)).
a(n > 1) = A327517(n) + 1. - Gus Wiseman, Sep 24 2019

Extensions

Incorrect comment removed by Antti Karttunen, Jun 11 2022

A320426 Number of nonempty pairwise coprime subsets of {1,...,n}, where a single number is not considered to be pairwise coprime unless it is equal to 1.

Original entry on oeis.org

1, 2, 5, 8, 19, 22, 49, 64, 95, 106, 221, 236, 483, 530, 601, 712, 1439, 1502, 3021, 3212, 3595, 3850, 7721, 7976, 11143, 11878, 14629, 15460, 30947, 31202, 62433, 69856, 76127, 80222, 89821, 91612, 183259, 192602, 208601, 214232, 428503, 431574, 863189
Offset: 1

Views

Author

Gus Wiseman, Jan 08 2019

Keywords

Comments

Two or more numbers are pairwise coprime if no pair of them has a common divisor > 1.

Examples

			The a(4) = 8 subsets of {1,2,3,4} are {1}, {1,2}, {1,3}, {1,4}, {2,3}, {3,4}, {1,2,3}, {1,3,4}. - _Michael B. Porter_, Jan 12 2019
From _Gus Wiseman_, May 09 2021: (Start)
The a(2) = 2 through a(6) = 22 sets:
   {1}     {1}      {1}       {1}        {1}
  {1,2}   {1,2}    {1,2}     {1,2}      {1,2}
          {1,3}    {1,3}     {1,3}      {1,3}
          {2,3}    {1,4}     {1,4}      {1,4}
         {1,2,3}   {2,3}     {1,5}      {1,5}
                   {3,4}     {2,3}      {1,6}
                  {1,2,3}    {2,5}      {2,3}
                  {1,3,4}    {3,4}      {2,5}
                             {3,5}      {3,4}
                             {4,5}      {3,5}
                            {1,2,3}     {4,5}
                            {1,2,5}     {5,6}
                            {1,3,4}    {1,2,3}
                            {1,3,5}    {1,2,5}
                            {1,4,5}    {1,3,4}
                            {2,3,5}    {1,3,5}
                            {3,4,5}    {1,4,5}
                           {1,2,3,5}   {1,5,6}
                           {1,3,4,5}   {2,3,5}
                                       {3,4,5}
                                      {1,2,3,5}
                                      {1,3,4,5}
(End)
		

Crossrefs

The case of pairs is A015614.
The case with singletons is A187106.
The version without singletons (except {1}) is A276187.
Row sums of A320436.
The version for divisors > 1 is A343654.
The version for divisors without singletons is A343655.
The maximal version is A343659.
A018892 counts coprime unordered pairs of divisors.
A051026 counts pairwise indivisible subsets of {1...n}.
A087087 ranks pairwise coprime subsets of {1...n}.
A326675 ranks pairwise coprime non-singleton subsets of {1...n}.

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n]],CoprimeQ@@#&]],{n,10}]

Formula

a(n) = A187106(n) - n + 1 = A084422(n) - n.
a(n) = A276187(n) + 1. - Gus Wiseman, May 08 2021

Extensions

a(25)-a(43) from Alois P. Heinz, Jan 08 2019

A343654 Number of pairwise coprime sets of divisors > 1 of n.

Original entry on oeis.org

1, 2, 2, 3, 2, 5, 2, 4, 3, 5, 2, 8, 2, 5, 5, 5, 2, 8, 2, 8, 5, 5, 2, 11, 3, 5, 4, 8, 2, 15, 2, 6, 5, 5, 5, 13, 2, 5, 5, 11, 2, 15, 2, 8, 8, 5, 2, 14, 3, 8, 5, 8, 2, 11, 5, 11, 5, 5, 2, 25, 2, 5, 8, 7, 5, 15, 2, 8, 5, 15, 2, 18, 2, 5, 8, 8, 5, 15, 2, 14, 5, 5
Offset: 1

Views

Author

Gus Wiseman, Apr 26 2021

Keywords

Comments

First differs from A100565 at a(210) = 52, A100565(210) = 51.

Examples

			The a(n) sets for n = 1, 2, 4, 6, 8, 12, 24, 30, 32, 36, 48:
  {}  {}   {}   {}     {}   {}     {}     {}       {}    {}     {}
      {2}  {2}  {2}    {2}  {2}    {2}    {2}      {2}   {2}    {2}
           {4}  {3}    {4}  {3}    {3}    {3}      {4}   {3}    {3}
                {6}    {8}  {4}    {4}    {5}      {8}   {4}    {4}
                {2,3}       {6}    {6}    {6}      {16}  {6}    {6}
                            {12}   {8}    {10}     {32}  {9}    {8}
                            {2,3}  {12}   {15}           {12}   {12}
                            {3,4}  {24}   {30}           {18}   {16}
                                   {2,3}  {2,3}          {36}   {24}
                                   {3,4}  {2,5}          {2,3}  {48}
                                   {3,8}  {3,5}          {2,9}  {2,3}
                                          {5,6}          {3,4}  {3,4}
                                          {2,15}         {4,9}  {3,8}
                                          {3,10}                {3,16}
                                          {2,3,5}
		

Crossrefs

The version for partitions is A007359.
The version for subsets of {1..n} is A084422.
The case of pairs is A089233.
The version with 1's is A225520.
The maximal case is A343652.
The case without empty sets or singletons is A343653.
The maximal case without singletons is A343660.
A018892 counts pairwise coprime unordered pairs of divisors.
A051026 counts pairwise indivisible subsets of {1..n}.
A100565 counts pairwise coprime unordered triples of divisors.
A187106, A276187, and A320426 count other types of pairwise coprime sets.
A326077 counts maximal pairwise indivisible sets.

Programs

  • Mathematica
    pwcop[y_]:=And@@(GCD@@#1==1&)/@Subsets[y,{2}];
    Table[Length[Select[Subsets[Rest[Divisors[n]]],pwcop]],{n,100}]

A343653 Number of non-singleton pairwise coprime nonempty sets of divisors > 1 of n.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2, 0, 1, 1, 0, 0, 2, 0, 2, 1, 1, 0, 3, 0, 1, 0, 2, 0, 7, 0, 0, 1, 1, 1, 4, 0, 1, 1, 3, 0, 7, 0, 2, 2, 1, 0, 4, 0, 2, 1, 2, 0, 3, 1, 3, 1, 1, 0, 13, 0, 1, 2, 0, 1, 7, 0, 2, 1, 7, 0, 6, 0, 1, 2, 2, 1, 7, 0, 4, 0, 1, 0, 13, 1, 1
Offset: 1

Views

Author

Gus Wiseman, Apr 25 2021

Keywords

Comments

First differs from A066620 at a(210) = 36, A066620(210) = 35.

Examples

			The a(n) sets for n = 6, 12, 24, 30, 36, 60, 72, 96:
  {2,3}  {2,3}  {2,3}  {2,3}    {2,3}  {2,3}    {2,3}  {2,3}
         {3,4}  {3,4}  {2,5}    {2,9}  {2,5}    {2,9}  {3,4}
                {3,8}  {3,5}    {3,4}  {3,4}    {3,4}  {3,8}
                       {5,6}    {4,9}  {3,5}    {3,8}  {3,16}
                       {2,15}          {4,5}    {4,9}  {3,32}
                       {3,10}          {5,6}    {8,9}
                       {2,3,5}         {2,15}
                                       {3,10}
                                       {3,20}
                                       {4,15}
                                       {5,12}
                                       {2,3,5}
                                       {3,4,5}
		

Crossrefs

The case of pairs is A089233.
The version with 1's, empty sets, and singletons is A225520.
The version for subsets of {1..n} is A320426.
The version for strict partitions is A337485.
The version for compositions is A337697.
The version for prime indices is A337984.
The maximal case with 1's is A343652.
The version with empty sets is a(n) + 1.
The version with singletons is A343654(n) - 1.
The version with empty sets and singletons is A343654.
The version with 1's is A343655.
The maximal case is A343660.
A018892 counts pairwise coprime unordered pairs of divisors.
A048691 counts pairwise coprime ordered pairs of divisors.
A048785 counts pairwise coprime ordered triples of divisors.
A051026 counts pairwise indivisible subsets of {1..n}.
A100565 counts pairwise coprime unordered triples of divisors.
A305713 counts pairwise coprime non-singleton strict partitions.
A343659 counts maximal pairwise coprime subsets of {1..n}.

Programs

  • Mathematica
    Table[Length[Select[Subsets[Rest[Divisors[n]]],CoprimeQ@@#&]],{n,100}]
Showing 1-10 of 14 results. Next