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

A108230 a(1) = 0, a(n) = order of prime A088387(n).

Original entry on oeis.org

0, 1, 2, 1, 3, 2, 4, 1, 2, 3, 5, 1, 6, 4, 3, 1, 7, 2, 8, 3, 4, 5, 9, 1, 3, 6, 2, 4, 10, 3, 11, 1, 5, 7, 4, 2, 12, 8, 6, 1, 13, 4, 14, 5, 2, 9, 15, 1, 4, 3, 7, 6, 16, 2, 5, 1, 8, 10, 17, 3, 18, 11, 2, 1, 6, 5, 19, 7, 9, 4, 20, 2, 21, 12, 3, 8, 5, 6, 22
Offset: 1

Views

Author

Leroy Quet, Jun 16 2005

Keywords

Examples

			a(12) = 1 because 2^2 is the largest prime power (yet not the power of the largest prime) dividing 12 and 2 is the first prime.
		

Crossrefs

Programs

  • Mathematica
    a = {0}; For[n = 2, n < 80, n++, max = 0; b = FactorInteger[n]; For[j = 1, j < Length[b] + 1, j++, If[b[[j, 1]]^b[[j, 2]] > max, max = b[[j, 1]]^b[[j, 2]]]]; AppendTo[a, PrimePi[FactorInteger[max][[1, 1]]]]]; a (* Stefan Steinerberger, Oct 24 2007 *)

Extensions

More terms from Stefan Steinerberger, Oct 24 2007

A308617 Integers i such that the equation A088387(i) = p has N > 1 solutions in the interval prevprime(i)..nextprime(i).

Original entry on oeis.org

140, 147, 621, 630, 2184, 2197, 2511, 2520, 3230, 3249, 3740, 3757, 4180, 4199, 5750, 5775, 9975, 10000, 19635, 19652, 26600, 26625, 30600, 30625, 40040, 40053, 43355, 43384, 45900, 45927, 50232, 50255, 50600, 50625, 64515, 64538, 67320, 67337, 68400, 68425
Offset: 1

Views

Author

I. V. Serov & Michel Marcus, Jun 25 2019

Keywords

Comments

Conjecture: N = 2. Checked up to 10^8.

Examples

			Between primes 139 and 149: A088387(140) = A088387(147) = 7.
Between primes 619 and 631: A088387(621) = A088387(630) = 3.
Between primes 8752871 and 8752987: A088387(8752880) = A088387(8752951) = 71 and A088387(8752926) = A088387(8752967) = 41.
Between primes 33622489 and 33622607: A088387(33622507) = A088387(33622600) = 31.
		

Crossrefs

Cf. A007917 (prevprime), A007918 (nextprime), A088387, A034699, A308752 (analog), A038610.

