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.

A277886 If n is squarefree, a(n) = n, else a(n) = A000040(1+A277885(n)) * (n/(A249739(n)^2)).

Original entry on oeis.org

1, 2, 3, 3, 5, 6, 7, 6, 5, 10, 11, 9, 13, 14, 15, 12, 17, 10, 19, 15, 21, 22, 23, 18, 7, 26, 15, 21, 29, 30, 31, 24, 33, 34, 35, 27, 37, 38, 39, 30, 41, 42, 43, 33, 25, 46, 47, 36, 11, 14, 51, 39, 53, 30, 55, 42, 57, 58, 59, 45, 61, 62, 35, 48, 65, 66, 67, 51, 69, 70, 71, 54, 73, 74, 21, 57, 77, 78, 79, 60, 45
Offset: 1

Views

Author

Antti Karttunen, Nov 08 2016

Keywords

Comments

If n has non-unitary prime divisors, then divide it by the square of the smallest of them and multiply by a single instance of the next larger prime.
This differs from related A097246 for the first time at n=16. For both sequences A097248 gives the eventual stable points reached when starting iterating from n.

Examples

			For n = 12 = 2*2*3, the smallest non-unitary prime divisor (and in this case the only one) is 2, thus we divide with 2^2 and multiply with the next larger prime 3, to get ((2^2 * 3)/(2^2))*3 = 3*3, thus a(12) = 9.
For n = 16 = 2^4, we divide two instances of 2 out and multiply by a single instance of 3 to get 2*2*3 = 12.
		

Crossrefs

