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

A284262 a(n) = where A284259 for the first time obtains value n (positions of its records).

Original entry on oeis.org

1, 2, 6, 105, 5005, 85085, 1616615, 37182145, 6685349671, 247357937827, 10141675450907, 436092044389001, 20496326086283047, 9156001667401012567, 558516101711461766587, 37420578814667938361329, 2656861095841423623654359, 193950859996423924526768207, 15322117939717490037614688353, 1271735788996551673122019133299
Offset: 0

Views

Author

Antti Karttunen, Mar 24 2017

Keywords

Crossrefs

Cf. A001221, A001222, A002110, A003961, A242378, A284259 (a left inverse), A284263.
Cf. also A109819.

Programs

  • Mathematica
    A[n_]:= If[n<1, 0, Block[{k=1}, While[Prime[n + k  - 1] > Prime[k]^2, k++]; k - 1]]; a[n_]:=If[n<2, n + 1, Product[Prime[i], {i, A[n] + 1, A[n] + n}]]; Table[a[n], {n, 0, 51}] (* Indranil Ghosh, Mar 24 2017 *)
  • PARI
    A(n) = { my(k=1); if(0==n, 0, while(prime(n+k-1) > (prime(k)^2), k = k+1); (k-1)); };
    a(n) = prod(i=A(n) + 1, A(n) + n, prime(i));
    for(n=0, 51, print1(a(n),", ")) \\ Indranil Ghosh, after Antti Karttunen, Mar 24 2017
    
  • Python
    from sympy import prime
    from operator import mul
    from functools import reduce
    def A(n):
        if n<1: return 0
        k=1
        while prime(n + k - 1)>prime(k)**2:k+=1
        return k - 1
    def a(n): return n + 1 if n<2 else reduce(mul, [prime(i) for i in range(A(n) + 1, A(n) + n + 1)])
    print([a(n) for n in range(21)]) # Indranil Ghosh, Mar 24 2017
  • Scheme
    (define (A284262 n) (A242378bi (A284263 n) (A002110 n))) ;; Where A242378bi(k,n) applies prime shift A003961(n) k times. See A242378.
    

Formula

For n > 1, a(n) = Product_{i = A284263(n)+1 .. A284263(n)+n} prime(i); a(0) = 1, a(1) = 2.
a(n) = A242378(A284263(n), A002110(n)) [shift the prime factorization of the n-th primorial A284263(n) steps towards larger primes].
Other identities. For all n >= 0:
A001221(a(n)) = A001222(a(n)) = n.
A284259(a(n)) = n.

A284254 Largest divisor of n such that all its prime factors are greater than the square of smallest prime factor of n, a(1) = 1.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 1, 1, 7, 1, 1, 1, 1, 1, 5, 1, 11, 1, 1, 1, 13, 1, 7, 1, 5, 1, 1, 11, 17, 1, 1, 1, 19, 13, 5, 1, 7, 1, 11, 1, 23, 1, 1, 1, 25, 17, 13, 1, 1, 1, 7, 19, 29, 1, 5, 1, 31, 1, 1, 1, 11, 1, 17, 23, 35, 1, 1, 1, 37, 1, 19, 1, 13, 1, 5, 1, 41, 1, 7, 1, 43, 29, 11, 1, 5, 1, 23, 31, 47, 1, 1, 1, 49, 11, 25, 1, 17, 1, 13, 1, 53, 1, 1, 1, 55
Offset: 1

Views

Author

Antti Karttunen, Mar 24 2017

Keywords

Examples

			For n = 15 = 3*5, no prime factor is larger than 3^2, thus a(15) = 1. In this case the largest divisor satisfying the condition has no prime factors at all.
For n = 50 = 2*5*5, the primes larger than 2^2 are 5 and 5, thus a(50) = 5*5 = 25.
		

Crossrefs

Cf. A251726 (gives the positions of ones after the initial a(1)=1).
Differs from related A284252 for the first time at n=50, where a(50) = 25, while A284252(50) = 5.

