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 12 results. Next

A252757 Permutation of natural numbers: a(1)=1, and for n>1, if n is k-th number whose largest prime factor is less than the square of its smallest prime factor [i.e., n = A251726(k)], a(n) = 2*a(k), otherwise, when n = A251727(k), a(n) = 1 + 2*a(k).

Original entry on oeis.org

1, 2, 4, 8, 16, 32, 64, 128, 256, 3, 512, 6, 1024, 5, 12, 2048, 10, 24, 4096, 9, 20, 17, 48, 8192, 18, 33, 40, 65, 34, 129, 96, 16384, 257, 513, 36, 66, 80, 7, 1025, 13, 130, 2049, 68, 11, 258, 25, 192, 32768, 514, 4097, 21, 49, 1026, 72, 132, 8193, 19, 41, 160, 35, 14, 97, 2050, 26, 260, 16385, 4098, 37, 67, 81, 136, 22
Offset: 1

Views

Author

Antti Karttunen, Jan 02 2015

Keywords

Crossrefs

Inverse: A252758.
Similar permutations: A243287, A135141, A237427.

Formula

a(1)=1, and for n>1: if A252372(n) = 1 [i.e. the largest prime factor of n is less than the square of its smallest prime factor], a(n) = 2*a(A252373(k)), otherwise, a(n) = 1 + 2*a(n-A252373(n)-1).

A252758 Permutation of natural numbers: a(1) = 1, a(2n) = A251726(a(n)), a(2n+1) = A251727(a(n)).

Original entry on oeis.org

1, 2, 10, 3, 14, 12, 38, 4, 20, 17, 44, 15, 40, 61, 92, 5, 22, 25, 57, 21, 51, 72, 102, 18, 46, 64, 94, 108, 132, 191, 182, 6, 26, 29, 60, 35, 68, 101, 124, 27, 58, 85, 116, 135, 152, 221, 198, 23, 52, 75, 106, 115, 138, 193, 184, 239, 206, 311, 242, 499, 333, 467, 318, 7, 28, 36, 69, 43, 76, 107, 130, 54, 87, 127, 145, 217, 196, 283, 231, 37
Offset: 1

Views

Author

Antti Karttunen, Jan 02 2015

Keywords

Crossrefs

Inverse: A252757.
Similar permutations: A243288, A227413, A237126.

Formula

a(1) = 1, a(2n) = A251726(a(n)), a(2n+1) = A251727(a(n)).

