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

A001248 Squares of primes.

Original entry on oeis.org

4, 9, 25, 49, 121, 169, 289, 361, 529, 841, 961, 1369, 1681, 1849, 2209, 2809, 3481, 3721, 4489, 5041, 5329, 6241, 6889, 7921, 9409, 10201, 10609, 11449, 11881, 12769, 16129, 17161, 18769, 19321, 22201, 22801, 24649, 26569, 27889, 29929, 32041, 32761, 36481
Offset: 1

Views

Author

Keywords

Comments

Also 4, together with numbers n such that Sum_{d|n}(-1)^d = -A048272(n) = -3. - Benoit Cloitre, Apr 14 2002
Also, all solutions to the equation sigma(x) + phi(x) = 2x + 1. - Farideh Firoozbakht, Feb 02 2005
Unique numbers having 3 divisors (1, their square root, themselves). - Alexandre Wajnberg, Jan 15 2006
Smallest (or first) new number deleted at the n-th step in an Eratosthenes sieve. - Lekraj Beedassy, Aug 17 2006
Subsequence of semiprimes A001358. - Lekraj Beedassy, Sep 06 2006
Integers having only 1 factor other than 1 and the number itself. Every number in the sequence is a multiple of 1 factor other than 1 and the number itself. 4 : 2 is the only factor other than 1 and 4; 9 : 3 is the only factor other than 1 and 9; and so on. - Rachit Agrawal (rachit_agrawal(AT)daiict.ac.in), Oct 23 2007
The n-th number with p divisors is equal to the n-th prime raised to power p-1, where p is prime. - Omar E. Pol, May 06 2008
There are 2 Abelian groups of order p^2 (C_p^2 and C_p x C_p) and no non-Abelian group. - Franz Vrabec, Sep 11 2008
Also numbers n such that phi(n) = n - sqrt(n). - Michel Lagneau, May 25 2012
For n > 1, n is the sum of numbers from A006254(n-1) to A168565(n-1). - Vicente Izquierdo Gomez, Dec 01 2012
A078898(a(n)) = 2. - Reinhard Zumkeller, Apr 06 2015
Let r(n) = (a(n) - 1)/(a(n) + 1); then Product_{n>=1} r(n) = (3/5) * (4/5) * (12/13) * (24/25) * (60/61) * ... = 2/5. - Dimitris Valianatos, Feb 26 2019
Numbers k such that A051709(k) = 1. - Jianing Song, Jun 27 2021

Crossrefs

Programs

Formula

n such that A062799(n) = 2. - Benoit Cloitre, Apr 06 2002
A000005(a(n)^(k-1)) = A005408(k) for all k>0. - Reinhard Zumkeller, Mar 04 2007
a(n) = A000040(n)^(3-1)=A000040(n)^2, where 3 is the number of divisors of a(n). - Omar E. Pol, May 06 2008
A000005(a(n)) = 3 or A002033(a(n)) = 2. - Juri-Stepan Gerasimov, Oct 10 2009
A033273(a(n)) = 3. - Juri-Stepan Gerasimov, Dec 07 2009
For n > 2: (a(n) + 17) mod 12 = 6. - Reinhard Zumkeller, May 12 2010
A192134(A095874(a(n))) = A005722(n) + 1. - Reinhard Zumkeller, Jun 26 2011
For n > 2: a(n) = 1 (mod 24). - Zak Seidov, Dec 07 2011
A211110(a(n)) = 2. - Reinhard Zumkeller, Apr 02 2012
a(n) = A087112(n,n). - Reinhard Zumkeller, Nov 25 2012
a(n) = prime(n)^2. - Jon E. Schoenfield, Mar 29 2015
Product_{n>=1} a(n)/(a(n)-1) = Pi^2/6. - Daniel Suteu, Feb 06 2017
Sum_{n>=1} 1/a(n) = P(2) = 0.4522474200... (A085548). - Amiram Eldar, Jul 27 2020
From Amiram Eldar, Jan 23 2021: (Start)
Product_{n>=1} (1 + 1/a(n)) = zeta(2)/zeta(4) = 15/Pi^2 (A082020).
Product_{n>=1} (1 - 1/a(n)) = 1/zeta(2) = 6/Pi^2 (A059956). (End)

