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

A071321 Alternating sum of all prime factors of n; primes nondecreasing, starting with the least prime factor: A020639(n).

Original entry on oeis.org

0, 2, 3, 0, 5, -1, 7, 2, 0, -3, 11, 3, 13, -5, -2, 0, 17, 2, 19, 5, -4, -9, 23, -1, 0, -11, 3, 7, 29, 4, 31, 2, -8, -15, -2, 0, 37, -17, -10, -3, 41, 6, 43, 11, 5, -21, 47, 3, 0, 2, -14, 13, 53, -1, -6, -5, -16, -27, 59, -2, 61, -29, 7, 0, -8
Offset: 1

Views

Author

Reinhard Zumkeller, May 18 2002

Keywords

Comments

a(n) = 0 iff n square, a(A000290(n)) = 0;
a(n) <= 0 iff A001222(n) is even;
a(n) = n iff n prime, a(A000040(n)) = A000040(n).
a(2n) = -a(n) + 2. - Ralf Stephan

Examples

			72 = 2*2*2*3*3, therefore a(72) = 2 - 2 + 2 - 3 + 3 = 2;
90 = 2*3*3*5, therefore a(90) = 2 - 3 + 3 - 5 = -3.
		

Crossrefs

Programs

  • Haskell
    a071321 1 = 0
    a071321 n = sum $ zipWith (*) a033999_list $ a027746_row n
    -- Reinhard Zumkeller, Jun 01 2013
    
  • Mathematica
    Join[{0},Table[Total[Times@@@Partition[Riffle[Flatten[Table[#[[1]],{#[[2]]}]&/@ FactorInteger[n]],{1,-1},{2,-1,2}],2]],{n,2,100}]] (* Harvey P. Dale, Sep 23 2015 *)
  • Python
    from sympy import factorint
    def A071321(n):
        fs = factorint(n,multiple=True)
        return sum(fs[::2])-sum(fs[1::2]) # Chai Wah Wu, Aug 23 2021

Formula

a(n) = -A071322(n)*A008836(n). - Franklin T. Adams-Watters, Oct 18 2006

A242719 Smallest even k such that lpf(k-3) > lpf(k-1) >= prime(n), where lpf=least prime factor (A020639).

Original entry on oeis.org

10, 26, 50, 170, 170, 362, 362, 842, 842, 1370, 1370, 1850, 1850, 2210, 3722, 3722, 3722, 4892, 5042, 7082, 7922, 7922, 7922, 10610, 10610, 10610, 11450, 13844, 16130, 16130, 17162, 19322, 19322, 24614, 24614, 25592, 29504, 29930, 29930, 36020, 36020
Offset: 2

Views

Author

Vladimir Shevelev, May 21 2014

Keywords

Comments

The sequence is connected with a sufficient condition for the existence of an infinity of twin primes. In contrast to A242489, this sequence is nondecreasing.
All even numbers of the form A062326(n)^2 + 1 are in the sequence. All a(n)-1 are semiprimes. - Vladimir Shevelev, May 24 2014
a(n) <= A242489(n); a(n) >= prime(n)^2+1. Conjecture: a(n) <= prime(n)^4. - Vladimir Shevelev, Jun 01 2014
Conjecture: all numbers a(n)-3 are primes. Peter J. C. Moses verified this conjecture up to a(2001) (cf. with conjecture in A242720). - Vladimir Shevelev, Jun 09 2014

Crossrefs

Programs

  • Mathematica
    lpf[k_] := FactorInteger[k][[1, 1]];
    a[n_] := a[n] = For[k = If[n == 2, 10, a[n-1]], True, k = k+2, If[lpf[k-3] > lpf[k-1] >= Prime[n], Return[k]]];
    Array[a, 50, 2] (* Jean-François Alcover, Nov 06 2018 *)
  • PARI
    lpf(k) = factorint(k)[1,1];
    vector(50, n, k=6; while(lpf(k-3)<=lpf(k-1) || lpf(k-1)Colin Barker, Jun 01 2014

Formula

Conjecturally, a(n) ~ (prime(n))^2, as n goes to infinity (cf. A246748, A246819). - Vladimir Shevelev, Sep 02 2014
a(n) = prime(n)^2 + 1 for and only for numbers n>=2 which are in A137291. - Vladimir Shevelev, Sep 04 2014

A242720 Smallest even k such that the pair {k-3,k-1} is not a twin prime pair and lpf(k-1) > lpf(k-3) >= prime(n), where lpf = least prime factor (A020639).

Original entry on oeis.org

12, 38, 80, 212, 224, 440, 440, 854, 1250, 1460, 1742, 2282, 2282, 3434, 4190, 4664, 4760, 4760, 6890, 8054, 8054, 8054, 12374, 12830, 12830, 13592, 13592, 14282, 17402, 17402, 18212, 22502, 22502, 22502, 25220, 28202, 28202, 32234, 32402, 32402, 38012
Offset: 2

Views

Author

Vladimir Shevelev, May 21 2014

Keywords

Comments

The sequence is nondecreasing. See comment in A242758.
a(n) >= prime(n)^2+3. Conjecture: a(n) <= prime(n)^4. - Vladimir Shevelev, Jun 01 2014
Conjecture. There are only a finite number of composite numbers of the form a(n)-1. Peter J. C. Moses found only two: a(16)-1 = 4189 = 59*71 and a(20)-1 = 6889 = 83^2 and no others up to a(2501). Most likely, there are no others. - Vladimir Shevelev, Jun 09 2014

Crossrefs

Programs

  • Mathematica
    lpf[n_] := FactorInteger[n][[1, 1]];
    Clear[a]; a[n_] := a[n] = For[k = If[n <= 2, 2, a[n-1]], True, k = k+2, If[Not[PrimeQ[k-3] && PrimeQ[k-1]] && lpf[k-1] > lpf[k-3] >= Prime[n], Return[k]]];
    Table[a[n], {n, 2, 50}] (* Jean-François Alcover, Nov 02 2018 *)
  • PARI
    lpf(k) = factorint(k)[1,1];
    vector(60, n, k=6; while((isprime(k-3) && isprime(k-1)) || lpf(k-1)<=lpf(k-3) || lpf(k-3)Colin Barker, Jun 01 2014

Formula

Conjecturally, a(n) ~ (prime(n))^2, as n goes to infinity (cf. A246748, A246821). - Vladimir Shevelev, Sep 02 2014
For n>=3, a(n) >= (prime(n)+1)^2 + 2. Equality holds for terms of A246824. - Vladimir Shevelev, Sep 04 2014

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.

A242758 Smallest even k such that lpf(k-1) > lpf(k-3) >= prime(n), where lpf=least prime factor (A020639).

Original entry on oeis.org

6, 8, 14, 14, 20, 20, 32, 32, 32, 44, 44, 44, 62, 62, 62, 62, 74, 74, 74, 104, 104, 104, 104, 104, 104, 110, 110, 140, 140, 140, 140, 140, 152, 152, 182, 182, 182, 182, 182, 182, 194, 194, 200, 200, 230, 230, 230, 230, 242, 242, 242, 272, 272, 272, 272, 272
Offset: 2

Views

Author

Vladimir Shevelev, May 22 2014

Keywords

Comments

This is a version of A242720 with the absolute minima of k in the definition. The sequence is nondecreasing. Hypothetically, every pair {a(n)-3, a(n)-1} is a pair of twin primes.
If there exist infinitely many n such that a(n) < A242719(n) < a(n)^2, then from the result in the Shevelev link, it follows that for such n the set of numbers {even k: lpf(k-1) > lpf(k-3) >= prime(n)} either attains the absolute minimum of a(n) only in the case when {a(n)-3, a(n)-1} are twin primes, or does not attain it at all. Therefore, if there is only a finite number of twin primes, we have a contradiction. Thus the above condition is sufficient for infinity of twin primes.
Note also that, if there is only a finite number of twin primes, then after the last pair of them, this sequence will coincide with A242720. Then, in order to avoid a contradiction (again according to the Shevelev link), we should accept that there exists a number N_0 such that, for every n >= N_0, the following inequality holds: max(A242719(n),A242720(n)) > (min(A242719(n),A242720(n)))^2. - Vladimir Shevelev, May 24 2014
It is easy to prove that min(A242719(n), A242720(n)) >= prime(n)^2+1, while we conjecture that max(A242719(n), A242720(n)) <= prime(n)^4. Thus this conjecture implies there are infinitely many twin primes. - Vladimir Shevelev, Jun 01 2014

Crossrefs

Programs

  • Mathematica
    lpf[k_] := FactorInteger[k][[1, 1]];
    a[n_] := a[n] = For[k = If[n == 2, 2, a[n-1]], True, k = k+2, If[lpf[k-1] > lpf[k-3] >= Prime[n], Return[k]]];
    Table[a[n], {n, 2, 100}] (* Jean-François Alcover, Nov 03 2018 *)
  • PARI
    lpf(k) = factorint(k)[1,1];
    vector(100, n, k=6; while(lpf(k-1)<=lpf(k-3) || lpf(k-3)Colin Barker, Jun 01 2014

A251727 Numbers n > 1 for which gpf(n) > spf(n)^2, where spf and gpf (smallest and greatest prime factor of n) are given by A020639(n) and A006530(n).

Original entry on oeis.org

10, 14, 20, 22, 26, 28, 30, 33, 34, 38, 39, 40, 42, 44, 46, 50, 51, 52, 56, 57, 58, 60, 62, 66, 68, 69, 70, 74, 76, 78, 80, 82, 84, 86, 87, 88, 90, 92, 93, 94, 98, 99, 100, 102, 104, 106, 110, 111, 112, 114, 116, 117, 118, 120, 122, 123, 124, 126, 129, 130, 132, 134, 136, 138, 140, 141, 142, 145, 146, 148, 150, 152
Offset: 1

Views

Author

Antti Karttunen, Dec 17 2014. A new simpler definition found Jan 01 2015 and the original definition moved to the Comments section

Keywords

Comments

Numbers n > 1 for which the smallest r such that r^k <= spf(n) and gpf(n) < r^(k+1) [for some k >= 0] is gpf(n)+1. Here spf and gpf (smallest 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.
Numbers n > 1 for which there doesn't exist any r <= gpf(n) 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).

Crossrefs

Complement: A251726. Subsequence: A138511.
Gives the positions of zeros in A252374 following its initial term.
Cf. A252371 (difference between the prime indices of gpf and spf of each a(n)).
Related permutations: A252757-A252758.

A302045 a(1) = 0, for n > 1, a(n) = A001511(A078898(n)); Number of instances of the smallest prime factor A020639(n) in nonstandard factorization of n that is based on the sieve of Eratosthenes (A083221).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Mar 31 2018

Keywords

Comments

Iterating the map n -> A302044(n) until 1 is reached, and taking the smallest prime factor (A020639) of each term gives a sequence of distinct primes in ascending order, while applying this function (A302045) to those terms gives the corresponding "exponents" of those primes, that is, the count of consecutive occurrences of each prime when iterating the map n -> A302042(n), which gives the same primes with repetitions. Permutation pair A250245/A250246 maps between this non-standard prime factorization of n and the ordinary factorization of n. See also comments and examples in A302042.

Crossrefs

Programs

Formula

a(1) = 0, for n > 1, a(n) = A001511(A078898(n)).
For n > 1, a(n) = A250245(A067029(A250246(n))).

A092524 Binary representation of n interpreted in base p, where p is the smallest prime factor of n: p = A020639(n).

Original entry on oeis.org

1, 2, 4, 4, 26, 6, 57, 8, 28, 10, 1343, 12, 2367, 14, 40, 16, 83522, 18, 130341, 20, 91, 22, 280394, 24, 751, 26, 112, 28, 732512, 30, 954305, 32, 244, 34, 3131, 36, 69345327, 38, 256, 40, 115925123, 42, 147087994, 44, 280, 46, 229451087, 48
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 07 2004

Keywords

Comments

n>1: a(n) = n iff n is even.
a(n) = A005836(n) iff n=6k-3, k>0 (see A016945).
The following sequences all appear to have the same parity: A003071, A029886, A061297, A092524, A093431, A102393, A104258, A122248, A128975. - Jeremy Gardiner, Dec 28 2008

Examples

			n = 35 = 7*5 = '100011': 2^5 + 2^1 + 2^0 -> a(35) = 5^5 + 5^1 + 5^0 = 3125+5+1 = 3131.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := If[EvenQ[n], n, FromDigits[IntegerDigits[n, 2], FactorInteger[n][[1, 1]]]]; Array[a, 50] (* Amiram Eldar, Aug 02 2020 *)

A268385 a(1) = 1, for n > 1, a(n) = A020639(n)^A193231(A067029(n)) * a(A028234(n)).

Original entry on oeis.org

1, 2, 3, 8, 5, 6, 7, 4, 27, 10, 11, 24, 13, 14, 15, 32, 17, 54, 19, 40, 21, 22, 23, 12, 125, 26, 9, 56, 29, 30, 31, 16, 33, 34, 35, 216, 37, 38, 39, 20, 41, 42, 43, 88, 135, 46, 47, 96, 343, 250, 51, 104, 53, 18, 55, 28, 57, 58, 59, 120, 61, 62, 189, 64, 65, 66, 67, 136, 69, 70, 71, 108, 73, 74, 375, 152, 77, 78, 79, 160, 243
Offset: 1

Views

Author

Antti Karttunen, Feb 10 2016

Keywords

Comments

Self-inverse permutation of natural numbers obtained by mapping the exponent of each prime in the prime factorization of n through involution A193231.
Multiplicative with p^e -> p^A193231(e), p prime and e > 0.

Examples

			For n = 4 = 2^2, A193231(2) = 3, thus a(4) = 2^3 = 8.
For n = 9 = 3^2, A193231(2) = 3, thus a(9) = 3^3 = 27.
For n = 72 = 2^3 * 3^2, as A193231(2) = 3 and vice versa A193231(3) = 2, we have a(72) = 2^2 * 3^3 = 108. Note also how a(72) = a(8*9) = a(8) * a(9) = 4*27.
For n = 81 = 3^4, A193231(4) = 5, thus a(81) = 3^5 = 243.
		

Crossrefs

Formula

a(1) = 1, and for n > 1, a(n) = A020639(n)^A193231(A067029(n)) * a(A028234(n)).
a(1) = 1, and for n > 1, a(n) = A000079(A193231(A007814(n))) * A003961(a(A064989(n))).
a(A059897(n,k)) = A059897(a(n), a(k)). - Peter Munn, Nov 27 2019

A081306 Numbers n with prime factors less than 2*spf(n), where spf(m) is the smallest prime factor of m (A020639).

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Mar 17 2003

Keywords

Comments

A081303(a(n)) < 0, A006530(a(n)) < A020639(a(n))*2.

Crossrefs

Complement of A069900.
Union of {1} and A069899. [R. J. Mathar, Sep 18 2008]

Programs

  • Maple
    filter:= proc(n) local F;
      F:= numtheory:-factorset(n);
      max(F) < 2*min(F);
    end proc:
    select(filter, [$1..200]); # Robert Israel, Mar 28 2018
  • Mathematica
    Select[Range[200], Max[F = FactorInteger[#][[All, 1]]] < 2 Min[F]&] (* Jean-François Alcover, Mar 04 2019 *)
Showing 1-10 of 1047 results. Next