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

A065642 a(1) = 1; for n > 1, a(n) = Min {m > n | m has same prime factors as n ignoring multiplicity}.

Original entry on oeis.org

1, 4, 9, 8, 25, 12, 49, 16, 27, 20, 121, 18, 169, 28, 45, 32, 289, 24, 361, 40, 63, 44, 529, 36, 125, 52, 81, 56, 841, 60, 961, 64, 99, 68, 175, 48, 1369, 76, 117, 50, 1681, 84, 1849, 88, 75, 92, 2209, 54, 343, 80, 153, 104, 2809, 72, 275, 98, 171, 116, 3481, 90, 3721
Offset: 1

Views

Author

Reinhard Zumkeller, Dec 03 2001

Keywords

Comments

After the initial 1, a permutation of the nonsquarefree numbers A013929. The array A284457 is obtained as a dispersion of this sequence. - Antti Karttunen, Apr 17 2017
Numbers such that a(n)/n is not an integer are listed in A284342.

Examples

			a(10) = a(2 * 5) = 2 * 2 * 5 = 20; a(12) = a(2^2 * 3) = 2 * 3^2 = 18.
		

Crossrefs

Cf. A285328 (a left inverse).
Cf. also arrays A284457 & A284311, A285321 and permutations A284572, A285112, A285332.

