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

A366786 a(n) = A073481(n)*A005117(n).

Original entry on oeis.org

1, 4, 9, 25, 12, 49, 20, 121, 169, 28, 45, 289, 361, 63, 44, 529, 52, 841, 60, 961, 99, 68, 175, 1369, 76, 117, 1681, 84, 1849, 92, 2209, 153, 2809, 275, 171, 116, 3481, 3721, 124, 325, 132, 4489, 207, 140, 5041, 5329, 148, 539, 156, 6241, 164, 6889, 425, 172
Offset: 1

Views

Author

Michael De Vlieger, Dec 16 2023

Keywords

Comments

Define f(x) to be lpf(k)*k, where lpf(k) = A020639(k). This sequence contains the mappings of f(x) across squarefree numbers A005117.
a(1) = 1 by definition. 1 is the empty product and has no least prime factor.
Define sequence R_k = { m : rad(m) | k }, where rad(n) = A007947(n) and k > 1 is squarefree. Then the sequence k*R_k contains all numbers divisible by squarefree k that are also not divisible by any prime q coprime to k.
Plainly, k is the first term in the sequence k*R_k, because 1 is the first term in R_k. Hence a(n) is the second term in k*R_k for n > 1, since lpf(k) is the second term in R_k.

Examples

			Let b(n) = A005117(n).
a(2) = 4 = b(2)*lpf(b(2)) = 2*lpf(2) = 2*2. In {2*A000079}, 4 is the second term.
a(5) = 12 = b(5)*lpf(b(5)) = 6*lpf(6) = 6*2. In {6*A003586}, 12 is the second term..
a(11) = 45 = b(11)*lpf(b(11)) = 15*lpf(15) = 15*3. In {15*A003593}, 45 is the second term, etc.
		

Crossrefs

