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.

Previous Showing 41-50 of 57 results. Next

A273879 Numbers k such that k and k+1 have 6 distinct prime factors.

Original entry on oeis.org

11243154, 13516580, 16473170, 16701684, 17348330, 19286805, 20333495, 21271964, 21849905, 22054515, 22527141, 22754589, 22875489, 24031370, 25348070, 25774329, 28098245, 28618394, 28625960, 30259229, 31846269, 32642805
Offset: 1

Views

Author

Keywords

Comments

Goldston, Graham, Pintz, & Yildirim prove that this sequence is infinite (Theorem 2).

Examples

			13516580 = 2^2 * 5 * 7 * 11 * 67 * 131 and 13516581 = 3 * 13 * 17 * 19 * 29 * 37 so 13516580 is in this sequence.
		

Crossrefs

Numbers k such that k and k+1 have j distinct prime factors: A006549 (j=1, apart from the first term), A074851 (j=2), A140077 (j=3), A140078 (j=4), A140079 (j=5).

Programs

  • Mathematica
    SequencePosition[PrimeNu[Range[3265*10^4]],{6,6}][[All,1]] (* Harvey P. Dale, Nov 20 2021 *)
  • PARI
    is(n)=omega(n)==6 && omega(n+1)==6

Formula

a(1) = A138206(2). - R. J. Mathar, Jul 15 2023
{k: k in A074969 and k+1 in A074969.} - R. J. Mathar, Jul 19 2023

A074592 Smallest prime factors of numbers that are not prime powers.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Aug 25 2002

Keywords

Crossrefs

Programs

  • Mathematica
    s[n_] := Module[{f = FactorInteger[n]}, If[Length[f] > 1, f[[1, 1]], Nothing]]; Array[s, 200] (* Amiram Eldar, Oct 10 2024 *)

Formula

a(n) = A020639(A024619(n)).
a(n) > 2 iff n+1 and n+2 are prime powers (A006549).

A174269 Numbers k such that exactly one of 2^k - 1 and 2^k + 1 is a prime.

Original entry on oeis.org

0, 1, 3, 4, 5, 7, 8, 13, 16, 17, 19, 31, 61, 89, 107, 127, 521, 607, 1279, 2203, 2281, 3217, 4253, 4423, 9689, 9941, 11213, 19937, 21701, 23209, 44497, 86243, 110503, 132049, 216091, 756839, 859433, 1257787, 1398269, 2976221, 3021377, 6972593, 13466917
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Mar 14 2010

Keywords

Comments

Apart from the first term, all terms are primes (Mersenne exponents) or powers of two (Fermat exponents). The sequence consists of all members of A000043 and A092506, apart from 2. - Charles R Greathouse IV, Mar 20 2010
Numbers k such that one of 2^k+1 or 2^k-1 is prime, but not both. - R. J. Mathar, Mar 29 2010
The sequence "Numbers k such that 2^k + (-1)^k is a prime" gives essentially the same sequence, except with the initial 1 replaced by 2. - Thomas Ordowski, Dec 26 2016
The union of 2 and this sequence gives the values k for which 2^k or 2^k - 1 are the numbers in A006549. - Gionata Neri, Dec 19 2015
The union of 2 and this sequence is the values k for which either 2^k - 1 or 2^k + 1, or both, are prime. The reason why this only yields one additional term, 2, is because the number 3 always divides either 2^k - 1 or 2^k + 1 (also implicit in Ordowski comment). - Jeppe Stig Nielsen, Feb 19 2023