Programs

  • Haskell
    a065642 1 = 1
    a065642 n = head [x | let rad = a007947 n, x <- [n+1..], a007947 x == rad]
    -- Reinhard Zumkeller, Jun 12 2015, Jul 27 2011
    
  • Mathematica
    ffi[x_]:= Flatten[FactorInteger[x]]; lf[x_]:= Length[FactorInteger[x]]; ba[x_]:= Table[Part[ffi[x], 2*w-1], {w, 1, lf[x]}]; cor[x_]:= Apply[Times, ba[x]]; Join[{1}, Table[Min[Flatten[Position[Table[cor[w], {w, n+1, n^2}]-cor[n], 0]]+n], {n, 2, 100}]] (* This code is suitable since prime factor set is invariant iff squarefree kernel is invariant. *) (* G. C. Greubel, Oct 31 2018 *)
    Array[If[# == 1, 1, Function[{n, c}, SelectFirst[Range[n + 1, n^2], Times @@ FactorInteger[#][[All, 1]] == c &]] @@ {#, Times @@ FactorInteger[#][[All, 1]]}] &, 61] (* Michael De Vlieger, Oct 31 2018 *)
  • PARI
    A065642(n)={ my(r=A007947(n)); if(1==n,n, n += r; while(A007947(n) <> r, n += r); n)} \\ Antti Karttunen, Apr 17 2017
    
  • PARI
    a(n)=if(n<2, return(1)); my(f=factor(n),r,mx,mn,t); if(#f~==1, return(f[1,1]^(f[1,2]+1))); f=f[,1]; r=factorback(f); mn=mx=n*f[1]; forvec(v=vector(#f,i,[1,logint(mx/r,f[i])+1]), t=prod(i=1,#f, f[i]^v[i]); if(tn, mn=t)); mn \\ Charles R Greathouse IV, Oct 18 2017
    
  • Python
    from sympy import primefactors, prod
    def a007947(n): return 1 if n < 2 else prod(primefactors(n))
    def a(n):
        if n==1: return 1
        r=a007947(n)
        n += r
        while a007947(n)!=r:
            n+=r
        return n
    print([a(n) for n in range(1, 51)]) # Indranil Ghosh, Apr 17 2017
  • Scheme
    (define (A065642 n) (if (= 1 n) n (let ((k (A007947 n))) (let loop ((n (+ n k))) (if (= (A007947 n) k) n (loop (+ n k))))))) ;; (Semi-naive implementation) - Antti Karttunen, Apr 17 2017
    

Formula

A007947(a(n)) = A007947(n); a(A007947(n)) = A007947(n) * A020639(n), where A007947 is the squarefree kernel (radical), A020639 is the least prime factor (lpf).
a(A000040(n)^k) = A000040(n)^(k+1); A001221(a(n)) = A001221(n).
A285328(a(n)) = n. - Antti Karttunen, Apr 17 2017
n < a(n) <= n*lpf(n) <= n^2. - Charles R Greathouse IV, Oct 18 2017

A285109 a(n) = n multiplied by its smallest prime factor; a(1) = 1.

Original entry on oeis.org

1, 4, 9, 8, 25, 12, 49, 16, 27, 20, 121, 24, 169, 28, 45, 32, 289, 36, 361, 40, 63, 44, 529, 48, 125, 52, 81, 56, 841, 60, 961, 64, 99, 68, 175, 72, 1369, 76, 117, 80, 1681, 84, 1849, 88, 135, 92, 2209, 96, 343, 100, 153, 104, 2809, 108, 275, 112, 171, 116, 3481, 120, 3721, 124, 189, 128, 325, 132, 4489, 136, 207
Offset: 1

Views

Author

Antti Karttunen, Apr 19 2017

Keywords

Crossrefs

Differs from A065642 for the first time at n=12. See A284342 for all the differing points.

Programs

  • Mathematica
    a[n_] := n * FactorInteger[n][[1, 1]]; Array[a, 100] (* Amiram Eldar, Jun 30 2022 *)
  • PARI
    a(n)=if(n==1, 1, n*factor(n)[1,1]); \\ Joerg Arndt, Oct 27 2021
  • Scheme
    (define (A285109 n) (* (A020639 n) n))
    

Formula

a(n) = A020639(n) * n.
Other identities. For all n >= 1:
a(A285100(n)) = A065642(A285100(n)). [Agrees with A065642 on all terms of A285100, but not on any other points.]

A285100 Numbers k for which A065642(k) = A285109(k).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 37, 38, 39, 41, 42, 43, 44, 46, 47, 49, 51, 52, 53, 55, 57, 58, 59, 61, 62, 64, 65, 66, 67, 68, 69, 70, 71, 73, 74, 76, 77, 78, 79, 81, 82, 83, 85, 86, 87, 88, 89, 91, 92, 93, 94, 95, 97, 99, 101
Offset: 1

Views

Author

Antti Karttunen, Apr 19 2017

Keywords

Crossrefs

Complement: A284342.
Positions of ones in A285337.
Subsequences: A000961, A005117.

Programs

  • PARI
    A020639(n) = if(1==n,n,vecmin(factor(n)[, 1]));
    A007947(n) = factorback(factorint(n)[, 1]); \\ From Andrew Lelechenko, May 09 2014
    A065642(n) = { my(r=A007947(n)); if(1==n,n,n = n+r; while(A007947(n) <> r, n = n+r); n); };
    isA285100(n) = (A065642(n) == n*A020639(n));
    n=0; k=1; while(k <= 10000, n=n+1; if(isA285100(n),write("b285100.txt", k, " ", n);k=k+1));
    
  • Python
    from operator import mul
    from sympy import primefactors
    from functools import reduce
    def a007947(n): return 1 if n<2 else reduce(mul, primefactors(n))
    def a020639(n): return 1 if n==1 else primefactors(n)[0]
    def a065642(n):
        if n==1: return 1
        r=a007947(n)
        n += r
        while a007947(n)!=r:
            n+=r
        return n
    print([n for n in range(1, 102) if a065642(n) == n*a020639(n)]) # Indranil Ghosh, May 24 2017
  • Scheme
    ;; With Antti Karttunen's IntSeq-library.
    (define A285100 (MATCHING-POS 1 1 (lambda (n) (= (A065642 n) (A285109 n)))))
    

A285337 a(n) = denominator of A065642(n)/n.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 4, 1, 1, 1, 1, 3, 1, 1, 8, 1, 5, 1, 1, 1, 3, 1, 4, 1, 1, 1, 2, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 5, 1, 1, 1, 1, 4, 1, 1, 1, 2, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 8, 1, 7, 1, 5, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 4
Offset: 1

Views

Author

Antti Karttunen, Apr 19 2017

Keywords

Crossrefs

Cf. A065642, A285100 (positions of ones), A284342 (positions of terms > 1).
Cf. A285336 for the numerator.

Programs

  • Python
    from sympy import primefactors, prod, Integer
    def a007947(n): return 1 if n<2 else prod(primefactors(n))
    def a065642(n):
        if n==1: return 1
        r=a007947(n)
        n += r
        while a007947(n)!=r:
            n+=r
        return n
    def a(n): return (a065642(n)/Integer(n)).denominator # Indranil Ghosh, Apr 20 2017
  • Scheme
    (define (A285337 n) (denominator (/ (A065642 n) n)))
    
Showing 1-4 of 4 results.