Programs

  • Mathematica
    Table[If[SquareFreeQ@ n, n, Prime[1 + PrimePi@ Min[Select[FactorInteger[n][[All, 1]], ! CoprimeQ[#, n/#] &] /. {} -> 0]] (n/If[SquareFreeQ@ n, 1, p = 2; While[! Divisible[n, p^2], p = NextPrime@ p]; p]^2)], {n, 81}] (* Michael De Vlieger, Nov 15 2016 *)
  • Scheme
    (define (A277886 n) (if (zero? (A277885 n)) n (* (A000040 (+ 1 (A277885 n))) (/ n (expt (A249739 n) 2)))))

Formula

If A277885(n) = 0 [when n is squarefree], then a(n) = n, otherwise a(n) = A000040(1+A277885(n)) * (n/(A249739(n)^2)).
Other identities. For all n >= 1:
A048675(a(n)) = A048675(n).

A046027 Smallest multiple prime factor of the n-th nonsquarefree number (A013929).

Original entry on oeis.org

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

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Select[ FactorInteger[#], #[[2]]>1&, 1][[1, 1]]& /@ Select[ Range[300], !SquareFreeQ[#]& ] (* Jean-François Alcover, Nov 06 2012 *)
  • PARI
    lista(nn) = apply(x->factor(x)[1,1], apply(x->x/core(x), select(x->!issquarefree(x), [1..nn]))); \\ Michel Marcus, Jun 24 2025
  • Python
    from math import isqrt
    from sympy import mobius, factorint
    def A046027(n):
        def f(x): return n+sum(mobius(k)*(x//k**2) for k in range(1, isqrt(x)+1))
        m, k = n, f(n)
        while m != k:
            m, k = k, f(k)
        s = factorint(m)
        return next(p for p in sorted(s) if s[p]>1) # Chai Wah Wu, Jul 22 2024
    

Formula

a(n) = A249739(A013929(n)). - Amiram Eldar, Feb 11 2021

A249717 The smallest prime whose square divides the first nonsquarefree number on row n of Pascal's triangle, 1 if all terms on that row are squarefree.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 2, 1, 2, 3, 3, 1, 2, 3, 2, 3, 2, 2, 3, 3, 2, 3, 2, 1, 2, 5, 5, 3, 2, 3, 2, 3, 2, 2, 2, 2, 2, 3, 2, 3, 2, 2, 2, 3, 2, 3, 3, 3, 2, 7, 5, 5, 2, 5, 3, 3, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 2, 5, 2, 3, 2, 3, 3, 3, 2, 3, 2, 3, 2, 2, 3, 3, 2, 3, 2, 3, 2, 2, 7, 3, 2, 5, 2, 5, 2, 2, 2, 5, 2, 3, 2, 3, 2, 2, 2, 2, 2, 3, 3, 3, 2
Offset: 0

Views

Author

Antti Karttunen, Nov 04 2014

Keywords

Comments

All such n, for which a(n) < 3, form a subsequence of A249724.

Crossrefs

Differs from A249718 for the first time at n=36, where a(36) = 2, while A249718(36) = 3.

Programs

Formula

a(n) = A249739(A249716(n)).

A249740 The largest prime whose square divides n, 1 if n is squarefree.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Nov 04 2014

Keywords

Comments

A249739 gives the corresponding smallest prime.

Crossrefs

Differs from A071773 and A249739 for the first time at n=36, where a(36) = 3, while A249739(36) = 2 and A071773(36) = 6.

Programs

  • Mathematica
    a[n_] := If[(f = Select[FactorInteger[n], Last[#] > 1 &]) == {}, 1, f[[-1, 1]]]; Array[a, 100] (* Amiram Eldar, Feb 11 2021 *)
    Table[If[SquareFreeQ[n],1,Select[FactorInteger[n],#[[2]]>1&][[-1,1]]],{n,120}] (* Harvey P. Dale, Feb 28 2021 *)
  • Scheme
    (define (A249740 n) (let loop ((n n) (p (A006530 n))) (cond ((= 1 n) n) ((zero? (modulo n (* p p))) p) (else (loop (/ n p) (A006530 (/ n p)))))))
    ;; Alternative version which is based on the given recurrence, and utilizes the memoizing definec-macro from Antti Karttunen's IntSeq-library:
    (definec (A249740 n) (cond ((= n 1) n) ((zero? (A241917 n)) (A006530 n)) (else (A249740 (A052126 n)))))

Formula

a(1) = 1, and for n > 1, if A241917(n) = 0 [i.e., n is a term of A070003], a(n) = A006530(n), otherwise a(n) = a(A052126(n)).
a(n) = A006530(A003557(n)). - Amiram Eldar, Feb 11 2021

A277885 a(n) = index of the least non-unitary prime divisor of n or 0 if no such prime-divisor exists.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Nov 08 2016

Keywords

Crossrefs

Cf. A277697.
Cf. A005117 (gives the positions of zeros).

Programs

  • Mathematica
    Table[PrimePi@ Min[Select[FactorInteger[n][[All, 1]], ! CoprimeQ[#, n/#] &] /. {} -> 0], {n, 120}] (* Michael De Vlieger, Nov 15 2016 *)
  • PARI
    a(n) = {my(f = factor(n)); for(i = 1, #f~, if(f[i, 2] > 1, return(primepi(f[i, 1])))); 0;} \\ Amiram Eldar, Jul 28 2024
  • Python
    from sympy import factorint, primepi, isprime, primefactors
    def a049084(n): return primepi(n)*(1*isprime(n))
    def a055396(n): return 0 if n==1 else a049084(min(primefactors(n)))
    def a028234(n):
        f = factorint(n)
        return 1 if n==1 else n/(min(f)**f[min(f)])
    def a067029(n):
        f=factorint(n)
        return 0 if n==1 else f[min(f)]
    def a(n): return 0 if n==1 else a055396(n) if a067029(n)>1 else a(a028234(n)) # Indranil Ghosh, May 15 2017
    
  • Scheme
    (definec (A277885 n) (cond ((= 1 n) 0) ((< 1 (A067029 n)) (A055396 n)) (else (A277885 (A028234 n)))))
    

Formula

a(1) = 0; for n > 1, if A067029(n) > 1, a(n) = A055396(n), otherwise a(n) = a(A028234(n)). [One may use A032742 instead of A028234 for recursing.]
A008578(1+a(n)) = A249739(n).
For n > 1, a(n) + A277697(n) > 0.

A381032 The radix prime of the least significant digit > 1 in the primorial base expansion of n, or 1 if there is no such digit.

Original entry on oeis.org

1, 1, 1, 1, 3, 3, 1, 1, 1, 1, 3, 3, 5, 5, 5, 5, 3, 3, 5, 5, 5, 5, 3, 3, 5, 5, 5, 5, 3, 3, 1, 1, 1, 1, 3, 3, 1, 1, 1, 1, 3, 3, 5, 5, 5, 5, 3, 3, 5, 5, 5, 5, 3, 3, 5, 5, 5, 5, 3, 3, 7, 7, 7, 7, 3, 3, 7, 7, 7, 7, 3, 3, 5, 5, 5, 5, 3, 3, 5, 5, 5, 5, 3, 3, 5, 5, 5, 5, 3, 3, 7, 7, 7, 7, 3, 3, 7, 7, 7, 7, 3, 3, 5, 5, 5, 5, 3, 3, 5
Offset: 0

Views

Author

Antti Karttunen, Feb 13 2025

Keywords

Crossrefs

Cf. A088860 (positions of records for values > 1), A276156 (positions of 1's).
Cf. also A053669, A351566.

Programs

  • PARI
    A381032(n) = { my(p=2); while(n, if((n%p)>1, return(p)); n = n\p; p = nextprime(1+p)); (1); };

Formula

a(n) = A008578(1+A328828(n)).
a(n) = A020639(A328572(n)) = A249739(A276086(n)).
For all n, a(n) divides A327860(n).

A283454 The square root of the smallest square referenced in A249025 (Numbers k such that 3^k - 1 is not squarefree).

Original entry on oeis.org

2, 2, 11, 2, 2, 2, 2, 2, 11, 2, 2, 2, 2, 2, 11, 2, 2, 2, 2, 2, 11, 2, 2, 13, 2, 2, 2, 11, 2, 2, 2, 2, 2, 11, 2, 2, 2, 2, 2, 11, 2, 2, 2, 2, 2, 11, 2, 2, 2, 2, 2, 11, 2, 2, 2, 2, 2, 11, 2, 2, 2, 2, 2, 11, 2, 2, 2, 2, 2, 11, 2, 13, 2, 2, 2, 2, 11, 2, 2, 2, 2, 2, 11
Offset: 1

Views

Author

Robert Price, Mar 07 2017

Keywords

Comments

The terms are the smallest prime whose square divides 3^k-1, when it is not squarefree.

Examples

			A249025(3)=5, 3^5-1 = 242 = 2*11*11. 242 is not squarefree the square being 11*11 = 121, the root being 11.
		

Crossrefs

Programs

  • Mathematica
    p[n_] := If[(f = Select[FactorInteger[n], Last[#] > 1 &]) == {}, 1, f[[1, 1]]]; p /@ Select[3^Range[100] - 1, !SquareFreeQ[#] &] (* Amiram Eldar, Feb 12 2021 *)
  • PARI
    lista(nn) = {for (n=1, nn, if (!issquarefree(k = 3^n-1), f = factor(k/core(k)); vsq = select(x->((x%2) == 0), f[,2], 1); print1(f[vsq[1], 1], ", ");););} \\ Michel Marcus, Mar 11 2017

Formula

a(n) = A249739(A024023(A249025(n))). - Amiram Eldar, Feb 12 2021

Extensions

More terms from Michel Marcus, Mar 11 2017

A283670 The single square referenced in A190641.

Original entry on oeis.org

4, 4, 9, 4, 4, 9, 4, 4, 25, 9, 4, 4, 4, 4, 9, 4, 49, 25, 4, 9, 4, 4, 9, 4, 4, 25, 4, 4, 9, 4, 4, 9, 4, 4, 49, 9, 4, 4, 4, 9, 4, 121, 4, 25, 9, 4, 4, 9, 4, 4, 49, 4, 25, 4, 9, 4, 4, 9, 4, 4, 169, 9, 4, 25, 4, 4, 4, 9, 4, 9, 4, 9, 4, 4, 4, 4, 4, 4, 9, 4, 4
Offset: 1

Views

Author

Robert Price, Mar 13 2017

Keywords

Examples

			A190641(4) = 12, 12 = 2*2*3, so 12 has only one square factor, namely 4.
		

Crossrefs

Programs

Formula

a(n) = A283671(n)^2 = A249739(A190641(n))^2. - Amiram Eldar, Jul 28 2024

A283671 Square root of the single square referenced in A190641.

Original entry on oeis.org

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

Views

Author

Robert Price, Mar 13 2017

Keywords

Examples

			A190641(4) = 12, 12 = 2*2*3, so 12 has only one square factor, namely 4, and the square root is 2.
		

Crossrefs

Programs

Formula

a(n) = sqrt(A283670(n)) = A249739(A190641(n)). - Amiram Eldar, Jul 28 2024
Showing 1-9 of 9 results.