Programs

  • MATLAB
    n = 0; ip = 0;
    for m = 1:oo
    if isprime(m) ip = ip + 1; end
    if A088387(m) == m & m > 1
      for i = A007917(ip):A007918(ip)
       for j = A007917(ip):A007918(ip)
        if A088387(i) == A088387(j) & i ~= j
         n = n + 1; a(n) = i;
        end
       end
      end
    end
    end
    
  • Maple
    A88387:= proc(n) local F,j;
      F:= ifactors(n)[2];
      F[max[index](map(t -> t[1]^t[2],F)),1]
    end proc:
    R:= NULL: count:= 0:
    q:= 2:
    while count < 100 do
      p:= nextprime(q);
      L:= [$(q+1)..(p-1)];
      V:= map(A88387,L);
      S:= select(t -> numboccur(t,V) > 1, convert(V,set));
      J:= select(i -> member(V[i],S),[$1..p-q-1]);
      count:= count+nops(J);
      R:= R, op(L[J]);
      q:= p;
    od:
    R; # Robert Israel, Jun 20 2024
  • Mathematica
    A088387[n_] := MaximalBy[FactorInteger[n], Power @@ # &][[1, 1]]; A034699[n_] := If[n == 1, 1, Max[#[[1]]^#[[2]] & /@ FactorInteger@n]]; t = Table[Table[A088387[n],{n, Prime[k], Prime[k + 1]-1}], {k, 2,12000}  ]; duplicates = Select[t, Not@DuplicateFreeQ[#] &]; a = {}; pickFrom[list_] := Do[If[Count[list, list[[k]]] > 1 , a = Append[a, k - 1 + First[list]]], {k, 2, Length[list]}]; pickFrom /@ duplicates; a (* Jianglin Luo, Dec 01 2023 *)
  • PARI
    plppf(n) = if(1==n, 1, my(f=factor(n), p=0); isprimepower(vecmax(vector(#f[, 1], i, f[i, 1]^f[i, 2])), &p); (p)); \\ A088387
    lista(nn) = {for (n=1, nn, my(p = prime(n), q = nextprime(p+1)); my(v = vector(q-p-1, k, plppf(k+p)), vs = vecsort(v,,8)); if (#v != #vs, for (i=1, #vs, my(vx = select(x->(x==vs[i]), v, 1)); if (#vx > 1, for (j=1, #vx, print1(p+vx[j], ", "));););););} \\ Michel Marcus, Jun 27 2019

A090662 Duplicate of A088387.

Original entry on oeis.org

2, 3, 2, 5, 3, 7, 2, 3, 5, 11, 2, 13, 7, 5, 2, 17, 3, 19, 5, 7, 11, 23, 2, 5, 13, 3, 7, 29, 5, 31, 2
Offset: 2

Views

Author

Keywords

A034699 Largest prime power factor of n.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

n divides lcm(1, 2, ..., a(n)).
a(n) = A210208(n,A073093(n)) = largest term of n-th row in A210208. - Reinhard Zumkeller, Mar 18 2012
a(n) = smallest m > 0 such that n divides A003418(m). - Thomas Ordowski, Nov 15 2013
a(n) = n when n is a prime power (A000961). - Michel Marcus, Dec 03 2013
Conjecture: For all n between two consecutive prime numbers, all a(n) are different. - I. V. Serov, Jun 19 2019
Disproved with between p=prime(574) = 4177 and prime(575) = 4201, a(4180) = a(4199) = 19. See A308752. - Michel Marcus, Jun 19 2019
Conjecture: For any N > 0, there exist numbers n and m, N < n < n+a(n) <= m, such that all n..m are composite and a(n) = a(m). - I. V. Serov, Jun 21 2019
Conjecture: For all n between two consecutive prime numbers, all (-1)^n*a(n) are different. Checked up to 5*10^7. - I. V. Serov, Jun 23 2019
Disproved: between p = prime(460269635) = 10120168277 and p = prime(460269636) = 10120168507 the numbers n = 10120168284 and m = 10120168498 form a pair such that (-1)^n*a(n) = (-1)^m*a(m) = 107. - L. Joris Perrenet, Jan 05 2020
a(n) = cardinality of smallest set on which idempotence of order n+1 (f^{n+1} = f) differs from idempotence of order e for 2 <= e <= n (see von Eitzen link for proof); derivable from A245501. - Mark Bowron, May 22 2025

Crossrefs

Programs

  • Haskell
    a034699 = last . a210208_row
    -- Reinhard Zumkeller, Mar 18 2012, Feb 14 2012
    
  • Mathematica
    f[n_] := If[n == 1, 1, Max[ #[[1]]^#[[2]] & /@ FactorInteger@n]]; Array[f, 79] (* Robert G. Wilson v, Sep 02 2006 *)
    Array[Max[Power @@@ FactorInteger@ #] &, 79] (* Michael De Vlieger, Jul 26 2018 *)
  • PARI
    a(n) = if(1==n,n,my(f=factor(n)); vecmax(vector(#f[, 1], i, f[i, 1]^f[i, 2]))); \\ Charles R Greathouse IV, Nov 20 2012, check for a(1) added by Antti Karttunen, Aug 06 2018
    
  • PARI
    A034699(n) = if(1==n,n,fordiv(n, d, if(isprimepower(n/d), return(n/d)))); \\ Antti Karttunen, Aug 06 2018
    
  • Python
    from sympy import factorint
    def A034699(n): return max((p**e for p, e in factorint(n).items()), default=1) # Chai Wah Wu, Apr 17 2023

Formula

If n = p_1^e_1 *...* p_k^e_k, p_1 < ... < p_k primes, then a(n) = Max_i p_i^e_i.
a(n) = A088387(n)^A088388(n). - Antti Karttunen, Jul 22 2018
a(n) = n/A284600(n) = n - A081805(n) = A034684(n) + A100574(n). - Antti Karttunen, Aug 06 2018
a(n) = a(m) iff m = d*a(n), where d is a divisor of A038610(a(n)). - I. V. Serov, Jun 19 2019

A088388 Exponent of the largest prime power factor of n, a(1)=0.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Sep 28 2003

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := If[n==1, 0, MaximalBy[FactorInteger[n], #[[1]]^#[[2]]&][[1, 2]]];
    Array[a, 100] (* Jean-François Alcover, Dec 03 2021 *)
  • PARI
    A088388(n) = if(1==n,0,my(f=factor(n)); isprimepower(vecmax(vector(#f[, 1], i, f[i, 1]^f[i, 2])))); \\ Antti Karttunen, Jul 22 2018
    
  • Python
    from sympy import factorint
    def A088388(n): return max(((p**e,e) for p, e in factorint(n).items()), default=(0,0))[1] # Chai Wah Wu, Apr 17 2023

Formula

A034699(n) = A088387(n)^a(n).

A307746 Triangle read by rows, obtained by omitting all the 1's from the triangle in A307641 (except for the first row).

Original entry on oeis.org

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

Views

Author

I. V. Serov, Apr 26 2019

Keywords

Comments

Has same shape as the triangle in A027746. The first difference occurs at row 12.

Examples

			Triangle begins:
1;
2;
3;
2, 2;
5;
2, 3;
7;
2, 2, 2;
3, 3;
2, 5;
11;
2, 3, 2;
...
		

Crossrefs

Programs

  • PARI
    f(n)=ispower(n, , &n); if(isprime(n), n, 1); \\ A014963
    row(n) = if (n==1, [1], my(d=divisors(n)); select(x->x!=1, vector(#d, k, f(d[k]))));
    tabl(nn) = for (n=1, nn, print(row(n))); \\ Michel Marcus, Apr 27 2019

Formula

Row(i) = {d|i, A014963(d) > 1} A014963(d).
For i > 1, T(i, A001222(i)) = A088387(i). This is the last term of the i-th row.

A307723 Naturally ordered prime factorization of n as a quasi-logarithmic word over the binary alphabet {1,0}.

Original entry on oeis.org

10, 1100, 1010, 110100, 101100, 11011000, 101010, 11001100, 10110100, 1101101000, 10110010, 1101100100, 1011011000, 1100110100, 10101010, 1101010100, 1011001100, 110110011000, 1010110100, 110011011000
Offset: 2

Views

Author

I. V. Serov, Apr 24 2019

Keywords

Comments

Let m(n) be the number of digits (letters) in a(n).
m(n) = 2*A064097(n) = 2*(A073933(n)-1).
Split the word a(n) into two parts of equal length. The number of 1's in the left part equals the number of 0's in the right part and vice versa.

Examples

			The sequence begins:
   n a(n)
  -- -----------
   1
   2 10
   3 1100
   4 1010
   5 110100
   6 101100
   7 11011000
   8 101010
   9 11001100
  10 10110100
  11 1101101000
  12 10110010
  ...
		

Crossrefs

Formula

a(1) is empty.
a(n) = concatenation(1, a(n-1), 0) if n is prime.
a(n) = concatenation_{k=1..A001222(n)} a(A307746(n,k)) if n is composite.
a(n) = concatenation(a(n/A088387(n)), a(A088387(n))) if n is composite.

A346152 a(n) is the least prime divisor p_j of n such that if n = Product_{i=1..k} p_i^e_i and p_1 < p_2 < ... < p_k, then Product_{i=1..j-1} p_i^e_i <= sqrt(n) < Product_{i=j..k} p_i^e_i. a(1) = 1.

Original entry on oeis.org

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

Views

Author

Amiram Eldar, Jul 07 2021

Keywords

Comments

First differs from A088387 at n = 30.
First differs from A197861 at n = 24.
Erdős (1982) proved that for any 0 <= alpha <= 1, the asymptotic density g(alpha) of numbers k with a(k) < k^alpha exists, and that it is continuous and strictly increasing between g(0) = 0 and g(1) = 1.
In the case of alpha = 1/2, the sequence is A063539 \ {1} whose asymptotic density is g(1/2) = 1 - log(2) (A244009).

Examples

			a(4) = 2 since 1 <= sqrt(4) < 2^2.
a(6) = 3 since 2 <= sqrt(6) < 2*3.
a(30) = 3 since 2 <= sqrt(30) < 2*3*5.
		

Crossrefs

Programs

  • Mathematica
    a[1] = 1; a[n_] := Module[{fct = FactorInteger[n], prods, ind}, prods = Rest @ FoldList[Times, 1, Power @@@ fct]; ind = FirstPosition[prods^2, _?(# > n &)][[1]]; fct[[ind, 1]]]; Array[a, 100]

Formula

a(n) <= A006530(n).
a(p^e) = p for prime p and e>=1.

A381131 If n = (p_1^e_1)*(p_2^e_2)*(p_3^e_3)*... and min(p_1^e_1,p_2^e_2,...) = p_k^e_k then a(n) = p_k, a(1) = 1.

Original entry on oeis.org

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

Views

Author

Ilya Gutkovskiy, Feb 14 2025

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Exp[MangoldtLambda[Min @@ (#[[1]]^#[[2]] & /@ FactorInteger[n])]], {n, 80}]
  • PARI
    a(n) = if (n==1, 1, my(f=factor(n), v=vector(#f~, k, f[k,1]^f[k,2]), m=vecmin(v), i=select(x->(x==m), v, 1)); f[i[1], 1]); \\ Michel Marcus, Feb 19 2025

A365521 a(1) = 1; for n > 1, a(n) is the prime factor of n that has not appeared for the longest time in {a(1),...,a(n-2),a(n-1)}.

Original entry on oeis.org

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

Views

Author

Jianglin Luo, Sep 08 2023

Keywords

Examples

			a(6)=3 because 6 = 2*3 and 2=a(4) has appeared more recently than 3=a(3).
a(12)=2 because 12 = 2^2*3 and 3=a(9) has appeared more recently than 2=a(8).
a(30)=2 because 30 = 2*3*5 and 3=a(27) and 5=a(25) have appeared more recently than 2=a(24).
		

Crossrefs

Programs

  • PARI
    See PARI link \\ David A. Corneth, Sep 08 2023
  • SageMath
    def hpf_seq(top):
        H=[0,1,2,3]
        for n in range(4,top):
            prime_factors=[part[0] for part in list(factor(n))]
            cursor=-1
            while len(prime_factors)>1:
                if H[cursor] in prime_factors:
                    prime_factors.remove(H[cursor])
                cursor-=1
            hpf=prime_factors[0]
            H.append(hpf)
        return H
    
Showing 1-10 of 10 results.