A252371 a(n) = A243055(A251727(n)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Dec 17 2014

Keywords

Crossrefs

Programs

Formula

a(n) = A243055(A251727(n)).
a(n) = A243055(A066048(A251727(n))). [Result depends only on the smallest and the largest prime factor of A251727(n).]

A138511 Semiprimes where the larger prime factor is greater than the square of the smaller prime factor, short: semiprimes p*q, p^2 < q.

Original entry on oeis.org

10, 14, 22, 26, 33, 34, 38, 39, 46, 51, 57, 58, 62, 69, 74, 82, 86, 87, 93, 94, 106, 111, 118, 122, 123, 129, 134, 141, 142, 145, 146, 155, 158, 159, 166, 177, 178, 183, 185, 194, 201, 202, 205, 206, 213, 214, 215, 218, 219, 226, 235, 237, 249, 254, 262, 265, 267, 274, 278, 291, 295, 298, 302, 303, 305
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 21 2008

Keywords

Comments

From Antti Karttunen, Dec 17 2014, further edited Jan 01 & 04 2014: (Start)
Semiprimes p*q, p < q, such that the smallest r for which r^k <= p and q < r^(k+1) [for some k >= 0] is q+1, and thus k = 0. In other words, semiprimes whose both prime factors do not fit (simultaneously) between any two consecutive powers of any natural number r less than or equal to the larger prime factor. This condition forces the larger prime factor q to be greater than the square of the smaller prime factor because otherwise the opposite condition given in A251728 would hold.
Assuming that A054272(n), the number of primes in interval [prime(n), prime(n)^2], is nondecreasing (implied for example if Legendre's or Brocard's conjecture is true), these are also "unsettled" semiprimes that occur in a square array A083221 constructed from the sieve of Eratosthenes, "above the line A251719", meaning that if and only if row < A251719(col) then a semiprime occurring at A083221(row, col) is in this sequence, and conversely, all the semiprimes that occur at any position A083221(row, col) where row >= A251719(col) are in the complementary sequence A251728.
(End)
Semiprimes p*q, p < q, such that b = q+1 is the minimal base with the property that p and q have equal length representations in base b. This was the original definition, which is based primarily on A138510: A138510(A174956(a(n))) = A084127(A174956(a(n))) + 1.

Examples

			See A138510.
		

Crossrefs

Cf. A138510.
Complement of A251728 in A001358.
Subsequence of A088381.
An intersection of A001358 (semiprimes) and A251727.
Also an intersection of A001358 and A253569, from the latter which this sequence differs for the first time at n=60, where A253569(60) = 290, while here a(60) = 291.
Also an intersection A001358 and A245729.

Programs

Formula

Other identities. For all n >= 1 it holds that:
A138510(A174956(a(n))) = A084127(A174956(a(n))) + 1.

Extensions

Wrong comment corrected by Reinhard Zumkeller, Dec 16 2014
New definition by Antti Karttunen, Jan 01 2015; old definition moved to comment.
More terms from Antti Karttunen, Jan 09 2015

A251726 Numbers n > 1 for which gpf(n) < lpf(n)^2, where lpf and gpf (least and greatest prime factor of n) are given by A020639(n) and A006530(n).

Original entry on oeis.org

2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 15, 16, 17, 18, 19, 21, 23, 24, 25, 27, 29, 31, 32, 35, 36, 37, 41, 43, 45, 47, 48, 49, 53, 54, 55, 59, 61, 63, 64, 65, 67, 71, 72, 73, 75, 77, 79, 81, 83, 85, 89, 91, 95, 96, 97, 101, 103, 105, 107, 108, 109, 113, 115, 119, 121, 125, 127, 128, 131, 133, 135, 137, 139, 143, 144
Offset: 1

Views

Author

Antti Karttunen, Dec 17 2014

Keywords

Comments

Numbers n > 1 for which there exists r <= gpf(n) such that r^k <= lpf(n) and gpf(n) < r^(k+1) for some k >= 0, where lpf and gpf (least and greatest prime factor of n) are given by A020639(n) and A006530(n) (the original, equivalent definition of the sequence).
Numbers n > 1 such that A252375(n) < 1 + A006530(n). Equally, one can substitute A251725 for A252375.
These are numbers n all of whose prime factors "fit between" two consecutive powers of some positive integer which itself is <= the largest prime factor of n.
Conjecture: If any n is in the sequence, then so is A003961(n).
Note: if Legendre's or Brocard's conjecture is true, then the above conjecture is true as well. See my comments at A251728. - Antti Karttunen, Jan 01 2015

Examples

			For 35 = 5*7, 7 is less than 5^2, thus 35 is included.
For 90 = 2*3*3*5, 5 is not less than 2^2, thus 90 is NOT included.
For 105 = 3*5*7, 7 is less than 3^2, thus 105 is included.
		

Crossrefs

Complement: A251727. Subsequences: A251728, A000961 (after 1).
Characteristic function: A252372. Inverse function: A252373.
Gives the positions of zeros in A252459 (after its initial zero), cf. also A284261.
Cf. A252370 (gives the difference between the prime indices of gpf and lpf for each a(n)).
Sequence gives all n > 1 for which A284252(n) (equally: A284254) is 1, and A284256(n) (equally A284258) is 0, and also n > 1 such that A284260(n) = A006530(n).
Related permutations: A252757-A252758.

Programs

  • Mathematica
    pfQ[n_]:=Module[{f=FactorInteger[n]},f[[-1,1]]Harvey P. Dale, May 01 2015 *)
  • PARI
    for(n=2, 150, if(vecmax(factor(n)[,1]) < vecmin(factor(n)[,1])^2, print1(n,", "))) \\ Indranil Ghosh, Mar 24 2017
    
  • Python
    from sympy import primefactors
    print([n for n in range(2, 150) if max(primefactors(n))Indranil Ghosh, Mar 24 2017

Formula

Other identities. For all n >= 1:
A252373(a(n)) = n. [A252373 works as an inverse or ranking function for this sequence.]

Extensions

A new simpler definition found Jan 01 2015 and the original definition moved to the Comments section.

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

A252375 a(n) = smallest r such that r^k <= spf(n) and gpf(n) < r^(k+1), for some k >= 0, where spf and gpf (smallest and greatest prime factor of n) are given by A020639(n) and A006530(n).

Original entry on oeis.org

2, 2, 2, 2, 2, 2, 2, 2, 2, 6, 2, 2, 2, 8, 3, 2, 2, 2, 2, 6, 3, 12, 2, 2, 2, 14, 2, 8, 2, 6, 2, 2, 12, 18, 2, 2, 2, 20, 14, 6, 2, 8, 2, 12, 3, 24, 2, 2, 2, 6, 18, 14, 2, 2, 4, 8, 20, 30, 2, 6, 2, 32, 3, 2, 4, 12, 2, 18, 24, 8, 2, 2, 2, 38, 3, 20, 4, 14, 2, 6, 2, 42, 2, 8, 5, 44, 30, 12, 2, 6, 4, 24, 32
Offset: 1

Views

Author

Antti Karttunen, Dec 17 2014

Keywords

Crossrefs

A252374 gives the corresponding exponents.
Cf. A251726 (those n for which a(n) <= A006530(n)).
Cf. A251727 (those n > 1 for which a(n) = A006530(n)+1).

Programs

  • Scheme
    (define (A252375 n) (let ((spf (A020639 n)) (gpf (A006530 n))) (let outerloop ((r 2)) (let innerloop ((rx 1)) (cond ((and (<= rx spf) (< gpf (* r rx))) r) ((<= rx spf) (innerloop (* r rx))) (else (outerloop (+ 1 r))))))))
    (define (A252375 n) (let ((x (A251725 n))) (if (= 1 x) 2 x))) ;; Alternatively, using the implementation of A251725.

Formula

If A251725(n) = 1, a(n) = 2, otherwise a(n) = A251725(n).
Other identities. For all n >= 1:
a(n) = a(A066048(n)). [The result depends only on the smallest and the largest prime factor of n.]

A252459 a(n) = Number of iterations of A003961 starting from n which are needed before the result is one of the numbers in A251726. a(1) = 0 by convention.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Dec 17 2014

Keywords

Examples

			a(9) = 0, because 9 is already in A251726.
For n = 10, as 10 is in A251727, but A003961(10) = A251727(prime(1) * prime(3)) = prime(2) * prime(4) = 3*7 = 21 is in A251726, thus a(10) = 1.
For n = 14, as 14 is in A251727, and A003961(14) = 33 (prime(1) * prime(4) -> prime(2) * prime(5)) is also in A251727, and only at the second iteration, A003961(33) = 65 (prime(2) * prime(5) -> prime(3) * prime(6)) the result is in A251726, thus a(14) = 2.
		

Crossrefs

Cf. A003961, A066048, A251726 (gives the positions of zeros after a(1)=0), A252372.
Cf. also A246271, A246272.

Formula

a(1) = 0 and for n > 1, if A252372(n) = 1 then a(n) = 0, otherwise 1 + a(A003961(n)).
Other identities. For all n >= 1:
a(n) = a(A066048(n)). [The result depends only on the smallest and the largest prime factor of n.]

A251725 Smallest number b such that in base-b representation the prime factors of n have equal lengths.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 1, 6, 1, 2, 1, 8, 3, 1, 1, 2, 1, 6, 3, 12, 1, 2, 1, 14, 1, 8, 1, 6, 1, 1, 12, 18, 2, 2, 1, 20, 14, 6, 1, 8, 1, 12, 3, 24, 1, 2, 1, 6, 18, 14, 1, 2, 4, 8, 20, 30, 1, 6, 1, 32, 3, 1, 4, 12, 1, 18, 24, 8, 1, 2, 1, 38, 3, 20, 4, 14, 1, 6, 1, 42, 1, 8, 5, 44, 30, 12, 1, 6, 4, 24, 32, 48, 5, 2, 1, 8, 12, 6
Offset: 1

Views

Author

Antti Karttunen, Dec 16 2014

Keywords

Comments

The "base-1" is here same as "unary base", where n is represented with digit "1" replicated n times. Thus if and only if n is in A000961 (is a power of prime), a(n) = 1. See A252375 for a more consistent treatment of those cases.

Crossrefs

Cf. A252375 (variant).
Cf. A251726 (those n > 1 for which a(n) <= A006530(n)).
Cf. A251727 (those n for which a(n) = A006530(n)+1).
Cf. A000961 (positions of ones).
Cf. A027748.

Programs

  • Haskell
    import Data.List (unfoldr); import Data.Tuple (swap)
    a251725 1 = 1
    a251725 n = if length ps == 1 then 1 else head $ filter f [2..]  where
      f b = all (== len) lbs where len:lbs = map (length . d b) ps
      ps = a027748_row n
      d b = unfoldr (\z -> if z == 0 then Nothing else Just $ swap $ divMod z b)
    -- Reinhard Zumkeller, Dec 17 2014

Formula

Other identities. For all n >= 1:
A138510(n) = a(A001358(n)).
a(n) = a(A066048(n)). [The result depends only on the smallest and the largest prime factor of n.]

A253569 Composite numbers n = p_i * p_j * p_k * ... * p_u, p_i <= p_j <= p_k <= ... <= p_u, where each successive prime factor (when sorted into a nondecreasing order) is greater than the square of the previous: (p_i)^2 < p_j, (p_j)^2 < p_k, etc.

Original entry on oeis.org

10, 14, 22, 26, 33, 34, 38, 39, 46, 51, 57, 58, 62, 69, 74, 82, 86, 87, 93, 94, 106, 111, 118, 122, 123, 129, 134, 141, 142, 145, 146, 155, 158, 159, 166, 177, 178, 183, 185, 194, 201, 202, 205, 206, 213, 214, 215, 218, 219, 226, 235, 237, 249, 254, 262, 265, 267, 274, 278, 290
Offset: 1

Views

Author

Keywords

Comments

Numbers n = A020639(n) * A014673(n) * A054576(n), for which A020639(n)^2 < A014673(n) and either A054576(n) = 1 or A032742(n) satisfies the same condition (is the term of this sequence).

Examples

			290 = 2*5*29 is a member, because 2^2 < 5 and 5^2 < 29.
		

Crossrefs

Complement: A253567.
Subsequence of A002808, A005117, A088381, A251727, A245729 and A253785.
A138511 is a subsequence, from which this sequence differs for the first time at n=60, where A138511(60) = 291, while here a(60) = 290.

Programs

  • Haskell
    a253569 n = a253569_list !! (n-1)
    a253569_list = filter f [1..] where
                        f x = (p ^ 2 < a020639 q) && (a010051' q == 1 || f q)
                              where q = div x p; p = a020639 x
    -- Antti Karttunen after Reinhard Zumkeller's code for A138511, Jan 09 2015
    a253569 n = a253569_list !! (n-1)
    a253569_list = filter (not . f''') a002808_list where
       f''' x = p ^ 2 > a020639 q || (a010051 q == 0 && f''' q)
                where q = div x p; p = a020639 x
    -- Reinhard Zumkeller, Jan 12 2015
    (Scheme, with Antti Karttunen's IntSeq-library)
    (define A253569 (MATCHING-POS 1 1 (lambda (n) (and (> (A001222 n) 1) (numbers-sparsely-distributed? (ifactor n))))))
    (define (numbers-sparsely-distributed? lista) (cond ((null? lista) #t) ((null? (cdr lista)) #t) ((> (A000290 (car lista)) (cadr lista)) #f) (else (numbers-sparsely-distributed? (cdr lista)))))
    ;; Antti Karttunen, Jan 16 2015
  • Mathematica
    cnQ[n_]:=CompositeQ[n]&&Union[Boole[#[[2]]>#[[1]]^2&/@Partition[Flatten[Table[ #[[1]], #[[2]]]&/@FactorInteger[n]],2,1]]]=={1}; Select[Range[300],cnQ] (* Harvey P. Dale, Jul 10 2023 *)
Showing 1-10 of 12 results. Next