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 51-59 of 59 results.

A216766 Numerators of partial sums of 1/A216765(n).

Original entry on oeis.org

1, 14, 37, 719, 5056, 151513, 1759463, 68163191, 352149277, 360867217, 15078888947, 1546201093747, 95491548878617, 10736398220663, 1400899861968427, 41036431877859203, 41386424246755373, 8212624279323157381, 256265816149636840711, 29139716513641120366493
Offset: 1

Views

Author

Jonathan Vos Post, Sep 15 2012

Keywords

Comments

Partial sums of the reciprocals of (perfect powers -- squares, cubes, etc. -- plus 1).

Examples

			The partial sums are of the sequence of fractions: 1/5 + 1/9 + 1/10 + 1/17 + 1/26 + 1/28 + 1/33 + 1/37 + 1/50, ... and thus the partial sums are 1/5, 14/45, 37/90, 719/1530, 5056/9995, 151513/278460, 1759463/3063060, 68163191/113333220, 352149277/566666100, 360867217/566666100, 15078888947/23233310100, ...
		

Crossrefs

Programs

  • Mathematica
    Numerator[FoldList[Plus, 1/(1 + Select[Range[250], GCD @@ FactorInteger[#][[;; , 2]] > 1 &])]] (* Amiram Eldar, May 05 2022 *)

Formula

a(n) = numerator(Sum_{k=1..n} 1/A216765(k)).
Limit_{n->oo} a(n)/A216767(n) = Pi^2/3 - 5/2. - Amiram Eldar, May 05 2022

A216767 Denominators of partial sums of 1/A216765(n).

Original entry on oeis.org

5, 45, 90, 1530, 9945, 278460, 3063060, 113333220, 566666100, 566666100, 23233310100, 2346564320100, 143140423526100, 15904491502900, 2051679403874100, 59498702712348900, 59498702712348900, 11721244434332733300, 363358577464314732300
Offset: 1

Views

Author

Jonathan Vos Post, Sep 16 2012

Keywords

Comments

A216766 is the numerators of the partial sums of 1/A216765(n).

Examples

			 The partial sums are of the sequence of fractions: 1/5 + 1/9 + 1/10 + 1/17 + 1/26 + 1/28 + 1/33 + 1/37 + 1/50, ... and thus the partial sums are 1/5, 14/45, 37/90, 719/1530, 5056/9995, 151513/278460, 1759463/3063060, 68163191/113333220, 352149277/566666100, 360867217/566666100, 15078888947/23233310100, ...
		

Crossrefs

Programs

  • Mathematica
    Denominator[FoldList[Plus, 1/(1 + Select[Range[250], GCD @@ FactorInteger[#][[;; , 2]] > 1 &])]] (* Amiram Eldar, May 05 2022 *)

Formula

a(n) = denominator(Sum_{k=1..n} 1/A216765(k)).

A281909 Smallest k such that k^i - 1 is a totient number (A002202) for all i = 1 to n, or 0 if no such k exists.

Original entry on oeis.org

2, 3, 7, 7, 25, 25, 49, 49, 49, 49, 49, 49, 81, 81, 81, 81, 241, 241, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 721, 721, 721, 721, 721, 721, 961, 961, 961, 961, 961, 961
Offset: 1

Views

Author

Altug Alkan, Feb 01 2017

Keywords

Examples

			a(3) = 7 because 7 - 1 = 6, 7^2 - 1 = 48, 7^3 - 1 = 342 are all totient numbers and 7 is the least number with this property.
		

Crossrefs

Extensions

a(18)-a(42) from Max Alekseyev, Feb 07 2017, Mar 06 2017

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

A281962 Least k such that k^n - 1 is a totient number (A002202), or 0 if no such k exists.

Original entry on oeis.org

2, 3, 7, 3, 25, 5, 49, 3, 17, 5, 13, 3, 41, 7, 5, 3, 13, 5, 25, 3, 25, 5, 53, 3, 9, 9, 25, 3, 29, 3, 81, 3, 9, 15, 5, 3, 13, 5, 13, 3, 33, 5, 49, 3, 5, 9, 25, 3, 9, 3, 9, 3, 81, 5, 5, 3, 25, 7, 49, 3, 13, 9, 13, 3, 13, 3
Offset: 1

Views

Author

Altug Alkan, Feb 03 2017

Keywords

Examples

			a(5) = 25 because 25^5 - 1 = 5^10 - 1 = 9765624 is a totient number and 25 is the least number with this property.
		

Crossrefs

Programs

  • PARI
    a(n) = my(k=1); while(!istotient(k^n-1), k++); k;

Extensions

a(43)-a(52) from Ray Chandler, Feb 08 2017
a(53)-a(66) from Ray Chandler, Feb 09 2017

A359069 Smallest prime p such that p^(2n-1) - 1 is the product of 2n-1 distinct primes.

Original entry on oeis.org

3, 59, 47, 79, 347, 6343, 56711, 4523
Offset: 1

Views

Author

Kevin P. Thompson, Dec 15 2022

Keywords

Comments

a(9) > 113500.
a(9) > 1000000, a(10) > 237000, a(11) > 209021. - Sean A. Irvine, Jan 10 2023
a(n)-1 is squarefree for all n. - Chai Wah Wu, Jan 30 2023

Examples

			a(3) = 47 since 47^(2*3-1) - 1 = 229345006 = 2*11*23*31*14621 is the product of 5 distinct primes and 47 is the smallest prime number with this property.
		

Crossrefs

Programs

  • PARI
    isok(p, n) = my(f=factor(p^(2*n-1)-1)); issquarefree(f) && (omega(f) == 2*n-1);
    a(n) = my(p=2); while (!isok(p, n), p=nextprime(p+1)); p; \\ Michel Marcus, Dec 15 2022

A378617 First differences of A378249 (next perfect power after prime(n)).

Original entry on oeis.org

0, 4, 0, 8, 0, 9, 0, 0, 7, 0, 17, 0, 0, 0, 15, 0, 0, 17, 0, 0, 0, 19, 0, 0, 21, 0, 0, 0, 0, 7, 16, 0, 0, 25, 0, 0, 0, 0, 27, 0, 0, 0, 0, 20, 0, 0, 9, 18, 0, 0, 0, 0, 13, 33, 0, 0, 0, 0, 0, 0, 35, 0, 0, 0, 0, 19, 0, 18, 0, 0, 0, 39, 0, 0, 0, 0, 0, 41, 0, 0, 0
Offset: 1

Views

Author

Gus Wiseman, Dec 09 2024

Keywords

Comments

This is the next perfect power after prime(n+1), minus the next perfect power after prime(n).
Perfect powers (A001597) are 1 and numbers with a proper integer root, complement A007916.

Crossrefs

Positions of positives are A377283.
Positions of zeros are A377436.
The restriction to primes has first differences A377468.
A version for nonsquarefree numbers is A377784, differences of A377783.
The opposite is differences of A378035 (restriction of A081676).
First differences of A378249, run-lengths A378251.
Without zeros we have differences of A378250.
A000040 lists the primes, differences A001223.
A001597 lists the perfect powers, differences A053289.
A007916 lists the non perfect powers, differences A375706.
A069623 counts perfect powers <= n.
A076411 counts perfect powers < n.
A377432 counts perfect powers between primes.
A378356 - 1 gives next prime after perfect powers, union A378365 - 1.

Programs

  • Mathematica
    perpowQ[n_]:=n==1||GCD@@FactorInteger[n][[All,2]]>1;
    Table[NestWhile[#+1&,Prime[n],Not@*perpowQ],{n,100}]//Differences
Previous Showing 51-59 of 59 results.