Examples

			0 is in the sequence because 2^0 - 1 = 0 is nonprime and 2^0 + 1 = 2 is prime; 2 is not in the sequence because 2^2 - 1 = 3 and 2^2 + 1 = 5 are both prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[0, 5000], Xor[PrimeQ[2^# - 1], PrimeQ[2^# + 1]] &] (* Michael De Vlieger, Jan 03 2016 *)
  • PARI
    isok(k) = my(p = 2^k-1, q = p+2); bitxor(isprime(p), isprime(q)); \\ Michel Marcus, Jan 03 2016

Formula

a(n) = A285929(n) for n > 2. - Jeppe Stig Nielsen, Feb 19 2023

Extensions

a(10)-a(43) from Charles R Greathouse IV, Mar 20 2010

A321489 Numbers m such that both m and m+1 have at least 7 distinct prime factors.

Original entry on oeis.org

965009045, 1068044054, 1168008204, 1177173074, 1209907985, 1218115535, 1240268490, 1338753129, 1344185205, 1408520805, 1477640450, 1487720234, 1509981395, 1663654629, 1693460405, 1731986894, 1758259425, 1819458354, 1821278459, 1826445984, 1857332840
Offset: 1

Views

Author

Amiram Eldar and M. F. Hasler, Nov 12 2018

Keywords

Comments

The first 300 terms of this sequence are such that m and m+1 both have exactly 7 prime divisors. See A321497 for the terms m such that m or m+1 has more than 7 prime factors: the smallest such term is 5163068910.
Numbers m and m+1 can never have a common prime factor (consider them mod p), therefore the terms are > sqrt(p(7+7)#) = A003059(A002110(7+7)). (Here we see that sqrt(p(7+8)#) is a more realistic estimate of a(1), but for smaller values of k we may have sqrt(p(2k+1)#) > m(k) > sqrt(p(2k)#), where m(k) is the smallest of two consecutive integers each having at least k prime divisors. For example, A321503(1) < sqrt(p(3+4)#) ~ A321493(1).)
From M. F. Hasler, Nov 28 2018: (Start)
The first 100 terms and beyond are all congruent to one of {14, 20, 35, 49, 50, 69, 84, 90, 104, 105, 110, 119, 125, 129, 134, 140, 144, 170, 174, 189, 195} mod 210. Here, 35, 195, 189, 14 140, 20 and 174 (in order of decreasing frequency) occur between 6 and 13 times, and {49, 50, 110, 129, 134, 144, 170} occur only once.
However, as observed by Charles R Greathouse IV, one can construct a term of this sequence congruent to any given m > 0, modulo any given n > 0.
The first terms of this sequence which are multiples of 210 are in A321497. An example of a term that is a multiple of 210 but not in A321497 is 29759526510, due to Charles R Greathouse IV. Such examples can be constructed by solving A*210 + 1 = B for A having 3 distinct prime factors not among {2, 3, 5, 7}, B having 7 distinct prime factors and gcd(B, 210*A) = 1. (End)

Examples

			a(1) = 5 * 7 * 11 * 13 * 23 * 83 * 101, a(1)+1 = 2 * 3 * 17 * 29 * 41 * 73 * 109.
		

Crossrefs

Cf. A255346, A321503 .. A321506 (analog for k = 2, ..., 6 prime divisors).
Cf. A321502, A321493 .. A321497 (m and m+1 have at least but not both exactly k = 2, ..., 7 prime divisors).
Cf. A074851, A140077, A140078, A140079 (m and m+1 both have exactly k = 2, 3, 4, 5 prime divisors).
Cf. A002110.

Programs

  • Mathematica
    Select[Range[36000000], PrimeNu[#] > 6 && PrimeNu[# + 1] > 6 &]
  • PARI
    is(n)=omega(n)>6&&omega(n+1)>6
    A321489=List();for(n=965*10^6,1.8e9,is(n)&&listput(A321489,n))

Formula

a(n) ~ n. - Charles R Greathouse IV, Nov 29 2018

A059957 Sum of number of distinct prime factors of n and n+1, or number of distinct prime factors of n(n+1) or of lcm(n,n+1).

Original entry on oeis.org

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

Views

Author

Labos Elemer, Mar 02 2001

Keywords

Comments

If a(n) = 2, then n is in A006549 (Mersenne-primes, Fermat-primes-1).
If a(n) = 2, then n is in A006549, being either a Mersenne prime, a Fermat prime minus one, or n=8, corresponding to the unique solution to Catalan's equation, 3^2 = 2^3 + 1. - Gene Ward Smith, Sep 07 2006
a(n-1), n > 2, is the number of maximal subsemigroups of the monoid of orientation-preserving partial injective mappings on a set with n elements. - Wilf A. Wilson, Jul 21 2017

Examples

			For n = 30030, n has 6 prime factors, 30031 = 59*509 so a(30030) = 6+2 = 8.
For n = 30029, a(30029) = 1+6 = 7.
		

Crossrefs

Programs

  • Mathematica
    Table[ PrimeNu[n*(n + 1)], {n,1,100}] (* G. C. Greubel, May 13 2017 *)
  • PARI
    for(n=1,100, print1(omega(n*(n+1)), ", ")) \\ G. C. Greubel, May 13 2017

Formula

a(n) = A001221(A002378(n)) = A001221(n*(n+1)) = A001221(n)+A001221(n+1) because gcd(n, n+1) = 1.
Sum_{k=1..n} a(k) = 2*n * (log(log(n)) + B) + O(n/log(n)), where B is Mertens's constant (A077761). - Amiram Eldar, Sep 29 2024

Extensions

Name corrected by Rick L. Shepherd, Apr 11 2023

A074852 Composite n such that n and n+2 are prime powers.

Original entry on oeis.org

9, 25, 27, 81, 125, 6561, 24389, 59049, 161051, 357911, 571787, 1442897, 4782969, 5177717, 14348907, 18191447, 30080231, 73560059, 80062991, 118370771, 127263527, 131872229, 318611987, 344472101, 440711081, 461889917, 590589719
Offset: 1

Views

Author

Benoit Cloitre, Sep 10 2002

Keywords

Crossrefs

Programs

  • PARI
    list(lim)=my(v=List(),t);lim+=.5;for(e=2,log(lim)\log(3), forprime(p=3, lim^(1/e),ispower(t=p^e+2,,&t); if(isprime(t), listput(v,p^e)))); vecsort(Vec(v))
    \\ Charles R Greathouse IV, Apr 30 2012
    
  • PARI
    list(lim)=my(v=List());if(lim>=25,listput(v,25));lim+=.5;for(e=2, log(lim)\log(3), forprime(p=3, lim^(1/e),if(isprime(p^e+2), listput(v, p^e)))); vecsort(Vec(v))
    /* This second program assumes A076427(2) = 1 but is about a hundred times faster. I proved that it is correct up to 10^20 without this assumption. */
    \\ Charles R Greathouse IV, Apr 30 2012

Extensions

More terms from Sascha Kurz, Jan 30 2003

A134459 Numbers n such that lcm(1,...,n-1) < lcm(1,...,n) < lcm(1,...,n+1).

Original entry on oeis.org

2, 3, 4, 7, 8, 16, 31, 127, 256, 8191, 65536, 131071, 524287, 2147483647, 2305843009213693951, 618970019642690137449562111, 162259276829213363391578010288127, 170141183460469231731687303715884105727
Offset: 1

Views

Author

Zak Seidov, Jan 18 2008

Keywords

Comments

Or, numbers n such that A003418(n-1) < A003418(n) < A003418(n+1). Sequence is the union(A019434 - 1, A000668).
lcm(1..n-1) < lcm(1..n) iff n is a prime power. So the sequence consists of those n for which both n and n+1 are prime powers. By Catalan's conjecture (proved by Mihailescu), the only case where n and n+1 are both powers > 1 is n=8. Otherwise, whichever of n and n+1 is even must be a power of 2 and the other must be a prime: either a Mersenne prime if n+1 is the power of 2, or a Fermat prime if n is the power of 2. - Robert Israel

Crossrefs

Cf. A000668, A003418, A006549, A019434. Essentially a duplicate of A068194.

Formula

a(n) = A006549(n+1) for n >= 1 (cf. Robert Israel's comment). - Georg Fischer, Nov 02 2018

Extensions

Missing entry 8 added by N. J. A. Sloane, Jan 22 2018, following a suggestion from Jon E. Schoenfield.

A321502 Numbers m such that m and m+1 have at least 2, but m or m+1 has at least 3 prime divisors.

Original entry on oeis.org

65, 69, 77, 84, 90, 104, 105, 110, 114, 119, 129, 132, 140, 153, 154, 155, 164, 165, 170, 174, 182, 185, 186, 189, 194, 195, 203, 204, 209, 219, 220, 221, 230, 231, 234, 237, 245, 246, 252, 254, 258, 259, 260, 264, 265, 266, 272, 273, 275, 279, 284, 285, 286, 290, 294, 299, 300, 305
Offset: 1

Views

Author

M. F. Hasler, Nov 27 2018

Keywords

Comments

Since m and m+1 cannot have a common factor, m(m+1) has at least 2+3 prime divisors (= distinct prime factors), whence m+1 > sqrt(primorial(5)) ~ 48. It turns out that a(1)*(a(1)+1) = 2*3*5*11*13, i.e., the prime factor 7 is not present.

Crossrefs

Cf. A321493, A321494, A321495, A321496, A321497 (analog for k = 3, ..., 7 prime divisors).
Cf. A074851, A140077, A140078, A140079 (m and m+1 have exactly k = 2, 3, 4, 5 prime divisors).
Cf. A255346, A321503 .. A321506, A321489 (m and m+1 have at least 2, ..., 7 prime divisors).

Programs

  • PARI
    select( is_A321502(n)=vecmax(n=[omega(n), omega(n+1)])>2&&vecmin(n)>1, [1..500])

Formula

Equals A255346 \ A074851.

A375928 Positions of adjacent non-prime-powers (exclusive) differing by more than 1.

Original entry on oeis.org

1, 2, 3, 4, 6, 7, 10, 11, 12, 13, 14, 18, 21, 22, 25, 26, 29, 34, 35, 37, 39, 42, 43, 48, 49, 50, 55, 62, 65, 66, 69, 70, 73, 80, 83, 84, 86, 91, 92, 101, 102, 107, 112, 115, 116, 119, 124, 125, 134, 135, 138, 139, 150, 161, 164, 165, 168, 173, 174, 175, 182
Offset: 1

Views

Author

Gus Wiseman, Sep 12 2024

Keywords

Examples

			The non-prime-powers (exclusive) are 1, 6, 10, 12, 14, 15, 18, 20, ... which increase by more than 1 after positions 1, 2, 3, 4, 6, 7, ...
		

Crossrefs

For prime-powers inclusive (A000961) we have A376163, differences A373672.
For nonprime numbers (A002808) we have A014689, differences A046933.
First differences are A110969.
The complement is A375713.
For non-perfect-powers we have A375714, complement A375740.
The complement for prime-powers (exclusive) is A375734, differences A373671.
The complement for nonprime numbers is A375926, differences A373403.
A000040 lists the prime numbers, differences A001223.
A000961 lists prime-powers (inclusive), differences A057820.
A007916 lists non-perfect-powers, differences A375706.
A024619 lists non-prime-powers (inclusive), differences A375735.
A246655 lists prime-powers (exclusive), differences A174965.
A361102 lists non-prime-powers (exclusive), differences A375708.

Programs

  • Mathematica
    ce=Select[Range[100],!PrimePowerQ[#]&];
    Select[Range[Length[ce]-1],!ce[[#+1]]==ce[[#]]+1&]

Formula

The inclusive version is a(n+1) - 1.

A377043 The n-th perfect-power A001597(n) minus the n-th power of a prime A000961(n).

Original entry on oeis.org

0, 2, 5, 5, 11, 18, 19, 23, 25, 36, 48, 64, 81, 98, 100, 101, 115, 138, 164, 179, 184, 200, 209, 240, 271, 284, 300, 336, 374, 413, 439, 450, 495, 542, 587, 632, 683, 738, 793, 852, 887, 903, 964, 1029, 1097, 1165, 1194, 1230, 1295, 1370, 1443, 1518, 1561
Offset: 1

Views

Author

Gus Wiseman, Oct 25 2024

Keywords

Comments

Perfect-powers (A001597) are numbers with a proper integer root.

Crossrefs

Excluding 1 from the powers of primes gives A377044.
A000015 gives the least prime-power >= n.
A031218 gives the greatest prime-power <= n.
A000040 lists the primes, differences A001223.
A000961 lists the powers of primes, differences A057820.
A001597 lists the perfect-powers, differences A053289, seconds A376559.
A007916 lists the non-perfect-powers, differences A375706, seconds A376562.
A024619 lists the non-prime-powers, differences A375735, seconds A376599.
A025475 lists numbers that are both a perfect-power and a prime-power.
A080101 counts prime-powers between primes (exclusive).
A106543 lists numbers that are neither a perfect-power nor a prime-power.
A131605 lists perfect-powers that are not prime-powers.
A246655 lists the prime-powers, complement A361102 (differences A375708).
Prime-power runs: A373675, min A373673, max A373674, length A174965.
Prime-power antiruns: A373576, min A120430, max A006549, length A373671.

Programs

  • Mathematica
    perpowQ[n_]:=n==1||GCD@@FactorInteger[n][[All,2]]>1;
    per=Select[Range[1000],perpowQ];
    per-NestList[NestWhile[#+1&,#+1,!PrimePowerQ[#]&]&,1,Length[per]-1]
  • Python
    from sympy import mobius, primepi, integer_nthroot
    def A377043(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x): return int(n-1+x+sum(mobius(k)*(integer_nthroot(x,k)[0]-1) for k in range(2,x.bit_length())))
        def g(x): return int(n-1+x-sum(primepi(integer_nthroot(x,k)[0]) for k in range(1,x.bit_length())))
        return bisection(f,n,n)-bisection(g,n,n) # Chai Wah Wu, Oct 27 2024

Formula

a(n) = A001597(n) - A000961(n).
Previous Showing 41-50 of 57 results. Next