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

A072774 Powers of squarefree numbers.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 19, 21, 22, 23, 25, 26, 27, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 46, 47, 49, 51, 53, 55, 57, 58, 59, 61, 62, 64, 65, 66, 67, 69, 70, 71, 73, 74, 77, 78, 79, 81, 82, 83, 85, 86, 87, 89, 91, 93, 94, 95, 97
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 10 2002

Keywords

Comments

Essentially the same as A062770. - R. J. Mathar, Sep 25 2008
Numbers m such that in canonical prime factorization all prime exponents are identical: A124010(m,k) = A124010(m,1) for k = 2..A000005(m). - Reinhard Zumkeller, Apr 06 2014
Heinz numbers of uniform partitions. An integer partition is uniform if all parts appear with the same multiplicity. The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k). - Gus Wiseman, Apr 16 2018

Crossrefs

Complement of A059404.
Cf. A072775, A072776, A072777 (subsequence), A005117, A072778, A124010, A329332 (tabular arrangement), A384667 (characteristic function).
A subsequence of A242414.

Programs

  • Haskell
    import Data.Map (empty, findMin, deleteMin, insert)
    import qualified Data.Map.Lazy as Map (null)
    a072774 n = a072774_list !! (n-1)
    (a072774_list, a072775_list, a072776_list) = unzip3 $
       (1, 1, 1) : f (tail a005117_list) empty where
       f vs'@(v:vs) m
        | Map.null m || xx > v = (v, v, 1) :
                                 f vs (insert (v^2) (v, 2) m)
        | otherwise = (xx, bx, ex) :
                      f vs' (insert (bx*xx) (bx, ex+1) $ deleteMin m)
        where (xx, (bx, ex)) = findMin m
    -- Reinhard Zumkeller, Apr 06 2014
    
  • Maple
    isA := n -> n=1 or is(1 = nops({seq(p[2], p in ifactors(n)[2])})):
    select(isA, [seq(1..97)]);  # Peter Luschny, Jun 10 2025
  • Mathematica
    Select[Range[100], Length[Union[FactorInteger[#][[All, 2]]]] == 1 &] (* Geoffrey Critzer, Mar 30 2015 *)
  • PARI
    is(n)=ispower(n,,&n); issquarefree(n) \\ Charles R Greathouse IV, Oct 16 2015
    
  • Python
    from math import isqrt
    from sympy import mobius, integer_nthroot
    def A072774(n):
        def g(x): return int(sum(mobius(k)*(x//k**2) for k in range(1, isqrt(x)+1)))-1
        def f(x): return n-2+x-sum(g(integer_nthroot(x,k)[0]) for k in range(1,x.bit_length()))
        kmin, kmax = 1,2
        while f(kmax) >= kmax:
            kmax <<= 1
        while True:
            kmid = kmax+kmin>>1
            if f(kmid) < kmid:
                kmax = kmid
            else:
                kmin = kmid
            if kmax-kmin <= 1:
                break
        return kmax # Chai Wah Wu, Aug 19 2024

Formula

a(n) = A072775(n)^A072776(n).
Sum_{n>=1} 1/a(n)^s = 1 + Sum_{k>=1} (zeta(k*s)/zeta(2*k*s)-1) for s > 1. - Amiram Eldar, Mar 20 2025
a(n)/n ~ Pi^2/6 (A013661). - Friedjof Tellkamp, Jun 09 2025

A304711 Heinz numbers of integer partitions whose distinct parts are pairwise coprime.

Original entry on oeis.org

2, 4, 6, 8, 10, 12, 14, 15, 16, 18, 20, 22, 24, 26, 28, 30, 32, 33, 34, 35, 36, 38, 40, 44, 45, 46, 48, 50, 51, 52, 54, 55, 56, 58, 60, 62, 64, 66, 68, 69, 70, 72, 74, 75, 76, 77, 80, 82, 85, 86, 88, 90, 92, 93, 94, 95, 96, 98, 99, 100, 102, 104, 106, 108, 110
Offset: 1

Views

Author

Gus Wiseman, May 17 2018

Keywords

Comments

Two parts are coprime if they have no common divisor greater than 1. For partitions of length 1 note that (1) is coprime but (x) is not coprime for x > 1.
First differs from A289509 at a(24) = 44, A289509(24) = 42.

Examples

			Sequence of all partitions whose distinct parts are pairwise coprime begins (1), (11), (21), (111), (31), (211), (41), (32), (1111), (221), (311), (51), (2111), (61), (411), (321), (11111), (52), (71), (43), (2211), (81), (3111).
		

Crossrefs

Programs

  • Mathematica
    Select[Range[200],CoprimeQ@@PrimePi/@FactorInteger[#][[All,1]]&]

A303140 Number of strict integer partitions of n with at least two but not all parts having a common divisor greater than 1.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 1, 0, 2, 2, 4, 2, 8, 7, 14, 14, 21, 18, 33, 32, 50, 54, 72, 67, 103, 110, 145, 155, 201, 196, 271, 293, 372, 400, 493, 512, 647, 704, 858, 924, 1115, 1167, 1436, 1560, 1854, 2022, 2368, 2510, 3005, 3255, 3804, 4144, 4792, 5116, 5989, 6514, 7486
Offset: 1

Views

Author

Gus Wiseman, Apr 19 2018

Keywords

Examples

			The a(14) = 7 partitions are (932), (8321), (7421), (653), (6521), (6431), (5432).
		

Crossrefs

Programs

  • Mathematica
    Table[Select[IntegerPartitions[n],UnsameQ@@#&&!CoprimeQ@@#&&GCD@@#===1&]//Length,{n,20}]

A303282 Numbers whose prime indices have no common divisor other than 1 but are not pairwise coprime.

Original entry on oeis.org

18, 36, 42, 45, 50, 54, 72, 75, 78, 84, 90, 98, 99, 100, 105, 108, 114, 126, 130, 135, 144, 150, 153, 156, 162, 168, 174, 175, 180, 182, 195, 196, 198, 200, 207, 210, 216, 222, 225, 228, 230, 231, 234, 242, 245, 250, 252, 258, 260, 266, 270, 275, 279, 285, 288
Offset: 1

Views

Author

Gus Wiseman, Apr 20 2018

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. Two or more numbers are coprime if no pair of them has a common divisor other than 1.
The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k).

Examples

			The sequence of integer partitions whose Heinz numbers belong to this sequence begins (221), (2211), (421), (322), (331), (2221), (22111), (332), (621), (4211), (3221), (441), (522), (3311), (432), (22211).
		

Crossrefs

Programs

  • Mathematica
    primeMS[n_]:=If[n===1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Select[Range[400],!CoprimeQ@@primeMS[#]&&GCD@@primeMS[#]===1&]

A304712 Number of integer partitions of n whose parts are all equal or whose distinct parts are pairwise coprime.

Original entry on oeis.org

1, 1, 2, 3, 5, 7, 10, 14, 19, 25, 32, 43, 54, 70, 86, 105, 130, 162, 196, 240, 286, 339, 405, 485, 573, 674, 790, 922, 1072, 1252, 1456, 1685, 1939, 2226, 2557, 2923, 3349, 3822, 4347, 4931, 5593, 6335, 7170, 8092, 9105, 10233, 11495, 12903, 14458, 16169, 18063
Offset: 0

Views

Author

Gus Wiseman, May 17 2018

Keywords

Comments

Two parts are coprime if they have no common divisor greater than 1.

Examples

			The a(6) = 10 partitions whose parts are all equal or whose distinct parts are pairwise coprime are (6), (51), (411), (33), (321), (3111), (222), (2211), (21111), (111111).
		

Crossrefs

Programs

  • Maple
    g:= proc(n, i, s) `if`(n=0, 1, `if`(i<1, 0,
          b(n, i, select(x-> x<=i, s))))
        end:
    b:= proc(n, i, s) option remember; g(n, i-1, s)+(f->
         `if`(f intersect s={}, add(g(n-i*j, i-1, s union f)
            , j=1..n/i), 0))(numtheory[factorset](i))
        end:
    a:= n-> g(n$2, {}):
    seq(a(n), n=0..60);  # Alois P. Heinz, May 17 2018
  • Mathematica
    Table[Select[IntegerPartitions[n],Or[SameQ@@#,CoprimeQ@@Union[#]]&]//Length,{n,20}]
    (* Second program: *)
    g[n_, i_, s_] := If[n == 0, 1, If[i < 1, 0, b[n, i, Select[s, # <= i &]]]];
    b[n_, i_, s_] := b[n, i, s] = g[n, i - 1, s] + Function[f,
         If[f ~Intersection~ s == {}, Sum[g[n - i*j, i - 1, s ~Union~ f],
         {j, 1, n/i}], 0]][FactorInteger[i][[All, 1]]];
    a[n_] := g[n, n, {}];
    a /@ Range[0, 60] (* Jean-François Alcover, May 10 2021, after Alois P. Heinz *)

A303139 Number of integer partitions of n with at least two but not all parts having a common divisor greater than 1.

Original entry on oeis.org

0, 0, 0, 0, 1, 1, 5, 6, 13, 17, 33, 37, 68, 82, 125, 159, 237, 278, 409, 491, 674, 830, 1121, 1329, 1781, 2144, 2770, 3345, 4299, 5086, 6507, 7752, 9687, 11571, 14378, 16985, 21039, 24876, 30379, 35924, 43734, 51320, 62238, 73068, 87747, 103021, 123347, 143955
Offset: 1

Views

Author

Gus Wiseman, Apr 19 2018

Keywords

Examples

			The a(7) = 5 partitions are (421), (331), (322), (2221), (22111).
		

Crossrefs

Programs

  • Mathematica
    Table[Select[IntegerPartitions[n],!CoprimeQ@@#&&GCD@@#===1&]//Length,{n,30}]

A303280 Number of strict integer partitions of n whose parts have a common divisor other than 1.

Original entry on oeis.org

0, 1, 1, 1, 1, 2, 1, 2, 2, 3, 1, 5, 1, 5, 4, 6, 1, 10, 1, 11, 6, 12, 1, 19, 3, 18, 8, 23, 1, 36, 1, 32, 13, 38, 7, 57, 1, 54, 19, 68, 1, 95, 1, 90, 33, 104, 1, 148, 5, 149, 39, 166, 1, 230, 14, 226, 55, 256, 1, 360, 1, 340, 82, 390, 20, 527, 1, 513, 105, 609, 1
Offset: 1

Views

Author

Gus Wiseman, Apr 20 2018

Keywords

Examples

			The a(18) = 10 strict partitions are (18), (10,8), (12,6), (14,4), (15,3), (16,2), (8,6,4), (9,6,3), (10,6,2), (12,4,2).
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    b:= proc(n) option remember; `if`(n=0, 1, add(add(
          `if`(d::odd, d, 0), d=divisors(j))*b(n-j), j=1..n)/n)
        end:
    a:= n-> -add(mobius(d)*b(n/d), d=divisors(n) minus {1}):
    seq(a(n), n=1..100);  # Alois P. Heinz, Apr 23 2018
  • Mathematica
    Table[-Sum[MoebiusMu[d]*PartitionsQ[n/d],{d,Rest[Divisors[n]]}],{n,100}]

Formula

a(n) = -Sum_{d|n, d > 1} mu(d) * A000009(n/d).

A303283 Squarefree numbers whose prime indices have no common divisor other than 1 but are not pairwise coprime.

Original entry on oeis.org

42, 78, 105, 114, 130, 174, 182, 195, 210, 222, 230, 231, 258, 266, 285, 318, 345, 357, 366, 370, 390, 406, 426, 429, 435, 455, 462, 470, 474, 483, 494, 518, 534, 546, 555, 570, 598, 602, 606, 610, 627, 638, 642, 645, 651, 663, 665, 678, 690, 705, 714, 715
Offset: 1

Views

Author

Gus Wiseman, Apr 20 2018

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. Two or more numbers are coprime if no pair of them has a common divisor other than 1.
The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k).

Examples

			The sequence of strict integer partitions whose Heinz numbers belong to this sequence begins (4,2,1), (6,2,1), (4,3,2), (8,2,1), (6,3,1), (10,2,1), (6,4,1), (6,3,2), (4,3,2,1), (12,2,1), (9,3,1), (5,4,2), (14,2,1), (8,4,1), (8,3,2), (16,2,1), (9,3,2), (7,4,2), (18,2,1), (12,3,1), (6,3,2,1).
		

Crossrefs

Programs

  • Mathematica
    primeMS[n_]:=If[n===1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Select[Range[400],SquareFreeQ[#]&&!CoprimeQ@@primeMS[#]&&GCD@@primeMS[#]===1&]

A303138 Regular triangle where T(n,k) is the number of strict integer partitions of n with greatest common divisor k.

Original entry on oeis.org

1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 2, 0, 0, 0, 1, 2, 1, 0, 0, 0, 1, 4, 0, 0, 0, 0, 0, 1, 4, 1, 0, 0, 0, 0, 0, 1, 6, 0, 1, 0, 0, 0, 0, 0, 1, 7, 2, 0, 0, 0, 0, 0, 0, 0, 1, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 10, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 17, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 23, 0, 2, 0, 1
Offset: 1

Views

Author

Gus Wiseman, Apr 19 2018

Keywords

Examples

			Triangle begins:
01:   1
02:   0  1
03:   1  0  1
04:   1  0  0  1
05:   2  0  0  0  1
06:   2  1  0  0  0  1
07:   4  0  0  0  0  0  1
08:   4  1  0  0  0  0  0  1
09:   6  0  1  0  0  0  0  0  1
10:   7  2  0  0  0  0  0  0  0  1
11:  11  0  0  0  0  0  0  0  0  0  1
12:  10  2  1  1  0  0  0  0  0  0  0  1
13:  17  0  0  0  0  0  0  0  0  0  0  0  1
14:  17  4  0  0  0  0  0  0  0  0  0  0  0  1
15:  23  0  2  0  1  0  0  0  0  0  0  0  0  0  1
The strict partitions counted in row 12 are the following.
T(12,1) = 10: (11,1) (9,2,1) (8,3,1) (7,5) (7,4,1) (7,3,2) (6,5,1) (6,3,2,1) (5,4,3) (5,4,2,1)
T(12,2) = 2:  (10,2) (6,4,2)
T(12,3) = 1:  (9,3)
T(12,4) = 1:  (8,4)
T(12,12) = 1: (12)
		

Crossrefs

First column is A078374. Second column at even indices is same as first column. Row sums are A000009. Row sums with first column removed are A303280.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],UnsameQ@@#&&GCD@@#===k&]],{n,15},{k,n}]

Formula

If k divides n, T(n,k) = A078374(n/k); otherwise T(n,k) = 0.

A320424 Number of set partitions of {1,...,n} where each block's elements are relatively prime.

Original entry on oeis.org

1, 1, 1, 2, 4, 13, 31, 140, 480, 2306, 9179, 58209, 249205, 1802970, 9463155, 63813439, 389176317, 3415876088, 20506436732, 195865505549, 1353967583125, 12006363947433, 93067012435816, 1019489483393439, 7779097711766093, 86684751695545733, 766357409555622203
Offset: 0

Views

Author

Gus Wiseman, Jan 08 2019

Keywords

Comments

Two or more numbers are relatively prime if they have no common divisor > 1. A single number is not considered to be relatively prime unless it is equal to 1.

Examples

			The a(5) = 13 set partitions:
  {{1},{2,3},{4,5}}
  {{1},{2,5},{3,4}}
   {{1},{2,3,4,5}}
   {{1,2},{3,4,5}}
   {{1,3},{2,4,5}}
   {{1,4},{2,3,5}}
   {{1,5},{2,3,4}}
   {{1,2,3},{4,5}}
   {{1,2,4},{3,5}}
   {{1,2,5},{3,4}}
   {{1,3,4},{2,5}}
   {{1,4,5},{2,3}}
    {{1,2,3,4,5}}
For example, {{1},{2,5},{3,4}} belongs to the list because {1} is relatively prime, {2,5} is relatively prime, and {3,4} is relatively prime. On the other hand, {{1},{2,4},{3,5}} is missing from the list because {2,4} is not relatively prime.
		

Crossrefs

Programs

  • Mathematica
    sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
    Table[Length[Select[sps[Range[n]],And@@(GCD@@#==1&/@#)&]],{n,10}]
  • PARI
    lista(nn) = my(m, t=Mat([[], 1]), v, w, z); print1(1); for(n=1, nn, m=Map(); for(i=1, #t~, v=t[i, 1]; if(n-2+sum(j=1, #v, v[j]>1)Jinyuan Wang, Mar 02 2025

Extensions

a(13)-a(23) from Alois P. Heinz, Jan 08 2019
a(24)-a(26) from Jinyuan Wang, Mar 02 2025
Showing 1-10 of 16 results. Next