A001694 Powerful numbers, definition (1): if a prime p divides n then p^2 must also divide n (also called squareful, square full, square-full or 2-powerful numbers).

Original entry on oeis.org

1, 4, 8, 9, 16, 25, 27, 32, 36, 49, 64, 72, 81, 100, 108, 121, 125, 128, 144, 169, 196, 200, 216, 225, 243, 256, 288, 289, 324, 343, 361, 392, 400, 432, 441, 484, 500, 512, 529, 576, 625, 648, 675, 676, 729, 784, 800, 841, 864, 900, 961, 968, 972, 1000
Offset: 1

Views

Author

Keywords

Comments

Numbers of the form a^2*b^3, a >= 1, b >= 1.
In other words, if the prime factorization of n is Product_k p_k^e_k then all e_k are greater than 1.
Numbers n such that Sum_{d|n} phi(d)*phi(n/d)*mu(d) > 0; places of nonzero A300717. - Benoit Cloitre, Nov 30 2002
This sequence is closed under multiplication. The primitive elements are A168363. - Franklin T. Adams-Watters, May 30 2011
Complement of A052485. - Reinhard Zumkeller, Sep 16 2011
The number of terms less than or equal to 10^k beginning with k = 0: 1, 4, 14, 54, 185, 619, 2027, 6553, 21044, ...: A118896. - Robert G. Wilson v, Aug 11 2014
a(10^n): 1, 49, 3136, 253472, 23002083, 2200079025, 215523459072, 21348015504200, 2125390162618116, ... . - Robert G. Wilson v, Aug 15 2014
a(m) mod prime(n) > 0 for m < A258599(n); a(A258599(n)) = A001248(n) = prime(n)^2. - Reinhard Zumkeller, Jun 06 2015
From Des MacHale, Mar 07 2021: (Start)
A number m is powerful if and only if |R/Z(R)| = m, for some finite non-commutative ring R.
A number m is powerful if and only if |G/Z(G)| = m, for some finite nilpotent class two group G (Reference Aine Nishe). (End)
Numbers n such that Sum_{k=1..n} phi(gcd(n,k))*mu(gcd(n,k)) > 0. - Richard L. Ollerton, May 09 2021

Examples

			1 is a term because for every prime p that divides 1, p^2 also divides 1.
2 is not a term since 2 divides 2 but 2^2 does not.
4 is a term because 2 is the only prime that divides 4 and 2^2 does divide 4. - _N. J. A. Sloane_, Jan 16 2022
		

References

  • G. E. Hardy and M. V. Subbarao, Highly powerful numbers, Congress. Numer. 37 (1983), 277-307.
  • Aleksandar Ivić, The Riemann Zeta-Function, Wiley, NY, 1985, see p. 407.
  • Richard A. Mollin, Quadratics, CRC Press, 1996, Section 1.6.
  • Aine NiShe, Commutativity and Generalisations in Finite Groups, Ph.D. Thesis, University College Cork, 2000.
  • Paulo Ribenboim, Meine Zahlen, meine Freunde, 2009, Springer, 9.1 Potente Zahlen, pp. 241-247.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • Gérald Tenenbaum, Introduction to analytic and probabilistic number theory, Cambridge University Press, 1995, p. 54, exercise 10 (in the third edition 2015, p. 63, exercise 70).

Crossrefs

Disjoint union of A062503 and A320966.
Cf. A007532 (Powerful numbers, definition (2)), A005934, A005188, A003321, A014576, A023052 (Powerful numbers, definition (3)), A046074, A013929, A076871, A258599, A001248, A112526, A168363, A224866, A261883, A300717.
Cf. A052485 (complement), A076446 (first differences), A376361, A376362.

