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.

Previous Showing 21-30 of 36 results. Next

A350352 Products of three or more distinct prime numbers.

Original entry on oeis.org

30, 42, 66, 70, 78, 102, 105, 110, 114, 130, 138, 154, 165, 170, 174, 182, 186, 190, 195, 210, 222, 230, 231, 238, 246, 255, 258, 266, 273, 282, 285, 286, 290, 310, 318, 322, 330, 345, 354, 357, 366, 370, 374, 385, 390, 399, 402, 406, 410, 418, 426, 429, 430
Offset: 1

Views

Author

Gus Wiseman, Jan 11 2022

Keywords

Comments

First differs from A336568 in lacking 420.

Examples

			The terms and their prime indices begin:
     30: {1,2,3}     182: {1,4,6}      285: {2,3,8}
     42: {1,2,4}     186: {1,2,11}     286: {1,5,6}
     66: {1,2,5}     190: {1,3,8}      290: {1,3,10}
     70: {1,3,4}     195: {2,3,6}      310: {1,3,11}
     78: {1,2,6}     210: {1,2,3,4}    318: {1,2,16}
    102: {1,2,7}     222: {1,2,12}     322: {1,4,9}
    105: {2,3,4}     230: {1,3,9}      330: {1,2,3,5}
    110: {1,3,5}     231: {2,4,5}      345: {2,3,9}
    114: {1,2,8}     238: {1,4,7}      354: {1,2,17}
    130: {1,3,6}     246: {1,2,13}     357: {2,4,7}
    138: {1,2,9}     255: {2,3,7}      366: {1,2,18}
    154: {1,4,5}     258: {1,2,14}     370: {1,3,12}
    165: {2,3,5}     266: {1,4,8}      374: {1,5,7}
    170: {1,3,7}     273: {2,4,6}      385: {3,4,5}
    174: {1,2,10}    282: {1,2,15}     390: {1,2,3,6}
		

Crossrefs

This is the squarefree case of A033942.
Including squarefree semiprimes gives A120944.
The squarefree complement consists of 1 and A167171.
These are the Heinz numbers of the partitions counted by A347548.
A000040 lists prime numbers (exactly 1 prime factor).
A005117 lists squarefree numbers.
A006881 lists squarefree numbers with exactly 2 prime factors.
A007304 lists squarefree numbers with exactly 3 prime factors.
A046386 lists squarefree numbers with exactly 4 prime factors.

