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

A264752 First differences of A106543.

Original entry on oeis.org

4, 2, 2, 1, 3, 2, 1, 1, 2, 2, 2, 2, 3, 1, 1, 3, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 1, 2, 2, 1, 2, 1, 2, 1, 1, 2, 2, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 3, 2, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 3, 1, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1
Offset: 1

Views

Author

Gionata Neri, Jul 10 2016

Keywords

Comments

It is conjectured that, for n > 1, a(n) < 4.

Crossrefs

A323302 Number of ways to arrange the parts of the integer partition with Heinz number n into a matrix with equal row-sums and equal column-sums.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jan 13 2019

Keywords

Comments

The Heinz number of an integer partition (y_1, ..., y_k) is prime(y_1) * ... * prime(y_k).

Examples

			The a(900) = 12 matrix-arrangements of (3,3,2,2,1,1):
  [1 2 3] [1 3 2] [2 1 3] [2 3 1] [3 1 2] [3 2 1]
  [3 2 1] [3 1 2] [2 3 1] [2 1 3] [1 3 2] [1 2 3]
.
  [1 3] [1 3] [2 2] [2 2] [3 1] [3 1]
  [2 2] [3 1] [1 3] [3 1] [1 3] [2 2]
  [3 1] [2 2] [3 1] [1 3] [2 2] [1 3]
		