Programs

  • Haskell
    a001694 n = a001694_list !! (n-1)
    a001694_list = filter ((== 1) . a112526) [1..]
    -- Reinhard Zumkeller, Nov 30 2012
    
  • Maple
    isA001694 := proc(n) for p in ifactors(n)[2] do if op(2,p) = 1 then return false; end if; end do; return true; end proc:
    A001694 := proc(n) option remember; if n = 1 then 1; else for a from procname(n-1)+1 do if isA001694(a) then return a; end if; end do; end if; end proc:
    seq(A001694(n),n=1..20) ; # R. J. Mathar, Jun 07 2011
  • Mathematica
    Join[{1}, Select[ Range@ 1250, Min@ FactorInteger[#][[All, 2]] > 1 &]]
    (* Harvey P. Dale, Sep 18 2011; modified by Robert G. Wilson v, Aug 11 2014 *)
    max = 10^3; Union@ Flatten@ Table[a^2*b^3, {b, max^(1/3)}, {a, Sqrt[max/b^3]}] (* Robert G. Wilson v, Aug 11 2014 *)
    nextPowerfulNumber[n_] := Block[{r = Range[ Floor[1 + n^(1/3)]]^3}, Min@ Select[ Sort[ r*Floor[1 + Sqrt[n/r]]^2], # > n &]]; NestList[ nextPowerfulNumber, 1, 55] (* Robert G. Wilson v, Aug 16 2014 *)
  • PARI
    isA001694(n)=n=factor(n)[,2];for(i=1,#n,if(n[i]==1,return(0)));1 \\ Charles R Greathouse IV, Feb 11 2011
    
  • PARI
    list(lim,mn=2)=my(v=List(),t); for(m=1,sqrtnint(lim\1,3), t=m^3; for(n=1,sqrtint(lim\t), listput(v,t*n^2))); Set(v) \\ Charles R Greathouse IV, Jul 31 2011; edited Sep 22 2015
    
  • PARI
    is=ispowerful \\ Charles R Greathouse IV, Nov 13 2012
    
  • Python
    from sympy import factorint
    A001694 = [1]+[n for n in range(2,10**6) if min(factorint(n).values()) > 1]
    # Chai Wah Wu, Aug 14 2014
    
  • Python
    from math import isqrt
    from sympy import mobius, integer_nthroot
    def A001694(n):
        def squarefreepi(n):
            return int(sum(mobius(k)*(n//k**2) for k in range(1, isqrt(n)+1)))
        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):
            c, l = n+x, 0
            j = isqrt(x)
            while j>1:
                k2 = integer_nthroot(x//j**2,3)[0]+1
                w = squarefreepi(k2-1)
                c -= j*(w-l)
                l, j = w, isqrt(x//k2**3)
            c -= squarefreepi(integer_nthroot(x,3)[0])-l
            return c
        return bisection(f,n,n) # Chai Wah Wu, Sep 09 2024
    
  • Sage
    sloane.A001694.list(54) # Peter Luschny, Feb 08 2015

Formula

A112526(a(n)) = 1. - Reinhard Zumkeller, Sep 16 2011
Bateman & Grosswald prove that there are zeta(3/2)/zeta(3) x^{1/2} + zeta(2/3)/zeta(2) x^{1/3} + O(x^{1/6}) terms up to x; see section 5 for a more precise error term. - Charles R Greathouse IV, Nov 19 2012
a(n) = A224866(n) - 1. - Reinhard Zumkeller, Jul 23 2013
Sum_{n>=1} 1/a(n) = zeta(2)*zeta(3)/zeta(6). - Ivan Neretin, Aug 30 2015
Sum_{n>=1} 1/a(n)^s = zeta(2*s)*zeta(3*s)/zeta(6*s), s > 1/2 (Golomb, 1970). - Amiram Eldar, Oct 02 2022

Extensions

More terms from Henry Bottomley, Mar 16 2000
Definition expanded by Jonathan Sondow, Jan 03 2016

A258600 a(n) is the index m such that A036966(m) = prime(n)^3.

Original entry on oeis.org

2, 4, 8, 13, 23, 29, 39, 45, 57, 75, 81, 99, 110, 117, 130, 149, 169, 176, 197, 209, 212, 236, 250, 270, 295, 309, 317, 328, 337, 354, 399, 414, 436, 445, 477, 483, 506, 529, 541, 563, 585, 591, 631, 635, 654, 657, 697, 747, 758, 765, 781, 803, 809, 845, 864
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 06 2015

Keywords

Examples

			.   n |  p |  a(n) | A036966(a(n)) = A030078(n) = p^3
. ----+----+-------+---------------------------------
.   1 |  2 |     2 |             8
.   2 |  3 |     4 |            27
.   3 |  5 |     8 |           125
.   4 |  7 |    13 |           343
.   5 | 11 |    23 |          1331
.   6 | 13 |    29 |          2197
.   7 | 17 |    39 |          4913
.   8 | 19 |    45 |          6859
.   9 | 23 |    57 |         12167
.  10 | 29 |    75 |         24389
.  11 | 31 |    81 |         29791
.  12 | 37 |    99 |         50653
.  13 | 41 |   110 |         68921
.  14 | 43 |   117 |         79507
.  15 | 47 |   130 |        103823
.  16 | 53 |   149 |        148877
.  17 | 59 |   169 |        205379
.  18 | 61 |   176 |        226981
.  19 | 67 |   197 |        300763
.  20 | 71 |   209 |        357911
.  21 | 73 |   212 |        389017
.  22 | 79 |   236 |        493039
.  23 | 83 |   250 |        571787
.  24 | 89 |   270 |        704969
.  25 | 97 |   295 |        912673  .
		

Crossrefs

Programs

  • Haskell
    import Data.List (elemIndex); import Data.Maybe (fromJust)
    a258600 = (+ 1) . fromJust . (`elemIndex` a258568_list) . a000040
    
  • Mathematica
    With[{m = 60}, c = Select[Range[Prime[m]^3], Min[FactorInteger[#][[;; , 2]]] > 2 &]; 1 + Flatten[FirstPosition[c, #] & /@ (Prime[Range[m]]^3)]] (* Amiram Eldar, Feb 07 2023 *)
  • Python
    from math import gcd
    from sympy import prime, integer_nthroot, factorint
    def A258600(n):
        c, m = 0, prime(n)**3
        for w in range(1,integer_nthroot(m,5)[0]+1):
            if all(d<=1 for d in factorint(w).values()):
                for y in range(1,integer_nthroot(z:=m//w**5,4)[0]+1):
                    if gcd(w,y)==1 and all(d<=1 for d in factorint(y).values()):
                        c += integer_nthroot(z//y**4,3)[0]
        return c # Chai Wah Wu, Sep 10 2024

Formula

A036966(a(n)) = A030078(n) = prime(n)^3.
A036966(m) mod prime(n) > 0 for m < a(n).
Also smallest number m such that A258568(m) = prime(n):
A258568(a(n)) = A000040(n) and A258568(m) != A000040(n) for m < a(n).

Extensions

a(11)-a(55) and example corrected by Amiram Eldar, Feb 07 2023

A258601 a(n) is the index m such that A036967(m) = prime(n)^4.

Original entry on oeis.org

2, 5, 10, 16, 28, 37, 55, 61, 80, 105, 113, 142, 163, 170, 190, 219, 249, 260, 286, 310, 318, 352, 374, 407, 448, 472, 482, 505, 511, 536, 614, 634, 672, 682, 740, 754, 783, 821, 842, 878, 916, 924, 984, 996, 1015, 1032, 1103, 1171, 1201, 1213, 1233, 1270, 1286, 1343, 1379
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 06 2015

Keywords

Comments

A036967(a(n)) = A030514(n) = prime(n)^4;
A036967(m) mod prime(n) > 0 for m < a(n);
also smallest number m such that A258569(m) = prime(n):
A258569(a(n)) = A000040(n) and A258569(m) != A000040(n) for m < a(n).

Examples

			.   n |  p |  a(n) | A036967(a(n)) = A030514(n) = p^4
. ----+----+-------+---------------------------------
.   1 |  2 |     2 |            16
.   2 |  3 |     5 |            81
.   3 |  5 |    10 |           625
.   4 |  7 |    16 |          2401
.   5 | 11 |    28 |         14641
.   6 | 13 |    37 |         28561
.   7 | 17 |    55 |         83521
.   8 | 19 |    61 |        130321
.   9 | 23 |    80 |        279841
.  10 | 29 |   105 |        707281
.  11 | 31 |   113 |        923521
.  12 | 37 |   142 |       1874161
.  13 | 41 |   163 |       2825761
.  14 | 43 |   170 |       3418801
.  15 | 47 |   190 |       4879681
.  16 | 53 |   219 |       7890481
.  17 | 59 |   249 |      12117361
.  18 | 61 |   260 |      13845841
.  19 | 67 |   286 |      20151121
.  20 | 71 |   310 |      25411681
.  21 | 73 |   318 |      28398241
.  22 | 79 |   352 |      38950081
.  23 | 83 |   374 |      47458321
.  24 | 89 |   407 |      62742241
.  25 | 97 |   448 |      88529281
		

Crossrefs

Programs

  • Haskell
    import Data.List (elemIndex); import Data.Maybe (fromJust)
    a258601 = (+ 1) . fromJust . (`elemIndex` a258569_list) . a000040
    
  • PARI
    \\ Gen(limit,k) defined in A036967.
    a(n)=#Gen(prime(n)^4,4) \\ Andrew Howroyd, Sep 10 2024
  • Python
    from math import gcd
    from sympy import prime, integer_nthroot, factorint
    def A258601(n):
        c, m = 0, prime(n)**4
        for u in range(1,integer_nthroot(m,7)[0]+1):
            if all(d<=1 for d in factorint(u).values()):
                for w in range(1,integer_nthroot(a:=m//u**7,6)[0]+1):
                    if gcd(w,u)==1 and all(d<=1 for d in factorint(w).values()):
                        for y in range(1,integer_nthroot(z:=a//w**6,5)[0]+1):
                            if gcd(w,y)==1 and gcd(u,y)==1 and all(d<=1 for d in factorint(y).values()):
                                c += integer_nthroot(z//y**5,4)[0]
        return c # Chai Wah Wu, Sep 10 2024
    

Extensions

a(11) onwards corrected by Chai Wah Wu and Andrew Howroyd, Sep 10 2024

A258602 a(n) is the index m such that A069492(m) = prime(n)^5.

Original entry on oeis.org

2, 5, 12, 20, 37, 45, 68, 82, 106, 142, 154, 196, 219, 234, 260, 305, 342, 360, 407, 434, 451, 496, 528, 573, 635, 668, 681, 720, 737, 770, 885, 919, 966, 984, 1065, 1087, 1139, 1193, 1228, 1283, 1331, 1348, 1440, 1455, 1484, 1509, 1624, 1731, 1767, 1789
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 06 2015

Keywords

Comments

A069492(a(n)) = A050997(n) = prime(n)^5;
A069492(m) mod prime(n) > 0 for m < a(n);
also smallest number m such that A258570(m) = prime(n):
A258570(a(n)) = A000040(n) and A258570(m) != A000040(n) for m < a(n).

Examples

			.   n |  p |  a(n) | A069492(a(n)) = A050997(n) = p^5
. ----+----+-------+---------------------------------
.   1 |  2 |     2 |            32
.   2 |  3 |     5 |           243
.   3 |  5 |    12 |          3125
.   4 |  7 |    20 |         16807
.   5 | 11 |    37 |        161051
.   6 | 13 |    45 |        371293
.   7 | 17 |    68 |       1419857
.   8 | 19 |    82 |       2476099
.   9 | 23 |   106 |       6436343
.  10 | 29 |   142 |      20511149
.  11 | 31 |   154 |      28629151
.  12 | 37 |   196 |      69343957
.  13 | 41 |   219 |     115856201
.  14 | 43 |   234 |     147008443
.  15 | 47 |   260 |     229345007
.  16 | 53 |   305 |     418195493
.  17 | 59 |   342 |     714924299
.  18 | 61 |   360 |     844596301
.  19 | 67 |   407 |    1350125107
.  20 | 71 |   434 |    1804229351
.  21 | 73 |   451 |    2073071593
.  22 | 79 |   496 |    3077056399
.  23 | 83 |   528 |    3939040643
.  24 | 89 |   573 |    5584059449
.  25 | 97 |   635 |    8587340257  .
		

Crossrefs

Programs

  • Haskell
    import Data.List (elemIndex); import Data.Maybe (fromJust)
    a258602 = (+ 1) . fromJust . (`elemIndex` a258570_list) . a000040
    
  • PARI
    \\ Gen(limit,k) defined in A036967.
    a(n)=#Gen(prime(n)^5,5) \\ Andrew Howroyd, Sep 10 2024
  • Python
    from math import gcd
    from sympy import prime, integer_nthroot, factorint
    def A258602(n):
        c, m = 0, prime(n)**5
        for t in range(1,integer_nthroot(m,9)[0]+1):
            if all(d<=1 for d in factorint(t).values()):
                for u in range(1,integer_nthroot(s:=m//t**9,8)[0]+1):
                    if gcd(t,u)==1 and all(d<=1 for d in factorint(u).values()):
                        for w in range(1,integer_nthroot(a:=s//u**8,7)[0]+1):
                            if gcd(u,w)==1 and gcd(t,w)==1 and all(d<=1 for d in factorint(w).values()):
                                for y in range(1,integer_nthroot(z:=a//w**7,6)[0]+1):
                                    if gcd(w,y)==1 and gcd(u,y)==1 and gcd(t,y)==1 and all(d<=1 for d in factorint(y).values()):
                                        c += integer_nthroot(z//y**6,5)[0]
        return c # Chai Wah Wu, Sep 10 2024
    

Extensions

a(11) onwards corrected by Chai Wah Wu and Andrew Howroyd, Sep 10 2024

A258603 a(n) is the index m such that A069493(m) = prime(n)^6.

Original entry on oeis.org

2, 6, 13, 22, 45, 58, 87, 102, 135, 181, 199, 252, 287, 306, 342, 401, 461, 479, 536, 583, 602, 665, 712, 776, 860, 911, 932, 975, 997, 1051, 1212, 1258, 1331, 1356, 1479, 1502, 1580, 1651, 1705, 1784, 1856, 1879, 2013, 2037, 2093, 2113, 2272, 2438, 2484, 2510
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 06 2015

Keywords

Comments

A069493(a(n)) = A030516(n) = prime(n)^6;
A069493(m) mod prime(n) > 0 for m < a(n);
also smallest number m such that A258571(m) = prime(n):
A258571(a(n)) = A000040(n) and A258571(m) != A000040(n) for m < a(n).

Examples

			.   n |  p |  a(n) | A069493(a(n)) = A030516(n) = p^6
. ----+----+-------+---------------------------------
.   1 |  2 |     2 |            64
.   2 |  3 |     6 |           729
.   3 |  5 |    13 |         15625
.   4 |  7 |    22 |        117649
.   5 | 11 |    45 |       1771561
.   6 | 13 |    58 |       4826809
.   7 | 17 |    87 |      24137569
.   8 | 19 |   102 |      47045881
.   9 | 23 |   135 |     148035889
.  10 | 29 |   181 |     594823321
.  11 | 31 |   199 |     887503681
.  12 | 37 |   252 |    2565726409
.  13 | 41 |   287 |    4750104241
.  14 | 43 |   306 |    6321363049
.  15 | 47 |   342 |   10779215329
.  16 | 53 |   401 |   22164361129
.  17 | 59 |   461 |   42180533641
.  18 | 61 |   479 |   51520374361
.  19 | 67 |   536 |   90458382169
.  20 | 71 |   583 |  128100283921
.  21 | 73 |   602 |  151334226289
.  22 | 79 |   665 |  243087455521
.  23 | 83 |   712 |  326940373369
.  24 | 89 |   776 |  496981290961
.  25 | 97 |   860 |  832972004929  .
		

Crossrefs

Programs

  • Haskell
    import Data.List (elemIndex); import Data.Maybe (fromJust)
    a258603 = (+ 1) . fromJust . (`elemIndex` a258571_list) . a000040
    
  • PARI
    \\ Gen(limit,k) defined in A036967.
    a(n)=#Gen(prime(n)^6,6) \\ Andrew Howroyd, Sep 10 2024
  • Python
    from math import gcd
    from sympy import prime, integer_nthroot, factorint
    def A258603(n):
        c, m = 0, prime(n)**6
        for y1 in range(1,integer_nthroot(m,11)[0]+1):
            if all(d<=1 for d in factorint(y1).values()):
                for y2 in range(1,integer_nthroot(z2:=m//y1**11,10)[0]+1):
                    if gcd(y2,y1)==1 and all(d<=1 for d in factorint(y2).values()):
                        for y3 in range(1,integer_nthroot(z3:=z2//y2**10,9)[0]+1):
                            if all(gcd(y3,x)==1 for x in (y1,y2)) and all(d<=1 for d in factorint(y3).values()):
                                for y4 in range(1,integer_nthroot(z4:=z3//y3**9,8)[0]+1):
                                    if all(gcd(y4,x)==1 for x in (y1,y2,y3)) and all(d<=1 for d in factorint(y4).values()):
                                        for y5 in range(1,integer_nthroot(z5:=z4//y4**8,7)[0]+1):
                                            if all(gcd(y5,x)==1 for x in (y1,y2,y3,y4)) and all(d<=1 for d in factorint(y5).values()):
                                                c += integer_nthroot(z5//y5**7,6)[0]
        return c # Chai Wah Wu, Sep 10 2024
    

Extensions

a(11) onwards corrected by Chai Wah Wu and Andrew Howroyd, Sep 10 2024

A258567 a(1) = 1; thereafter a(n) = smallest prime factor of the powerful number A001694(n).

Original entry on oeis.org

1, 2, 2, 3, 2, 5, 3, 2, 2, 7, 2, 2, 3, 2, 2, 11, 5, 2, 2, 13, 2, 2, 2, 3, 3, 2, 2, 17, 2, 7, 19, 2, 2, 2, 3, 2, 2, 2, 23, 2, 5, 2, 3, 2, 3, 2, 2, 29, 2, 2, 31, 2, 2, 2, 2, 3, 3, 2, 2, 5, 2, 3, 11, 2, 37, 2, 2, 3, 2, 2, 41, 2, 2, 2, 43, 2, 2, 2, 3, 2, 2, 3
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 06 2015

Keywords

Crossrefs

Programs

  • Haskell
    a258567 = a020639 . a001694
    
  • Mathematica
    Table[If[Min[(f = FactorInteger[n])[[;; , 2]]] > 1 || n == 1, f[[1, 1]], Nothing], {n, 1, 3000}] (* Amiram Eldar, Jan 30 2023 *)
  • Python
    from math import isqrt
    from sympy import mobius, integer_nthroot, primefactors
    def A258567(n):
        def squarefreepi(n):
            return int(sum(mobius(k)*(n//k**2) for k in range(1, isqrt(n)+1)))
        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):
            c, l = n+x, 0
            j = isqrt(x)
            while j>1:
                k2 = integer_nthroot(x//j**2, 3)[0]+1
                w = squarefreepi(k2-1)
                c -= j*(w-l)
                l, j = w, isqrt(x//k2**3)
            c -= squarefreepi(integer_nthroot(x, 3)[0])-l
            return c
        return min(primefactors(bisection(f,n,n)),default=1) # Chai Wah Wu, Sep 10 2024

Formula

a(n) = A020639(A001694(n)).
a(A258599(n)) = A000040(n) and a(m) != A000040(n) for m < A258599(n).

Extensions

Definition made more precise by N. J. A. Sloane, Apr 29 2024
Showing 1-7 of 7 results.