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 11-15 of 15 results.

A378168 a(n) is the number of squares <= 10^n that are not higher powers, i.e., terms of A076467.

Original entry on oeis.org

2, 6, 24, 87, 292, 959, 3089, 9875, 31410, 99633, 315589, 998889, 3160340, 9996605, 31616816, 99989509, 316209268, 999967330, 3162219896, 9999897769, 31622595517, 99999679010, 316227196708, 999998989804, 3162275866962, 9999996815862, 31622770946248, 99999989953079
Offset: 1

Views

Author

Hugo Pfoertner, Nov 20 2024

Keywords

Examples

			a(1) = 2: squares <= 10 are 2^2 and 3^2;
a(2) = 6: 2 squares <= 10 and 5^2, 6^2, 7^2, 10^2, but not 4^2=2^4, 8^2=2^6, and 9^2=3^4;
a(3) = 24: 6 squares <= 100 and all squares between 11^2 and 31^2, except for 16^2=2^8, 25^2=5^4, and 27^2=3^6.
		

Crossrefs

Programs

  • Mathematica
    Table[Sum[MoebiusMu[k]*Floor[10^(n/(2k))-1],{k,Floor[Log2[10^n]-1]}],{n,28}] (* James C. McMahon, Nov 21 2024 *)
  • Python
    from math import gcd
    from sympy import integer_nthroot, mobius
    def A378168(n): return sum(mobius(k)*(integer_nthroot(10**(n//(a:=gcd(n,b:=k<<1))), b//a)[0]-1) for k in range(1, (10**n).bit_length()-1)) # Chai Wah Wu, Nov 20 2024

Formula

a(n) = Sum_{k=1..floor(log_2(10^n)-1)} mu(k)*floor(10^(n/(2k))-1). - Chai Wah Wu, Nov 20 2024

Extensions

a(20) onwards from Chai Wah Wu, Nov 20 2024

A377934 a(n) is the number of perfect powers m^k with k>=3 (A076467) <= 10^n.

Original entry on oeis.org

1, 2, 7, 17, 38, 75, 152, 306, 616, 1260, 2598, 5401, 11307, 23798, 50316, 106776, 227236, 484737, 1036002, 2217529, 4752349, 10194727, 21887147, 47020054, 101065880, 217325603, 467484989, 1005881993, 2164843035, 4660016778, 10032642455, 21602193212, 46518438071
Offset: 0

Views

Author

Hugo Pfoertner, Nov 24 2024

Keywords

Examples

			a(0) = 1: 1^k with any k>2 (<= 10^0);
a(1) = 2: 1 and 2^3 (<=10^1);
a(2) = 7: 2 powers <= 10 and 16, 27, 32, 64, 81 (<=10^2).
		

Crossrefs

Programs

  • Python
    from math import gcd
    from sympy import integer_nthroot, mobius
    def A377934(n): return int(integer_nthroot(10**(n//(a:=gcd(n,4))),4//a)[0]-sum(mobius(k)*(integer_nthroot(10**(n//(b:=gcd(n,k))),k//b)[0]+integer_nthroot(10**(n//(c:=gcd(n,d:=k<<1))),d//c)[0]-2) for k in range(3,(10**n).bit_length()))) # Chai Wah Wu, Nov 24 2024

Formula

a(n) = 10^n - Sum_{k=1..floor(log2(10^n))} mu(k)*(floor(10^(n/k))+floor(10^(n/(2k)))-2). - Chai Wah Wu, Nov 24 2024

Extensions

a(28) onwards from Chai Wah Wu, Nov 24 2024

A380337 Number of perfect powers (in A001597) that do not exceed primorial A002110(n).

Original entry on oeis.org

1, 1, 2, 7, 19, 63, 208, 802, 3344, 15576, 82368, 453834, 2743903, 17510668, 114616907, 785002449, 5711892439, 43861741799, 342522899289, 2803468693325, 23621594605383, 201819398349092, 1793794228847381, 16342173067958793, 154171432351500060, 1518411003599957803
Offset: 0

Views

Author

Michael De Vlieger, Jan 21 2025

Keywords

Comments

In other words, A001597(a(n)) is the largest perfect power less than or equal to A002110(n).

Examples

			Let P = A002110 and let s = A001597.
a(0) = 1 since P(0) = 1, and the set s(1) = {1} contains k that do not exceed 1.
a(1) = 1 since P(1) = 2, and the set s(1) = {1} contains k <= 2.
a(2) = 2 since P(2) = 6, and the set s(1..2) = {1, 4} contains k <= 6.
a(3) = 7 since P(3) = 30, and the set s(1..7) = {1, 4, 8, 9, 16, 25, 27} contains k <= 30.
a(4) = 19 since P(4) = 210, and the set s(1..19) = {1, 4, 8, 9, 16, 25, 27, 32, 36, 49, 64, 81, 100, 121, 125, 128, 144, 169, 196} contains k <= 210, etc.
		

Crossrefs

Programs

  • Mathematica
    Map[1 - Sum[MoebiusMu[k]*Floor[#^(1/k) - 1], {k, 2, Floor[Log2[#]]}] &, FoldList[Times, 1, Prime[Range[30]]] ]
  • Python
    from sympy import primorial, mobius, integer_nthroot
    def A380337(n):
        if n == 0: return 1
        p = primorial(n)
        return int(1-sum(mobius(k)*(integer_nthroot(p,k)[0]-1) for k in range(2,p.bit_length()))) # Chai Wah Wu, Jan 23 2025

A075127 Safe perfect powers: perfect powers n such that (n-1)/2 is also a perfect power.

Original entry on oeis.org

9, 243, 289, 9801, 332929, 11309769, 384199201, 13051463049, 443365544449, 15061377048201, 511643454094369, 17380816062160329, 590436102659356801, 20057446674355970889, 681362750825443653409
Offset: 1

Views

Author

Zak Seidov, Oct 11 2002

Keywords

Comments

If both powers are squares, the smaller square is a triangular number, and all square triangular numbers (A001110) correspond to a member in this sequence. This proves that this sequence is infinite. Are there only finitely many other members, i.e., is A075127 \ A055792 finite? - Charles R Greathouse IV, Dec 12 2010

Crossrefs

Programs

  • Mathematica
    pp = Select[ Range[10^8], Apply[ GCD, Last[ Transpose[ FactorInteger[ # ]]]] > 1 & ]; Select[pp, Apply[GCD, Last[ Transpose[ FactorInteger[( # - 1)/2]]]] > 1 & ]
  • PARI
    for(n=1, 1e10, if(ispower(n) && ispower((n-1)/2), print1(n, ", "))) \\ Altug Alkan, Oct 28 2015

Formula

Conjectures from Colin Barker, Oct 28 2015: (Start)
a(n) = 35*a(n-1)-35*a(n-2)+a(n-3) for n>5.
G.f.: x*(234*x^4-8182*x^3+7901*x^2+72*x-9) / ((x-1)*(x^2-34*x+1)).
(End)

Extensions

One more term from Robert G. Wilson v, Oct 16 2002
a(7)-a(15) from Donovan Johnson, Mar 10 2010

A111026 Perfect powers (A001597) of the form 3p + q + 3, p & q are primes.

Original entry on oeis.org

16, 25, 27, 32, 49, 121, 125, 128, 169, 225, 243, 289, 343, 361, 512, 529, 625, 729, 841, 961, 1000, 1225, 1331, 1369, 1681, 1849, 2025, 2048, 2187, 2197, 2209, 2401, 2809, 3025, 3125, 3375, 3481, 3721, 3969, 4225, 4489, 4913, 5041, 5329, 5625, 5929, 6241
Offset: 1

Views

Author

Walter Kehowski, Oct 05 2005

Keywords

Comments

The sequence has repetitions since different p's and q's will give the same perfect power. Remove the andmap in the program if you want the repetitions.
Includes all perfect powers, pp, (A001597) congruent +/- 1 (modulo 6). Also if pp-9 or pp-12 is a prime or if (pp -2)/3 or (pp-3)/3 is a prime.
The number of perfect powers of the form 3p + q + 3 <= 10^n: 0,5,21,56,157,433,...,. - Robert G. Wilson v, Jun 21 2006
In the first one million integers there are 1111 perfect powers (A070428) of which only 433 of them are of the form 3p + q + 3.

Examples

			a(5)=49 since 3*3+37+3=49 = 5*3+31+3 = 3*11+13+3 = 3*13+7+7 = 7^2.
6859 = 19^3 is in the sequence because there are 116 different ways to combine primes of the form 3p + q + 3, beginning with p=5 & q=6841 and ending with p=2281 & q=13.
		

Crossrefs

Programs

  • Maple
    with(numtheory); egcd := proc(n) local L; L:=map(proc(z) z[2] end, ifactors(n)[2]); igcd(op(L)) end: PW:=[]: for z to 1 do for j from 1 to 100 do for k from 1 to 100 do p:=ithprime(j); q:=ithprime(k); x:=3*p+q+3; if egcd(x)>1 and andmap(proc(w) not(w[3]=x) end, PW) then PW:=[op(PW), [p,q,x]] fi od od od; PW; map(proc(z) z[3] end, PW);
  • Mathematica
    fQ[n_] := GCD @@ Last /@ FactorInteger@n > 1; lst = {}; Do[p = Prime@j; q = Prime@k; x = 3p + q + 3; If[fQ@x, AppendTo[lst, x]], {j, 340}, {k, PrimePi[6856 - 3Prime@j]}]; Union@lst (* Robert G. Wilson v *)

Formula

a(n)=3p+q+3 where p and q are primes and a(n) is a perfect power.

Extensions

Edited, corrected and extended by Robert G. Wilson v, Jun 21 2006
Previous Showing 11-15 of 15 results.