Programs

  • Mathematica
    Select[Range[100],SquareFreeQ[#]&&PrimeOmega[#]>=3&]
  • PARI
    is(n,f=factor(n))=my(e=f[,2]); #e>2 && vecmax(e)==1 \\ Charles R Greathouse IV, Jul 08 2022
    
  • PARI
    list(lim)=my(v=List()); forsquarefree(n=30,lim\1, if(#n[2][,2]>2, listput(v,n[1]))); Vec(v) \\ Charles R Greathouse IV, Jul 08 2022
  • Python
    from sympy import factorint
    def ok(n): f = factorint(n, multiple=True); return len(f) == len(set(f)) > 2
    print([k for k in range(431) if ok(k)]) # Michael S. Branicky, Jan 14 2022
    
  • Python
    from math import isqrt, prod
    from sympy import primerange, integer_nthroot, primepi
    def A350352(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+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(3,x.bit_length())))
        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
        return bisection(f,n,n) # Chai Wah Wu, Sep 11 2024
    

A063928 Largest nonprime proper divisor of n (with a(1)=1).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 6, 1, 1, 1, 8, 1, 9, 1, 10, 1, 1, 1, 12, 1, 1, 9, 14, 1, 15, 1, 16, 1, 1, 1, 18, 1, 1, 1, 20, 1, 21, 1, 22, 15, 1, 1, 24, 1, 25, 1, 26, 1, 27, 1, 28, 1, 1, 1, 30, 1, 1, 21, 32, 1, 33, 1, 34, 1, 35, 1, 36, 1, 1, 25, 38, 1, 39, 1, 40, 27, 1, 1, 42, 1, 1, 1, 44, 1
Offset: 1

Views

Author

Henry Bottomley, Aug 15 2001

Keywords

Comments

a(m)*a(n) <= a(m*n); a(m)*a(n) = a(m*n) iff m and n are prime or = 1. - Reinhard Zumkeller, Apr 11 2008

Crossrefs

a(n)=1 if n is 1, prime (A000040), or the product of two primes (A001358), i.e., if n is in A037143, otherwise, with n in A033942, a(n)=A032742(n). Cf. A006530.

Programs

  • PARI
    { for (n=1, 1000, if (n==1, a=1, d=divisors(n); m=length(d); until (!isprime(a), m--; a=d[m])); write("b063928.txt", n, " ", a) ) } \\ Harry J. Smith, Sep 02 2009

A104016 Devaraj numbers: squarefree r-prime-factor (r>1) integers N=p1*...*pr such that phi(N)=(p1-1)*...*(pr-1) divides gcd(p1-1,...,pr-1)^2*(N-1)^(r-2).

Original entry on oeis.org

561, 1105, 1729, 2465, 2821, 6601, 8911, 10585, 11305, 15841, 29341, 39865, 41041, 46657, 52633, 62745, 63973, 75361, 96985, 101101, 115921, 126217, 162401, 172081, 188461, 252601, 278545, 294409, 314821, 334153, 340561, 399001, 401401, 410041
Offset: 1

Views

Author

Max Alekseyev, Feb 25 2005

Keywords

Comments

A.K. Devaraj conjectured that these numbers are exactly Carmichael numbers. It was proved (see Alekseyev link) that every Carmichael number is indeed a Devaraj number, but the converse is not true. Devaraj numbers that are not Carmichael are given by A104017.
These numbers can't be even, since phi(N) is always even (N>2) but p1=2 implies that gcd{pi-1}=1 and N-1 is odd. - M. F. Hasler, Apr 03 2009

Crossrefs

Subsequence of A350352 and hence of A033942.

Programs

  • PARI
    Devaraj() = for(n=2,10^8, f=factorint(n); if(vecmax(f[,2])>1,next); f=f[,1]; r=length(f); if(r==1,next); d=f[1]-1; p=f[1]-1; for(i=2,r,d=gcd(d,f[i]-1); p*=f[i]-1); if( ((n-1)^(r-2)*d^2)%p==0, print1(" ",n)) )
    
  • PARI
    isA104016(n)= local(f=factor(n)); vecmax(f[,2])==1 && #(f*=[1,-1]~)>1 && gcd(f)^2*(n-1)^(#f-2)%prod(i=1,#f,f[i])==0
    /* To print the list: */ forstep( n=3, 10^6, 2, vecmax((f=factor(n))[,2])>1 && next; #(f*=[1,-1]~)>1 || next; gcd(f)^2*(n-1)^(#f-2)%prod(i=1,#f,f[i]) || print1(n","))
    /* The following version could be efficient for large omega(n) */
    isA104016(n) = issquarefree(n) && !isprime(n) && Mod(n-1,prod(i=1,#n=factor(n)*[1,-1]~,n[i]))^(#n-2)*gcd(n)^2==0 \\ M. F. Hasler, Apr 03 2009

A230594 Number of ways to write n as n = x*y, where x, y = noncomposite numbers (A008578), 1 <= x <= n, 1 <= y <= n.

Original entry on oeis.org

1, 2, 2, 1, 2, 2, 2, 0, 1, 2, 2, 0, 2, 2, 2, 0, 2, 0, 2, 0, 2, 2, 2, 0, 1, 2, 0, 0, 2, 0, 2, 0, 2, 2, 2, 0, 2, 2, 2, 0, 2, 0, 2, 0, 0, 2, 2, 0, 1, 0, 2, 0, 2, 0, 2, 0, 2, 2, 2, 0, 2, 2, 0, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 2, 0, 0, 2, 0, 2, 0, 0, 2, 2, 0, 2, 2, 2
Offset: 1

Views

Author

Jaroslav Krizek, Oct 27 2013

Keywords

Comments

Dirichlet convolution of A080339(n) with itself, where A080339 = characteristic function of noncomposite numbers (A008578).
Dirichlet convolution of functions b(n) and c(n) is function a(n) = Sum_{d|n} b(d) * c(n/d).
a(n) = 0, 1 or 2. a(n) = 0 for numbers n from A033942 (numbers with least 3 prime factors (counted with multiplicity)); a(n) = 1 for n = p^2, p = prime; a(n) = 2 for numbers n from A167171 (A006881 union A000040).

Examples

			For n = 6: a(6) = Sum_(d|6) A080339(d) * A080339(6/d) = 1*0 + 1*1 + 1*1 + 0*1 = 2.
		

Crossrefs

Programs

Formula

a(n) = Sum_{d|n} A080339(d) * A080339(n/d).

A331233 Number of unlabeled rooted trees with n vertices and more than two branches of the root.

Original entry on oeis.org

0, 0, 0, 1, 2, 5, 12, 30, 75, 194, 501, 1317, 3485, 9302, 24976, 67500, 183290, 500094, 1369939, 3766831, 10391722, 28756022, 79794407, 221987348, 619019808, 1729924110, 4844242273, 13590663071, 38195831829, 107523305566, 303148601795, 855922155734, 2419923253795
Offset: 1

Views

Author

Gus Wiseman, Jan 21 2020

Keywords

Examples

			The a(4) = 1 through a(7) = 12 rooted trees:
  (ooo)  (oooo)   (ooooo)    (oooooo)
         (oo(o))  (oo(oo))   (oo(ooo))
                  (ooo(o))   (ooo(oo))
                  (o(o)(o))  (oooo(o))
                  (oo((o)))  (o(o)(oo))
                             (oo((oo)))
                             (oo(o)(o))
                             (oo(o(o)))
                             (ooo((o)))
                             ((o)(o)(o))
                             (o(o)((o)))
                             (oo(((o))))
		

Crossrefs

The Matula-Goebel numbers of these trees are given by A033942.
The series-reduced case is A331488.
The lone-child-avoiding case is (also) A331488.
The labeled version is A331577.
Unlabeled rooted trees are counted by A000081.

Programs

  • Maple
    g:= proc(n, i, t) option remember; `if`(n=0, `if`(t=0, 1, 0),
          `if`(i<1, 0, add(binomial(g(i-1$2, 0)+j-1, j)*
             g(n-i*j, i-1, max(0, t-j)), j=0..n/i)))
        end:
    a:= n-> g(n-1$2, 3):
    seq(a(n), n=1..40);  # Alois P. Heinz, Jan 22 2020
  • Mathematica
    urt[n_]:=Join@@Table[Union[Sort/@Tuples[urt/@ptn]],{ptn,IntegerPartitions[n-1]}];
    Table[Length[Select[urt[n],Length[#]>2&]],{n,10}]
    (* Second program: *)
    g[n_, i_, t_] := g[n, i, t] = If[n == 0, If[t == 0, 1, 0],
         If[i < 1, 0, Sum[Binomial[g[i - 1, i - 1, 0] + j - 1, j]*
         g[n - i*j, i - 1, Max[0, t - j]], {j, 0, n/i}]]];
    a[n_] := g[n-1, n-1, 3];
    Array[a, 40] (* Jean-François Alcover, May 20 2021, after Alois P. Heinz *)
  • PARI
    \\ TreeGf gives gf of A000081.
    TreeGf(N)={my(A=vector(N, j, 1)); for (n=1, N-1, A[n+1] = 1/n * sum(k=1, n, sumdiv(k, d, d*A[d]) * A[n-k+1] ) ); x*Ser(A)}
    seq(n)={my(g=TreeGf(n)); Vec(g - x*(1 + g + (g^2 + subst(g, x, x^2))/2), -n)} \\ Andrew Howroyd, Jan 22 2020

Formula

For n > 1, a(n) = Sum_{k > 2} A033185(n - 1, k).
G.f.: f(x) - x*(1 + f(x) + (f(x)^2 + f(x^2))/2) where f(x) is the g.f. of A000081. - Andrew Howroyd, Jan 22 2020

A111087 Neither primes nor semiprimes.

Original entry on oeis.org

1, 8, 12, 16, 18, 20, 24, 27, 28, 30, 32, 36, 40, 42, 44, 45, 48, 50, 52, 54, 56, 60, 63, 64, 66, 68, 70, 72, 75, 76, 78, 80, 81, 84, 88, 90, 92, 96, 98, 99, 100, 102, 104, 105, 108, 110, 112, 114, 116, 117, 120, 124, 125, 126, 128, 130, 132, 135, 136, 138, 140, 144
Offset: 1

Views

Author

Noelle Clou (keynews.tv(AT)skynet.be), Oct 12 2005

Keywords

Comments

1 together with A033942.

Programs

  • Mathematica
    f[n_] := Plus @@ Last /@ FactorInteger[n]; Select[ Range[146], f[ # ] != 1 && f[ # ] != 2 &] (* Robert G. Wilson v *)
    Join[{1},Select[Range[200],PrimeOmega[#]>2&]] (* Harvey P. Dale, Mar 12 2018 *)
  • PARI
    is(n)=bigomega(n)>2 || n==1 \\ Charles R Greathouse IV, Nov 13 2016

Formula

a(n) = n + O(n log log n/log n). - Charles R Greathouse IV, Nov 13 2016

Extensions

More terms from Robert G. Wilson v, Oct 12 2005

A321516 Number of composite divisors of n that are < n.

Original entry on oeis.org

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

Views

Author

Felix Fröhlich, Nov 12 2018

Keywords

Comments

Different from A294902 (see A321517).
a(n) > 0 iff n is a term of A033942.

Examples

			For n = 24: The divisors of 24 are 1, 2, 3, 4, 6, 8, 12, 24. Four of those divisors, namely 4, 6, 8 and 12 are composite and < 24, so a(24) = 4.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Length[Select[Most[Divisors[n]], CompositeQ]]; Array[a, 87] (* Amiram Eldar, Nov 12 2018 *)
  • PARI
    a(n) = my(d=divisors(n), i=0); for(k=2, #d-1, if(!ispseudoprime(d[k]), i++)); i
    
  • PARI
    a(n) = sumdiv(n, d, (d1) && !isprime(d)); \\ Michel Marcus, Nov 12 2018

A330936 Number of nontrivial factorizations of n into factors > 1.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 3, 0, 2, 0, 2, 0, 0, 0, 5, 0, 0, 1, 2, 0, 3, 0, 5, 0, 0, 0, 7, 0, 0, 0, 5, 0, 3, 0, 2, 2, 0, 0, 10, 0, 2, 0, 2, 0, 5, 0, 5, 0, 0, 0, 9, 0, 0, 2, 9, 0, 3, 0, 2, 0, 3, 0, 14, 0, 0, 2, 2, 0, 3, 0, 10, 3, 0, 0, 9, 0, 0
Offset: 1

Views

Author

Gus Wiseman, Jan 04 2020

Keywords

Comments

The trivial factorizations of a number are (1) the case with only one factor, and (2) the factorization into prime numbers.

Examples

			The a(n) nontrivial factorizations of n = 8, 12, 16, 24, 36, 48, 60, 72:
  (2*4)  (2*6)  (2*8)    (3*8)    (4*9)    (6*8)      (2*30)    (8*9)
         (3*4)  (4*4)    (4*6)    (6*6)    (2*24)     (3*20)    (2*36)
                (2*2*4)  (2*12)   (2*18)   (3*16)     (4*15)    (3*24)
                         (2*2*6)  (3*12)   (4*12)     (5*12)    (4*18)
                         (2*3*4)  (2*2*9)  (2*3*8)    (6*10)    (6*12)
                                  (2*3*6)  (2*4*6)    (2*5*6)   (2*4*9)
                                  (3*3*4)  (3*4*4)    (3*4*5)   (2*6*6)
                                           (2*2*12)   (2*2*15)  (3*3*8)
                                           (2*2*2*6)  (2*3*10)  (3*4*6)
                                           (2*2*3*4)            (2*2*18)
                                                                (2*3*12)
                                                                (2*2*2*9)
                                                                (2*2*3*6)
                                                                (2*3*3*4)
		

Crossrefs

Positions of nonzero terms are A033942.
Positions of 1's are A030078.
Positions of 2's are A054753.
Nontrivial integer partitions are A007042.
Nontrivial set partitions are A008827.
Nontrivial divisors are A070824.

Programs

  • Mathematica
    facs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]];
    Table[Length[DeleteCases[Rest[facs[n]],{_}]],{n,100}]

Formula

For prime n, a(n) = 0; for nonprime n, a(n) = A001055(n) - 2.

A347709 Number of distinct rational numbers of the form x * z / y for some factorization x * y * z = n, 1 < x <= y <= z.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Oct 14 2021

Keywords

Comments

This is also the number of distinct possible alternating products of length-3 factorizations of n, where we define the alternating product of a sequence (y_1,...,y_k) to be Product_i y_i^((-1)^(i-1)), and where a factorization of n is a weakly increasing sequence of positive integers > 1 with product n.

Examples

			Representative factorizations for each of the a(360) = 9 alternating products:
   (2,2,90) -> 90
   (2,3,60) -> 40
   (2,4,45) -> 45/2
   (2,5,36) -> 72/5
   (2,6,30) -> 10
   (2,9,20) -> 40/9
  (2,10,18) -> 18/5
  (2,12,15) -> 5/2
   (3,8,15) -> 45/8
		

Crossrefs

Allowing factorizations of any length <= 3 gives A033273.
Positions of positive terms are A033942.
Positions of 0's are A037143.
The length-2 version is A072670.
Allowing any length gives A347460, reverse A038548.
Allowing any odd length gives A347708.
A001055 counts factorizations (strict A045778, ordered A074206).
A122179 counts length-3 factorizations.
A292886 counts knapsack factorizations, by sum A293627.
A301957 counts distinct subset-products of prime indices.
A304792 counts distinct subset-sums of partitions, positive A276024.

Programs

  • Mathematica
    facs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]];
    altprod[q_]:=Product[q[[i]]^(-1)^(i-1),{i,Length[q]}];
    Table[Length[Union[altprod/@Select[facs[n],Length[#]==3&]]],{n,100}]
  • PARI
    A347709(n) = { my(rats=List([])); fordiv(n,z,my(yx=n/z); fordiv(yx, y, my(x = yx/y); if((y <= z) && (x <= y) && (x > 1), listput(rats,x*z/y)))); #Set(rats); }; \\ Antti Karttunen, Jan 29 2025

Extensions

More terms from Antti Karttunen, Jan 29 2025

A367175 a(n) = Sum_{d|n} (-1)^[d is prime] * d, where [] denotes the Iverson bracket.

Original entry on oeis.org

1, -1, -2, 3, -4, 2, -6, 11, 7, 4, -10, 18, -12, 6, 8, 27, -16, 29, -18, 28, 12, 10, -22, 50, 21, 12, 34, 38, -28, 52, -30, 59, 20, 16, 24, 81, -36, 18, 24, 76, -40, 72, -42, 58, 62, 22, -46, 114, 43, 79, 32, 68, -52, 110, 40, 102, 36, 28, -58, 148, -60, 30
Offset: 1

Views

Author

Peter Luschny, Nov 08 2023

Keywords

Crossrefs

Programs

  • Maple
    Isprime := n -> if isprime(n) then 1 else 0 fi:
    a := n -> local d; add((-1)^Isprime(d) * d, d in NumberTheory:-Divisors(n)):
    seq(a(n), n = 1..62);
  • Mathematica
    Array[DivisorSum[#, (-1)^Boole[PrimeQ[#]]*# &] &, 62] (* Michael De Vlieger, Nov 10 2023 *)
  • PARI
    a(n) = sumdiv(n, d, (-1)^isprime(d)*d); \\ Michel Marcus, Nov 10 2023
    
  • Python
    from sympy import divisor_sigma, primefactors
    def A367175(n): return divisor_sigma(n)-(sum(primefactors(n))<<1) # Chai Wah Wu, Nov 10 2023
  • SageMath
    def A367175(n): return sum((-1)^is_prime(d)*d for d in divisors(n))
    print([A367175(n) for n in range(1, 63)])
    

Formula

{k: a(k) < 0} = {A000040}.
{k: a(k) > k} = {A033942}.
{k: a(k) < k} = {A037143} \ {1}.
sigma(n) - a(n) = 2 * A008472(n).
Conjecture: {k: a(k) divides sigma(k)} = {1, 2, 3, 6, 14, 15, 35}.
Previous Showing 21-30 of 36 results. Next