Crossrefs

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    facs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]];
    ptnmats[n_]:=Union@@Permutations/@Select[Union@@(Tuples[Permutations/@#]&/@Map[primeMS,facs[n],{2}]),SameQ@@Length/@#&];
    Table[Length[Select[ptnmats[n],And[SameQ@@Total/@#,SameQ@@Total/@Transpose[#]]&]],{n,100}]

A323304 Heinz numbers of integer partitions that cannot be arranged into a matrix with equal row-sums and equal column-sums.

Original entry on oeis.org

6, 10, 12, 14, 15, 18, 20, 21, 22, 24, 26, 28, 30, 33, 34, 35, 38, 39, 40, 42, 44, 45, 46, 48, 50, 51, 52, 54, 55, 56, 57, 58, 60, 62, 63, 65, 66, 68, 69, 70, 72, 74, 75, 76, 77, 78, 80, 82, 84, 85, 86, 87, 88, 90, 91, 92, 93, 94, 95, 96, 98, 99, 102, 104, 105
Offset: 1

Views

Author

Gus Wiseman, Jan 13 2019

Keywords

Comments

The first term of this sequence absent from A106543 is 144.
The Heinz number of an integer partition (y_1, ..., y_k) is prime(y_1) * ... * prime(y_k).

Crossrefs

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    facs[n_]:=If[n<=1,{{}},Join@@Table[Map[Prepend[#,d]&,Select[facs[n/d],Min@@#>=d&]],{d,Rest[Divisors[n]]}]];
    ptnmats[n_]:=Union@@Permutations/@Select[Union@@(Tuples[Permutations/@#]&/@Map[primeMS,facs[n],{2}]),SameQ@@Length/@#&];
    Select[Range[2,1000],Select[ptnmats[#],And[SameQ@@Total/@#,SameQ@@Total/@Transpose[#]]&]=={}&]

A385410 Multiples k of b that are not perfect powers and whose trailing digits form a power of b, where 1 < b < k.

Original entry on oeis.org

12, 14, 15, 18, 21, 22, 24, 28, 33, 34, 35, 38, 39, 42, 44, 45, 48, 51, 52, 54, 55, 58, 62, 63, 65, 66, 68, 69, 72, 74, 75, 77, 78, 82, 84, 85, 88, 91, 92, 93, 94, 95, 96, 98, 99, 102, 104, 105, 108, 110, 111, 112, 114, 115, 116, 118, 120, 122, 123, 124, 126, 129
Offset: 1

Views

Author

Keywords

Examples

			In general, no prime p is a term since they are a power of base p.
Numbers having a single digit are not terms:
  1 is not a term since 1 is a power of all bases b;
  Composites 4, 6, and 9 are not in the sequence since 4 = 2^2, 6 = 2*3, and 9 = 3^2.
10 is not a term since it ends in a single zero, and zero is not a power of another number.
a(1) = 12 since it is not a perfect power, 2 | 12, and 12 mod 10 is a power of 2.
a(2) = 14 since it is not a perfect power, 2 | 14, and 14 mod 10 is a power of 2.
20 is not a term since it ends with a zero, and zero is not a power of another number.
26 is not a term since 6 does not divide 26.
1100 is a term since it is not a perfect power, 100 = 100^1, and 100 | 1100.
		

Crossrefs

Subset of A002808, A007916, and A106543.

Programs

  • Mathematica
    nn = 130; t = Union@ Flatten@ Table[m = 10^IntegerLength[b] + b; If[m > nn, Nothing, s = b^Range[0, Floor@ Log[b, nn]]; Flatten@ Reap[Map[(w = IntegerDigits[#]; i = 0; While[Set[k, FromDigits@ Join[IntegerDigits[i], w]] <= nn, If[And[Divisible[k, b], FreeQ[s, k]], Sow[k]]; i++]) &, s] ][[-1]]], {b, 2, nn}]; Select[t, GCD @@ FactorInteger[#][[;; , -1]] === 1 &]

A248020 Numbers which are coprime to the sum of their divisors, but are neither primes nor perfect powers.

Original entry on oeis.org

21, 35, 39, 50, 55, 57, 63, 65, 75, 77, 85, 93, 98, 111, 115, 119, 129, 133, 143, 155, 161, 171, 175, 183, 185, 187, 189, 201, 203, 205, 209, 215, 217, 219, 221, 235, 237, 242, 245, 247, 253, 259, 265, 275, 279, 291, 299, 301, 305, 309, 319, 323, 325, 327, 329, 333, 335, 338, 341
Offset: 1

Views

Author

Robert G. Wilson v, Sep 29 2014

Keywords

Comments

Intersection of A003624 and A106543. - Michel Marcus, Sep 30 2014
Duffinian numbers (A003624) which are not perfect powers (A001597). - Robert G. Wilson v, Oct 02 2014

Examples

			21 is in the sequence since it is neither a prime nor a powerful number and its divisors 1, 3, 7, and 21 sum to 32, which is coprime to 21.
50 is in the sequence since it is neither a prime nor a powerful number and its divisors 1, 2, 5, 10, 25, and 50 sum to 93, which is coprime to 50.
		

Programs

  • Mathematica
    perfectPowerQ[n_] := n == 1 || GCD @@ FactorInteger[n][[All, 2]] > 1; Select[ Range@ 350, !PrimeQ[ #] && GCD[#, DivisorSigma[1, #]] == 1 && !perfectPowerQ[ #] &]
    cpQ[n_]:=CoprimeQ[n,DivisorSigma[1,n]]&&!PrimeQ[n]&&GCD@@ FactorInteger[ n][[All,2]]<2; Select[Range[2,400],cpQ] (* Harvey P. Dale, Oct 05 2020 *)
  • PARI
    forcomposite(n=1, 1e3, if(gcd(n, sigma(n))==1, if(!ispower(n), print1(n, ", ")))) \\ Felix Fröhlich, Oct 25 2014

A377043 The n-th perfect-power A001597(n) minus the n-th power of a prime A000961(n).

Original entry on oeis.org

0, 2, 5, 5, 11, 18, 19, 23, 25, 36, 48, 64, 81, 98, 100, 101, 115, 138, 164, 179, 184, 200, 209, 240, 271, 284, 300, 336, 374, 413, 439, 450, 495, 542, 587, 632, 683, 738, 793, 852, 887, 903, 964, 1029, 1097, 1165, 1194, 1230, 1295, 1370, 1443, 1518, 1561
Offset: 1

Views

Author

Gus Wiseman, Oct 25 2024

Keywords

Comments

Perfect-powers (A001597) are numbers with a proper integer root.

Crossrefs

Excluding 1 from the powers of primes gives A377044.
A000015 gives the least prime-power >= n.
A031218 gives the greatest prime-power <= n.
A000040 lists the primes, differences A001223.
A000961 lists the powers of primes, differences A057820.
A001597 lists the perfect-powers, differences A053289, seconds A376559.
A007916 lists the non-perfect-powers, differences A375706, seconds A376562.
A024619 lists the non-prime-powers, differences A375735, seconds A376599.
A025475 lists numbers that are both a perfect-power and a prime-power.
A080101 counts prime-powers between primes (exclusive).
A106543 lists numbers that are neither a perfect-power nor a prime-power.
A131605 lists perfect-powers that are not prime-powers.
A246655 lists the prime-powers, complement A361102 (differences A375708).
Prime-power runs: A373675, min A373673, max A373674, length A174965.
Prime-power antiruns: A373576, min A120430, max A006549, length A373671.

Programs

  • Mathematica
    perpowQ[n_]:=n==1||GCD@@FactorInteger[n][[All,2]]>1;
    per=Select[Range[1000],perpowQ];
    per-NestList[NestWhile[#+1&,#+1,!PrimePowerQ[#]&]&,1,Length[per]-1]
  • Python
    from sympy import mobius, primepi, integer_nthroot
    def A377043(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x): return int(n-1+x+sum(mobius(k)*(integer_nthroot(x,k)[0]-1) for k in range(2,x.bit_length())))
        def g(x): return int(n-1+x-sum(primepi(integer_nthroot(x,k)[0]) for k in range(1,x.bit_length())))
        return bisection(f,n,n)-bisection(g,n,n) # Chai Wah Wu, Oct 27 2024

Formula

a(n) = A001597(n) - A000961(n).

A377044 The n-th perfect-power A001597(n) minus the n-th prime-power A246655(n).

Original entry on oeis.org

-1, 1, 4, 4, 9, 17, 18, 21, 23, 33, 47, 62, 77, 96, 98, 99, 113, 137, 159, 175, 182, 196, 207, 236, 265, 282, 297, 333, 370, 411, 433, 448, 493, 536, 579, 628, 681, 734, 791, 848, 879, 899, 962, 1028, 1094, 1159, 1192, 1220, 1293, 1364, 1437, 1514, 1559, 1591
Offset: 1

Views

Author

Gus Wiseman, Oct 25 2024

Keywords

Comments

Perfect-powers (A001597) are numbers with a proper integer root.

Crossrefs

Including 1 with the prime-powers gives A377043.
A000015 gives the least prime-power >= n.
A000040 lists the primes, differences A001223.
A000961 lists the powers of primes, differences A057820, A093555, A376596.
A001597 lists the perfect-powers, differences A053289, seconds A376559.
A007916 lists the non-perfect-powers, differences A375706, seconds A376562.
A024619 lists the non-prime-powers, differences A375735, seconds A376599.
A025475 lists numbers that are both a perfect-power and a prime-power.
A031218 gives the greatest prime-power <= n.
A080101 counts prime-powers between primes (exclusive).
A106543 lists numbers that are neither a perfect-power nor a prime-power.
A131605 lists perfect-powers that are not prime-powers.
A246655 lists the prime-powers, complement A361102, A375708.
Prime-power runs: A373675, min A373673, max A373674, length A174965.
Prime-power antiruns: A373576, min A120430, max A006549, length A373671.

Programs

  • Mathematica
    perpowQ[n_]:=n==1||GCD@@FactorInteger[n][[All,2]]>1;
    per=Select[Range[1000],perpowQ];
    per-NestList[NestWhile[#+1&, #+1,!PrimePowerQ[#]&]&,2,Length[per]-1]
  • Python
    from sympy import mobius, primepi, integer_nthroot
    def A377044(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x): return int(n-1+x+sum(mobius(k)*(integer_nthroot(x,k)[0]-1) for k in range(2,x.bit_length())))
        def g(x): return int(n+x-sum(primepi(integer_nthroot(x,k)[0]) for k in range(1,x.bit_length())))
        return bisection(f,n,n)-bisection(g,n,n) # Chai Wah Wu, Oct 27 2024

Formula

a(n) = A001597(n) - A246655(n).

A378614 Number of composite numbers (A002808) between consecutive perfect powers (A001597), exclusive.

Original entry on oeis.org

0, 1, 0, 4, 5, 1, 2, 3, 8, 11, 12, 15, 15, 3, 1, 12, 19, 21, 16, 7, 12, 11, 25, 29, 16, 13, 32, 33, 35, 22, 14, 40, 39, 42, 45, 46, 47, 50, 52, 32, 19, 55, 56, 59, 60, 27, 35, 65, 64, 67, 68, 40, 30, 75, 74, 77, 19, 57, 62, 9, 9, 81, 81, 88, 89, 87, 32, 55, 94
Offset: 1

Views

Author

Gus Wiseman, Dec 02 2024

Keywords

Comments

The inclusive version is a(n) + 2.

Examples

			The composite numbers counted by a(n) cover A106543 with the following disjoint sets:
  .
  6
  .
  10 12 14 15
  18 20 21 22 24
  26
  28 30
  33 34 35
  38 39 40 42 44 45 46 48
  50 51 52 54 55 56 57 58 60 62 63
		

Crossrefs

For prime instead of perfect power we have A046933.
For prime instead of composite we have A080769.
For nonsquarefree instead of perfect power we have A378373, for primes A236575.
For nonprime prime power instead of perfect power we have A378456.
A001597 lists the perfect powers, differences A053289.
A002808 lists the composite numbers.
A007916 lists the non perfect powers, differences A375706.
A069623 counts perfect powers <= n.
A076411 counts perfect powers < n.
A106543 lists the composite non perfect powers.
A377432 counts perfect powers between primes, see A377434, A377436, A377466.
A378365 gives the least prime > each perfect power, opposite A377283.

Programs

  • Mathematica
    perpowQ[n_]:=n==1||GCD@@FactorInteger[n][[All,2]]>1;
    v=Select[Range[100],perpowQ[#]&];
    Table[Length[Select[Range[v[[i]]+1,v[[i+1]]-1],CompositeQ]],{i,Length[v]-1}]
  • Python
    from sympy import mobius, integer_nthroot, primepi
    def A378614(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x): return int(n+x-1+sum(mobius(k)*(integer_nthroot(x,k)[0]-1) for k in range(2,x.bit_length())))
        return -(a:=bisection(f,n,n))+(b:=bisection(lambda x:f(x)+1,a+1,a+1))-primepi(b)+primepi(a)-1 # Chai Wah Wu, Dec 03 2024

A248023 Even numbers which are neither primes nor perfect powers and are coprime to the sum of their divisors.

Original entry on oeis.org

50, 98, 242, 338, 392, 578, 722, 800, 968, 1058, 1250, 1352, 1682, 1922, 2312, 2450, 2738, 2888, 3362, 3698, 3872, 4232, 4418, 4802, 5408, 5618, 6050, 6272, 6728, 6962, 7442, 7688, 8450, 8978, 9248, 10082, 10658, 10952, 11552, 12482, 12800, 13448, 13778, 14450
Offset: 1

Views

Author

Robert G. Wilson v, Sep 29 2014

Keywords

Examples

			50 is in the sequence since it is neither a prime nor a powerful number and its divisors 1, 2, 5, 10, 25, and 50 sum to 93, which is coprime to 50.
		

Crossrefs

Programs

  • Mathematica
    perfectPowerQ[n_] := n == 1 || GCD @@ FactorInteger[n][[All, 2]] > 1; Select[ 2 Range@ 7500, !PrimeQ[ #] && GCD[#, DivisorSigma[1, #]] == 1 && !perfectPowerQ[ #] &]
  • PARI
    lista(nn) = {forstep(n=4, nn, 2, if (!ispower(n) && (gcd(n, sigma(n))==1), print1(n, ", ")););} \\ Michel Marcus, Oct 02 2014

A302555 Maximal degree x for hyperoperated representation of n = a[x]b.

Original entry on oeis.org

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

Views

Author

Natan Arie Consigli, Jul 08 2018

Keywords

Comments

Any nonnegative number can be decomposed in the following way: n = a[x]b, where the brackets denote the box notation of hyperoperation.
In this sequence we take the maximal value x where the above equation is satisfied for any nonnegative a and any nonnegative nonidentity element b.
If n can be circulated (n = a[+oo]b, with nonidentity element b) then a(n)=0. An identity element b is a number where we would have the trivial decomposition a[x]b = a, for some x for any a. If x=1 (addition) the identity element is b=0. If x > 1 (multiplication, exponentiation, tetration, pentation, etc.) the identity element is b=1. If n is prime, a(n)=1 because there's no x > 1 such that a[x]b = n and b > 1. If n is composite but not a nontrivial power then a(n)=2, because there would be no x > 2 such that a[x]b = n and b > 1. If n is a power but not a nontrivial hyper-4 power then a(n)=3, because there would be no x > 3 such that a[x]b = n and b > 1. If n is a hyper-4 power but not a nontrivial hyper-5 power then a(n)=3, because there would be no x > 4 such that a[x]b = n and b > 1. And so on.

Examples

			a(0) = 0 because 0[+oo]n = 0.
a(1) = 0 because 1[+oo]n = 1.
a(4) = 0 because 2[+oo]2 = 4.
a(2) = 1 because 2 is prime.
a(6) = 2 because 6 is composite but not a power.
a(9) = 3 because 9 is a power but not a hyper-4 power.
a(27) = 4 because 27 is a hyper-4 power but not a hyper-5 power.
a(65536) = 5 because 65536 is a hyper-5 power but not a hyper-6 power.
...
		

Crossrefs

Formula

a(n) = 0 if n is 0, 1 or 4.
a(n) = 1 if n is in A000040 (the primes).
a(n) = 2 if n is in A106543 (non-powered composites).
a(n) = 3 if n is in A302554 (non-hyper-4 power powers).
a(n) = 4 if n is in A302553 (non-hyper-5 power hyper-4 powers).
...
Showing 1-10 of 13 results. Next