Programs

  • Mathematica
    nn = 120; s = Select[Range[nn], SquareFreeQ];
    Array[#*FactorInteger[#][[1, 1]] &[s[[#]]] &, Length[s]]
  • PARI
    apply(x->(if (x==1,1, x*vecmin(factor(x)[,1]))), select(issquarefree, [1..150])) \\ Michel Marcus, Dec 17 2023
    
  • Python
    from math import isqrt
    from sympy import mobius, primefactors
    def A366786(n):
        def f(x): return n+x-sum(mobius(k)*(x//k**2) for k in range(1, isqrt(x)+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
        return (m:=bisection(f))*min(primefactors(m),default=1) # Chai Wah Wu, Aug 31 2024

Formula

a(n) = A065642(A005117(n)), n > 1.
a(n) = A285109(A005117(n)).
a(n) = A020639(A005117(n))*A005117(n).
For prime p, a(p) = p^2.
For composite squarefree k, a(k) = (p^2 * m) such that (p^2 * m) is in A364996.
Permutation of the union of {1}, A001248, and A366825.

A073482 Largest prime factor of the n-th squarefree number.

Original entry on oeis.org

1, 2, 3, 5, 3, 7, 5, 11, 13, 7, 5, 17, 19, 7, 11, 23, 13, 29, 5, 31, 11, 17, 7, 37, 19, 13, 41, 7, 43, 23, 47, 17, 53, 11, 19, 29, 59, 61, 31, 13, 11, 67, 23, 7, 71, 73, 37, 11, 13, 79, 41, 83, 17, 43, 29, 89, 13, 31, 47, 19, 97, 101, 17, 103, 7, 53, 107, 109, 11, 37, 113, 19, 23, 59, 17, 61, 41
Offset: 1

Views

Author

Reinhard Zumkeller, Aug 03 2002

Keywords

Crossrefs

Programs

  • Haskell
    a073482 = a006530 . a005117  -- Reinhard Zumkeller, Feb 04 2012
    
  • Maple
    issquarefree := proc(n::integer) local nf, ifa, lar; nf := op(2,ifactors(n)); for ifa from 1 to nops(nf) do lar := op(1,op(ifa,nf)); if op(2,op(ifa,nf)) >= 2 then RETURN(0); fi; od : RETURN(lar); end: printf("1,"); for n from 2 to 100 do lfa := issquarefree(n); if lfa > 0 then printf("%a,",lfa); fi; od : # R. J. Mathar, Apr 02 2006
  • Mathematica
    FactorInteger[#][[-1, 1]]& /@ Select[Range[100], SquareFreeQ] (* Jean-François Alcover, Feb 01 2018 *)
    s[n_] := Module[{f = FactorInteger[n]}, If[AllTrue[f[[;; , 2]], # < 2 &], f[[-1, 1]], Nothing]]; Array[s, 200] (* Amiram Eldar, Mar 03 2024 *)
  • PARI
    do(x)=my(v=List([1])); forfactored(n=2,x\1, if(vecmax(n[2][,2])==1, listput(v, vecmax(n[2][,1])))); Vec(v) \\ Charles R Greathouse IV, Nov 05 2017
    
  • Python
    from math import isqrt
    from sympy import mobius, primefactors
    def A073482(n):
        def f(x): return n+x-sum(mobius(k)*(x//k**2) for k in range(1, isqrt(x)+1))
        kmin, kmax = 0,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 max(primefactors(kmax),default=1) # Chai Wah Wu, Aug 28 2024

Formula

a(n) = A006530(A005117(n)).
a(n) = A265668(n, A001221(n)). - Reinhard Zumkeller, Dec 13 2015
Sum_{A005117(n) <= x} a(n) = Sum_{i=1..k} d_i * x^2/log(x)^i + O(x^2/log(x)^(k+1)), for any given positive integer k, where d_i are constants, d_1 = 15/(2*Pi^2) = 0.759908... (A323669) (De Koninck and Jakimczuk, 2024). - Amiram Eldar, Mar 03 2024

Extensions

More terms from Jason Earls, Aug 06 2002

A265668 Table read by rows: prime factors of squarefree numbers; a(1) = 1 by convention.

Original entry on oeis.org

1, 2, 3, 5, 2, 3, 7, 2, 5, 11, 13, 2, 7, 3, 5, 17, 19, 3, 7, 2, 11, 23, 2, 13, 29, 2, 3, 5, 31, 3, 11, 2, 17, 5, 7, 37, 2, 19, 3, 13, 41, 2, 3, 7, 43, 2, 23, 47, 3, 17, 53, 5, 11, 3, 19, 2, 29, 59, 61, 2, 31, 5, 13, 2, 3, 11, 67, 3, 23, 2, 5, 7, 71, 73, 2
Offset: 1

Views

Author

Reinhard Zumkeller, Dec 13 2015

Keywords

Comments

For n > 1: A072047(n) = length of row n;
T(n,1) = A073481(n); T(n,A001221(n)) = A073482(n);
for n > 1: A111060(n) = sum of row n;
A005117(n) = product of row n.

Examples

			.   n | T(n,*)  A5117(n)    n | T(n,*)  A5117(n)    n | T(n,*)   A5117(n)
. ----+---------+------   ----+---------+------   ----+----------+------
.   1 | [1]     |  1       21 | [3,11]  | 33       41 | [2,3,11] | 66
.   2 | [2]     |  2       22 | [2,17]  | 34       42 | [67]     | 67
.   3 | [3]     |  3       23 | [5,7]   | 35       43 | [3,23]   | 69
.   4 | [5]     |  5       24 | [37]    | 37       44 | [2,5,7]  | 70
.   5 | [2,3]   |  6       25 | [2,19]  | 38       45 | [71]     | 71
.   6 | [7]     |  7       26 | [3,13]  | 39       46 | [73]     | 73
.   7 | [2,5]   | 10       27 | [41]    | 41       47 | [2,37]   | 74
.   8 | [11]    | 11       28 | [2,3,7] | 42       48 | [7,11]   | 77
.   9 | [13]    | 13       29 | [43]    | 43       49 | [2,3,13] | 78
.  10 | [2,7]   | 14       30 | [2,23]  | 46       50 | [79]     | 79
.  11 | [3,5]   | 15       31 | [47]    | 47       51 | [2,41]   | 82
.  12 | [17]    | 17       32 | [3,17]  | 51       52 | [83]     | 83
.  13 | [19]    | 19       33 | [53]    | 53       53 | [5,17]   | 85
.  14 | [3,7]   | 21       34 | [5,11]  | 55       54 | [2,43]   | 86
.  15 | [2,11]  | 22       35 | [3,19]  | 57       55 | [3,29]   | 87
.  16 | [23]    | 23       36 | [2,29]  | 58       56 | [89]     | 89
.  17 | [2,13]  | 26       37 | [59]    | 59       57 | [7,13]   | 91
.  18 | [29]    | 29       38 | [61]    | 61       58 | [3,31]   | 93
.  19 | [2,3,5] | 30       39 | [2,31]  | 62       59 | [2,47]   | 94
.  20 | [31]    | 31       40 | [5,13]  | 65       60 | [5,19]   | 95  .
		

Crossrefs

Programs

  • Haskell
    import Math.NumberTheory.Primes.Factorisation (factorise)
    import Data.Maybe (mapMaybe)
    a265668 n k = a265668_tabf !! (n-1) !! (k-1)
    a265668_row n = a265668_tabf !! (n-1)
    a265668_tabf = [1] : mapMaybe f [2..] where
       f x = if all (== 1) es then Just ps else Nothing
             where (ps, es) = unzip $ factorise x
  • Mathematica
    FactorInteger[#][[All,1]]&/@Select[Range[100],SquareFreeQ]//Flatten (* Harvey P. Dale, Apr 27 2018 *)

A073483 For the n-th squarefree number: the product of all primes greater than its smallest factor and less than its largest factor and not dividing it.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 3, 1, 1, 15, 1, 1, 1, 5, 105, 1, 1155, 1, 1, 1, 35, 15015, 1, 1, 255255, 385, 1, 5, 1, 4849845, 1, 5005, 1, 7, 85085, 111546435, 1, 1, 3234846615, 77, 35, 1, 1616615, 3, 1, 1, 100280245065, 1, 385, 1, 3710369067405, 1, 1001
Offset: 1

Views

Author

Reinhard Zumkeller, Aug 03 2002

Keywords

Comments

a(n)=1 iff A073484(n)=0; a(A000040(n))=1, a(A006094(n))=1, a(A002110(n))=1.

Examples

			The 69th squarefree number is 110=2*5*11, primes between 2 and 11, not dividing 110, are 3 and 7, therefore a(69)=21.
		

Crossrefs

Programs

  • Haskell
    a073483 n = product $ filter ((> 0) . (mod m)) $
       dropWhile (<= a020639 m) $ takeWhile (<= a006530 m) a000040_list
       where m = a005117 n
    -- Reinhard Zumkeller, Jan 15 2012
  • Mathematica
    ppg[n_]:=Module[{f=Transpose[FactorInteger[n]][[1]]},Times@@Select[Prime[ Range[PrimePi[First[f]]+1,PrimePi[Last[f]]-1]],!MemberQ[f,#]&]]; ppg/@ Select[ Range[100],SquareFreeQ] (* Harvey P. Dale, Jan 16 2013 *)

Formula

a(n) = A002110(A073482(n))/(A005117(n)*A002110(A073481(n))).

Extensions

a(44) and a(49) corrected by Reinhard Zumkeller, Jan 14 2012
Definition clarified by Harvey P. Dale, Jan 16 2013

A117183 a(n) = smallest prime dividing n-th nonsquarefree positive integer.

Original entry on oeis.org

2, 2, 3, 2, 2, 2, 2, 2, 5, 3, 2, 2, 2, 2, 2, 3, 2, 7, 2, 2, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 3, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 3, 2, 11, 2, 5, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 2, 2, 13, 3, 2, 5, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 3, 2, 5, 2, 2, 2, 2, 2, 3, 2, 2, 2
Offset: 1

Views

Author

Leroy Quet, Mar 01 2006

Keywords

Examples

			12, the 4th nonsquarefree positive integer, is 2^2 * 3. 2 is the smallest prime dividing 12. So a(4) = 2.
		

Crossrefs

Programs

  • Maple
    with(numtheory): a:=proc(n) if mobius(n)=0 then op(1,factorset(n)) fi end: seq(a(n),n=1..345); # Emeric Deutsch
  • Mathematica
    FactorInteger[ # ][[1, 1]] & /@ Select[ Range@252, !SquareFreeQ@# &] (* Robert G. Wilson v, Mar 06 2006 *)
    FactorInteger[#][[1,1]]&/@DeleteCases[Range[300],?SquareFreeQ] (* _Harvey P. Dale, Jun 02 2017 *)
  • PARI
    list(lim) = apply(x -> factor(x)[1,1], select(x -> !issquarefree(x), vector(lim, i, i))); \\ Amiram Eldar, Jun 25 2025

Formula

a(n) = A020639(A013929(n)).

Extensions

More terms from Emeric Deutsch and Robert G. Wilson v, Mar 06 2006

A304181 If n = Product (p_j^k_j) then a(n) = min{p_j}^min{k_j}.

Original entry on oeis.org

1, 2, 3, 4, 5, 2, 7, 8, 9, 2, 11, 2, 13, 2, 3, 16, 17, 2, 19, 2, 3, 2, 23, 2, 25, 2, 27, 2, 29, 2, 31, 32, 3, 2, 5, 4, 37, 2, 3, 2, 41, 2, 43, 2, 3, 2, 47, 2, 49, 2, 3, 2, 53, 2, 5, 2, 3, 2, 59, 2, 61, 2, 3, 64, 5, 2, 67, 2, 3, 2, 71, 4, 73, 2, 3, 2, 7, 2, 79, 2, 81, 2, 83, 2, 5
Offset: 1

Views

Author

Ilya Gutkovskiy, May 07 2018

Keywords

Examples

			a(72) = 4 because 72 = 2^3*3^2, min{2,3} = 2, min{3,2} = 2 and 2^2 = 4.
		

Crossrefs

Programs

  • Mathematica
    Table[(FactorInteger[n][[1, 1]])^(Min @@ Last /@ FactorInteger[n]), {n, 85}]

Formula

a(n) = A020639(n)^A051904(n).
a(p^k) = p^k where p is a prime.
a(A005117(k)) = A073481(k).

A087619 a(n) = 137*a(n-1) + a(n-2), with a(0) = 2 and a(1) = 137.

Original entry on oeis.org

2, 137, 18771, 2571764, 352350439, 48274581907, 6613970071698, 906162174404533, 124150831863492719, 17009570127472907036, 2330435258295651756651, 319286639956631763568223
Offset: 0

Views

Author

Nikolay V. Kosinov (kosinov(AT)unitron.com.ua), Oct 25 2003

Keywords

Comments

a(n+1)/a(n) converges to (137+sqrt(18773))/2 = 137.00729888121410965...
a(0)/a(1) = 2/137;
a(1)/a(2) = 137/18771;
a(2)/a(3) = 18771/2571764;
a(3)/a(4) = 2571764/352350439; ... etc.
Lim_{n->infinity} a(n)/a(n+1) = 0.00729888121410965... = 2/(137+sqrt(18773)) = (sqrt(18773)-137)/2.

Crossrefs

Formula

a(n) = ((137+sqrt(18773))/2)^n + ((137-sqrt(18773))/2)^n.
(a(n))^2 = a(2*n)-2 if n = 1, 3, 5, ..., (a(n))^2 = a(2n) + 2 if n = 2, 4, 6, ...
G.f.: (2-137*x)/(1-137*x-x^2). - Philippe Deléham, Nov 23 2008

A115013 a(n) = difference between largest and smallest primes dividing the n-th squarefree integer (with a(1)=0).

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 3, 0, 0, 5, 2, 0, 0, 4, 9, 0, 11, 0, 3, 0, 8, 15, 2, 0, 17, 10, 0, 5, 0, 21, 0, 14, 0, 6, 16, 27, 0, 0, 29, 8, 9, 0, 20, 5, 0, 0, 35, 4, 11, 0, 39, 0, 12, 41, 26, 0, 6, 28, 45, 14, 0, 0, 15, 0, 4, 51, 0, 0, 9, 34, 0, 17, 18, 57, 10, 59, 38, 0, 40, 11, 0, 12, 65, 0, 21, 0, 44, 69, 2
Offset: 1

Views

Author

Leroy Quet, Feb 28 2006

Keywords

Examples

			a(7)=3 because the 7th squarefree number is 10 = 2*5 and 5 - 2 = 3.
		

Programs

  • Maple
    with(numtheory): a:=proc(n) local FS: FS:=factorset(n): if abs(mobius(n))>0 then FS[nops(FS)]-FS[1] else fi end: seq(a(n),n=2..180); # Emeric Deutsch, Mar 07 2006

Formula

a(n) = A073482(n) - A073481(n).

Extensions

More terms from Emeric Deutsch, Mar 07 2006
a(1) = 0 inserted by Georg Fischer, Dec 09 2022
Showing 1-8 of 8 results.