Programs

  • Mathematica
    Table[If[n == 1, 1, Function[d, Last[Select[Reverse@ First@ d, Times @@ Boole@ Map[# > Last[d]^2 &, FactorInteger[#][[All, 1]]] == 1 &] /. {} -> {1}]]@ {#, First@ Select[#, PrimeQ]} &@ Divisors@ n], {n, 108}] (* Michael De Vlieger, Mar 24 2017 *)
  • PARI
    A(n) = if(n<2, return(1), my(f=factor(n)[, 1]); for(i=2, #f, if(f[i]>f[1]^2, return(f[i]))); return(1));
    a(n) = if(A(n)==1, 1, A(n)*a(n/A(n)));
    for(n=1, 150, print1(a(n),", ")) \\ Indranil Ghosh, after David A. Corneth, Mar 24 2017
    
  • Python
    from sympy import primefactors
    def A(n):
         for i in primefactors(n):
             if i>min(primefactors(n))**2: return i
         return 1
    def a(n): return 1 if A(n) == 1 else A(n)*a(n//A(n))
    print([a(n) for n in range(1, 151)]) # Indranil Ghosh, Mar 24 2017

Formula

If A284252(n) = 1, then a(n) = 1, otherwise A284252(n) * a(A284253(n)).
Other identities. For all n >= 1:
n / a(n) = A284255(n).
A020639(a(n)) = A284252(n).
A001221(a(n)) = A284258(n).
A001222(a(n)) = A284256(n).

A284258 a(n) = number of distinct prime factors of n that are > the square of smallest prime factor of n, a(1) = 0.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 2, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 2, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1
Offset: 1

Views

Author

Antti Karttunen, Mar 24 2017

Keywords

Examples

			For n = 50, 2*5*5, the prime factor > 2^2 is 5, which is counted only once, thus a(50) = 1.
For n = 70, 2*5*7, the prime factors > 2^2 are 5 and 7, thus a(70) = 2.
		

Crossrefs

Cf. A251726 (gives the positions of zeros after the initial a(1)=0).
Differs from related A284256 for the first time at n=50, where a(50)=1, while A284256(50)=2.

Programs

  • Mathematica
    Table[If[n == 1, 0, Count[#, d_ /; d > First[#]^2] &@ FactorInteger[n][[All, 1]]], {n, 120}] (* Michael De Vlieger, Mar 24 2017 *)
  • PARI
    A(n) = if(n<2, return(1), my(f=factor(n)[, 1]); for(i=2, #f, if(f[i]>f[1]^2, return(f[i]))); return(1));
    a(n) = if(A(n)==1, 1, A(n)*a(n/A(n)));
    for(n=1, 150, print1(omega(a(n)),", ")) \\ Indranil Ghosh, after David A. Corneth, Mar 24 2017
    
  • Python
    from sympy import primefactors
    def omega(n): return len(primefactors(n))
    def A(n):
        for i in primefactors(n):
            if i>min(primefactors(n))**2: return i
        return 1
    def a(n): return 1 if A(n)==1 else A(n)*a(n//A(n))
    print([omega(a(n)) for n in range(1, 151)]) # Indranil Ghosh, Mar 24 2017
  • Scheme
    (define (A284258 n) (A001221 (A284254 n)))
    

Formula

a(n) = Sum_{p|n, p prime and > spf(n)^2} sign(p), where spf(n) (A020639) gives the smallest prime factor of n, and sign(p) = A057427(p) = 1 for all p.
a(n) = A001221(A284254(n)).
a(n) = A001221(n) - A284259(n).
a(n) <= A284256(n).

A284252 a(n) = smallest prime dividing n which is larger than the square of smallest prime dividing n, or 1 if no such prime exists, a(1) = 1.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Mar 24 2017

Keywords

Examples

			For n=10 = 2*5, the smallest prime divisor > 2^2 is 5, thus a(10) = 5.
For n=15 = 3*5, there are no prime divisors > 3^2, thus a(15) = 1.
For n=165 = 3*5*11, the smallest prime divisor > 3^2 is 11, thus a(165) = 11.
		

Crossrefs

Cf. A251726 (gives the positions of ones after the initial a(1) = 1), A251727 (positions of terms > 1).

Programs

  • Mathematica
    a[n_] := Block[{p = First /@ FactorInteger[n]}, SelectFirst[p, # > p[[1]]^2 &, 1]]; Array[a, 120] (* Giovanni Resta, Mar 24 2017 *)
  • PARI
    a(n) = if(n==1, return(1), my(f=factor(n)[, 1]); s = f[1]; for(i=2,#f, if(f[i]>s^2, return(f[i]))); return(1)) \\ David A. Corneth, Mar 24 2017
    
  • Python
    from sympy import primefactors
    def a(n):
        for i in primefactors(n):
            if i>min(primefactors(n))**2: return i
        return 1
    print([a(n) for n in range(1, 151)]) # Indranil Ghosh, Mar 24 2017
  • Scheme
    (define (A284252 n) (let ((spf1 (A020639 n))) (let loop ((n (/ n spf1))) (let ((spf2 (A020639 n))) (cond ((= 1 spf2) 1) ((> spf2 (* spf1 spf1)) spf2) (else (loop (/ n spf2))))))))
    

Formula

a(n) = A020639(A284254(n)).
a(k) > 1 iff k is in A251727. - David A. Corneth, Mar 25 2017

A284253 a(n) = n / A284252(n).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 2, 11, 12, 13, 2, 15, 16, 17, 18, 19, 4, 21, 2, 23, 24, 25, 2, 27, 4, 29, 6, 31, 32, 3, 2, 35, 36, 37, 2, 3, 8, 41, 6, 43, 4, 45, 2, 47, 48, 49, 10, 3, 4, 53, 54, 55, 8, 3, 2, 59, 12, 61, 2, 63, 64, 65, 6, 67, 4, 3, 14, 71, 72, 73, 2, 75, 4, 77, 6, 79, 16, 81, 2, 83, 12, 85, 2, 3, 8, 89, 18, 91, 4, 3, 2, 95, 96, 97, 14, 9, 20, 101, 6
Offset: 1

Views

Author

Antti Karttunen, Mar 24 2017

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := Block[{p = First /@ FactorInteger[n]}, n / SelectFirst[p, # > p[[1]]^2 &, 1]]; Array[a, 120] (* Giovanni Resta, Mar 24 2017 *)
  • PARI
    a(n) = if(n<2, return(1), my(f=factor(n)[, 1]); for(i=2, #f, if(f[i]>f[1]^2, return(f[i]))); return(1));
    for(n=1, 151, print1(n/a(n),", ")) \\ Indranil Ghosh, after David A. Corneth, Mar 24 2017
    
  • Python
    from sympy import primefactors
    def a(n):
        pf = primefactors(n)
        if pf: min_pf2 = min(pf)**2
        for i in pf:
            if i > min_pf2: return i
        return 1
    print([n//a(n) for n in range(1, 151)]) # Indranil Ghosh, Mar 24 2017
  • Scheme
    (define (A284253 n) (/ n (A284252 n)))
    

Formula

a(n) = n / A284252(n).

A284255 Largest divisor of n such that all its prime factors are less than the square of the smallest prime factor of n, a(1) = 1.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 2, 11, 12, 13, 2, 15, 16, 17, 18, 19, 4, 21, 2, 23, 24, 25, 2, 27, 4, 29, 6, 31, 32, 3, 2, 35, 36, 37, 2, 3, 8, 41, 6, 43, 4, 45, 2, 47, 48, 49, 2, 3, 4, 53, 54, 55, 8, 3, 2, 59, 12, 61, 2, 63, 64, 65, 6, 67, 4, 3, 2, 71, 72, 73, 2, 75, 4, 77, 6, 79, 16, 81, 2, 83, 12, 85, 2, 3, 8, 89, 18, 91, 4, 3, 2, 95, 96, 97, 2, 9, 4, 101, 6
Offset: 1

Views

Author

Antti Karttunen, Mar 24 2017

Keywords

Examples

			For n = 50 = 2*5*5, only prime less than 2^2 is 2, thus a(50) = 2.
For n = 90 = 2*3*3*5, the primes less than 2^2 are 2, 3 and 3, thus a(90) = 2*3*3 = 18.
		

Crossrefs

Differs from A284253 for the first time at n=50, where a(50) = 2, while A284253(50) = 10.

Programs

  • Mathematica
    Table[If[n == 1, 1, Function[d, First[Select[Reverse@ First@ d, Times @@ Boole@ Map[# < Last[d]^2 &, FactorInteger[#][[All, 1]]] == 1 &] /. {} -> {1}]]@ {#, First@ Select[#, PrimeQ]} &@ Divisors@ n], {n, 102}] (* Michael De Vlieger, Mar 24 2017 *)
  • PARI
    A(n) = if(n<2, return(1), my(f=factor(n)[, 1]); for(i=2, #f, if(f[i]>f[1]^2, return(f[i]))); return(1));
    a(n) = if(A(n)==1, 1, A(n)*a(n/A(n)));
    for(n=1, 150, print1(n/a(n),", ")) \\ Indranil Ghosh, after David A. Corneth, Mar 24 2017
    
  • Python
    from sympy import primefactors
    def A(n):
        pf = primefactors(n)
        if pf: min_pf2 = min(pf)**2
        for i in pf:
            if i > min_pf2: return i
        return 1
    def a(n): return 1 if A(n)==1 else A(n)*a(n//A(n))
    print([n//a(n) for n in range(1, 151)]) # Indranil Ghosh, Mar 24 2017
  • Scheme
    (define (A284255 n) (/ n (A284254 n)))
    

Formula

a(n) = n / A284254(n).
Other identities. For all n >= 1:
A006530(a(n)) = A284260(n).
A020639(a(n)) = A020639(n).
A001221(a(n)) = A284259(n).
A001222(a(n)) = A284257(n).

A284256 a(n) = number of prime factors of n that are > the square of smallest prime factor of n (counted with multiplicity), a(1) = 0.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 2, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 2, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 2, 1, 2, 0, 1, 0, 1, 0, 1, 0, 0, 0, 2, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1
Offset: 1

Views

Author

Antti Karttunen, Mar 24 2017

Keywords

Examples

			For n = 10 = 2*5, there is a single prime factor 5 that is > 2^2, thus a(10) = 1.
For n = 15 = 3*5, there are no prime factors larger than 3^2, thus a(15) = 0.
For n = 50 = 2*5*5, the prime factors larger than 2^2 are 5*5, thus a(50) = 2.
		

Crossrefs

Cf. A251726 (gives the positions of zeros after the initial a(1)=0).

Programs

  • Mathematica
    Table[If[n == 1, 0, Count[#, d_ /; d > First[#]^2] &@ Flatten@ Map[ConstantArray[#1, #2] & @@ # &, FactorInteger@ n]], {n, 120}] (* Michael De Vlieger, Mar 24 2017 *)
  • PARI
    A(n) = if(n<2, return(1), my(f=factor(n)[, 1]); for(i=2, #f, if(f[i]>f[1]^2, return(f[i]))); return(1));
    a(n) = if(A(n)==1, 0, 1 + a(n/A(n)));
    for(n=1, 150, print1(a(n),", ")) \\ Indranil Ghosh, after David A. Corneth, Mar 24 2017
    
  • Python
    from sympy import primefactors
    def A(n):
        pf = primefactors(n)
        if pf: min_pf2 = min(pf)**2
        for i in pf:
            if i > min_pf2: return i
        return 1
    def a(n): return 0 if A(n)==1 else 1 + a(n//A(n))
    print([a(n) for n in range(1, 151)]) # Indranil Ghosh, Mar 24 2017

Formula

If A284252(n) = 1, a(n) = 0, otherwise a(n) = 1 + a(A284253(n)).
a(n) = A001222(A284254(n)).
a(n) = A001222(n) - A284257(n).

A284257 a(n) = number of prime factors of n that are < the square of smallest prime factor of n (counted with multiplicity), a(1) = 0.

Original entry on oeis.org

0, 1, 1, 2, 1, 2, 1, 3, 2, 1, 1, 3, 1, 1, 2, 4, 1, 3, 1, 2, 2, 1, 1, 4, 2, 1, 3, 2, 1, 2, 1, 5, 1, 1, 2, 4, 1, 1, 1, 3, 1, 2, 1, 2, 3, 1, 1, 5, 2, 1, 1, 2, 1, 4, 2, 3, 1, 1, 1, 3, 1, 1, 3, 6, 2, 2, 1, 2, 1, 1, 1, 5, 1, 1, 3, 2, 2, 2, 1, 4, 4, 1, 1, 3, 2, 1, 1, 3, 1, 3, 2, 2, 1, 1, 2, 6, 1, 1, 2, 2, 1, 2, 1, 3, 3, 1, 1, 5, 1, 1, 1, 4, 1, 2, 2, 2, 2, 1, 2, 4
Offset: 1

Views

Author

Antti Karttunen, Mar 24 2017

Keywords

Examples

			For n = 45 = 3*3*5, all prime factors 3, 3 and 5 are less than 3^2, thus a(45) = 3.
For n = 120 = 2*2*2*3*5, the prime factors less than 2^2 are 2*2*2*3, thus a(120) = 4.
		

Crossrefs

Programs

  • Mathematica
    Table[If[n == 1, 0, Count[#, d_ /; d < First[#]^2] &@ Flatten@ Map[ConstantArray[#1, #2] & @@ # &, FactorInteger@ n]], {n, 120}] (* Michael De Vlieger, Mar 24 2017 *)
  • PARI
    A(n) = if(n<2, return(1), my(f=factor(n)[, 1]); for(i=2, #f, if(f[i]>f[1]^2, return(f[i]))); return(1));
    a(n) = if(A(n)==1, 1, A(n)*a(n/A(n)));
    for(n=1, 150, print1(bigomega(n/a(n)),", ")) \\ Indranil Ghosh, Mar 24 2017, after David A. Corneth
    
  • Python
    from sympy import primefactors
    def Omega(n): return 0 if n==1 else Omega(n//min(primefactors(n))) + 1
    def A(n):
        pf = primefactors(n)
        if pf: min_pf2 = min(pf)**2
        for i in pf:
            if i > min_pf2: return i
        return 1
    def a(n): return 1 if A(n)==1 else A(n)*a(n//A(n))
    print([Omega(n//a(n)) for n in range(1, 151)]) # Indranil Ghosh, Mar 24 2017
  • Scheme
    (define (A284257 n) (A001222 (A284255 n)))
    

Formula

a(n) = A001222(A284255(n)).
a(n) = A001222(n) - A284256(n).

A284260 Greatest prime dividing n which is less than A020639(n)^2, where A020639(n) is the smallest prime dividing n, a(1) = 1.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Mar 24 2017

Keywords

Crossrefs

Cf. A251726 (gives n > 1 such that a(n) = A006530(n)).

Programs

  • Mathematica
    Table[Last[Function[s, Select[s, # < First[s]^2 &]]@ FactorInteger[n][[All, 1]] /. {} -> {1}], {n, 109}] (* Michael De Vlieger, Mar 24 2017 *)
  • PARI
    A(n) = if(n<2, return(1), my(f=factor(n)[, 1]); for(i=2, #f, if(f[i]>f[1]^2, return(f[i]))); return(1));
    a(n) = if(A(n)==1, 1, A(n)*a(n/A(n)));
    gpf(n) = if(n>1, vecmax(factor(n)[,1]),1);
    for(n=1, 150, print1(gpf(n/a(n)),", ")) \\ Indranil Ghosh, Mar 24 2017, after David A. Corneth
    
  • Python
    from sympy import primefactors
    def A(n):
        for i in primefactors(n):
            if i>min(primefactors(n))**2: return i
        return 1
    def a(n): return 1 if A(n)==1 else A(n)*a(n//A(n))
    def gpf(n): return 1 if n<2 else max(primefactors(n))
    print([gpf(n//a(n)) for n in range(1, 151)]) # Indranil Ghosh, Mar 24 2017
  • Scheme
    (define (A284260 n) (A006530 (A284255 n)))
    

Formula

a(n) = A006530(A284255(n)).
Showing 1-9 of 9 results.