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 31-40 of 102 results. Next

A340099 Odd composite integers m such that A004187(m-J(m,45)) == 0 (mod m) and gcd(m,45)=1, where J(m,45) is the Jacobi symbol.

Original entry on oeis.org

323, 329, 377, 451, 1081, 1771, 1819, 1891, 2033, 3653, 3827, 4181, 5671, 5777, 6601, 6721, 7471, 7931, 8149, 8557, 10877, 11309, 11663, 13201, 13861, 13981, 14701, 15251, 15449, 17119, 17513, 17687, 17711, 17941, 18407, 19043, 19951, 20447, 20473, 23407, 23771, 23851, 23999
Offset: 1

Views

Author

Ovidiu Bagdasar, Dec 28 2020

Keywords

Comments

The generalized Lucas sequences of integer parameters (a,b) defined by U(m+2)=a*U(m+1)-b*U(m) and U(0)=0, U(1)=1, satisfy the identity
U(p-J(p,D)) == 0 (mod p) when p is prime, b=1 and D=a^2-4.
This sequence contains the odd composite integers with U(m-J(m,D)) == 0 (mod m).
For a=7 and b=1, we have D=45 and U(m) recovers A004187(m).

References

  • D. Andrica, O. Bagdasar, Recurrent Sequences: Key Results, Applications and Problems. Springer, 2020.
  • D. Andrica, O. Bagdasar, On some new arithmetic properties of the generalized Lucas sequences, Mediterr. J. Math. (to appear, 2021).
  • D. Andrica, O. Bagdasar, On generalized pseudoprimality of level k (submitted).

Crossrefs

Cf. A004187, A071904, A081264 (a=1, b=-1), A327653 (a=3,b=-1), A340095 (a=5, b=-1), A340096 (a=7, b=-1), A340097 (a=3, b=1), A340098 (a=5, b=1).

Programs

  • Mathematica
    Select[Range[3, 25000, 2], CoprimeQ[#, 45] && CompositeQ[#] && Divisible[ChebyshevU[# - JacobiSymbol[#, 45] - 1, 7/2], #] &]

A345330 Composite numbers k for which m == 0 (mod k) is the only solution to m^(2^v(k-1)+1) == -m (mod k), where v(k) = A007814(k) is the 2-adic valuation of k.

Original entry on oeis.org

9, 21, 25, 27, 33, 45, 49, 57, 63, 65, 69, 77, 81, 93, 99, 105, 117, 121, 125, 129, 133, 141, 145, 147, 161, 165, 169, 171, 177, 185, 189, 201, 207, 209, 213, 217, 225, 231, 237, 243, 245, 249, 253, 261, 265, 273, 279, 285, 289, 297, 301, 305, 309, 321, 325
Offset: 1

Views

Author

Jianing Song, Jun 14 2021

Keywords

Comments

For primes p, m^(2^v(p-1)+1) == -m (mod p) has only one solution m == 0 (mod p). This sequence gives that composite numbers that satisfy this condition.
All terms are odd since for even k, m == -1 (mod k) is a solution.
Odd composite k is a term if and only if v(p-1) <= v(k-1) for all prime factors p of k. Proof: Let k = (p_1)^(e_1)*(p_2)^(e_2)*...*(p_r)^(e_r) be an odd number. m^(2^v(k-1)+1) == -m (mod k) has only one solution if and only if m^(2^v(k-1)+1) == -m (mod (p_i)^(e_i)) has only one solution for 1 <= i <= r, or equivalently, m^(2^v(k-1)) == -1 (mod (p_i)^(e_i)) has no solution for 1 <= i <= r, or v(p_i-1) <= v(k-1) for 1 <= i <= r.
All prime powers of the form p^e for odd prime p and e >= 2 are terms. All Carmichael numbers (A002997) are also terms: if k is a Carmichael number, then p-1 | k-1 for all prime factors p.

Examples

			225 = 3^2 * 5^2 is a term since v(3-1) = 1 <= v(225-1) = 7, v(5-1) = 2 <= v(225-1) = 7. Also, the equation m^(2^v(225-1)+1) == -m (mod 225) has a unique solution m == 0 (mod 225).
1885 = 5 * 13 * 29 is a term since v(5-1) = v(13-1) = v(29-1) = 2 <= v(1885-1) = 2. Also, the equation m^(2^v(1885-1)+1) == -m (mod 1885) has a unique solution m == 0 (mod 1885).
		

Crossrefs

Complement of A345331 with respect to A071904.
Setwise difference A360114 \ A065091. Subsequence of A360117.

Programs

  • PARI
    isA345330(n) = if(!isprime(n) && n>1 && n%2, my(f=factor(n), w=omega(n)); for(i=1, w, if(valuation(f[i,1]-1,2) > valuation(n-1,2), return(0))); 1, 0)

Extensions

Name revised by Michael B. Porter, Feb 22 2023

A374074 Odd composite numbers k sorted by k/2^(bigomega(k) - 1).

Original entry on oeis.org

9, 27, 15, 81, 21, 45, 25, 243, 63, 33, 135, 35, 75, 39, 729, 189, 49, 99, 405, 51, 105, 55, 225, 57, 117, 125, 65, 2187, 69, 567, 147, 297, 1215, 153, 77, 315, 165, 675, 85, 171, 87, 175, 351, 91, 93, 375, 95, 195, 6561, 207, 1701, 441, 111, 891, 3645, 459
Offset: 1

Views

Author

Friedjof Tellkamp, Jun 27 2024

Keywords

Comments

Sorting by k/2^bigomega(k) would give the same sequence.
It appears that this sequence can be used to approximate the imaginary parts of the nontrivial zeta zeros, that is, A002410(n) is roughly equal to 2*Pi*a(n)/2^bigomega(a(n)) - n/2 + sqrt(n)/2.
Calculations show that the relative error approaches 1.0+-0.005 for the first 3800 zeros (z=2000 in Mathematica code). For further zeros, a better approximation may be useful, e.g. 2*Pi*a(n)/2^bigomega(a(n)) - n/2 + (1/Pi) * n/log(n+1) +- (...).

Examples

			The odd composite numbers (A071904) are: 9, 15, 21, 25, 27, ... .
Divide by 2^(bigomega()-1): 9/2, 15/2, 21/2, 25/2, 27/4, ... .
Sort: 9/2, 27/4, 15/2, 81/8, ... .
Take numerator: this sequence = 9, 27, 15, 81, ... .
		

Crossrefs

Programs

  • Mathematica
    (*This algorithm calculates and sorts all noninteger rationals of the form x = k/2^(bigomega(k)-1) up to z, where the numerators of x are returned as the sequence*)
    z = 100; op = Prime[Range[2, PrimePi[z]]]; (*A065091, odd primes*)
    x = Select[Union[Flatten[Outer[Times, op, op/2]]], # <= z &];
    For[i = 1, i < Max[1, Floor[Log[3/2, z/2]]] - 1, i++, x = Select[Union[x, Flatten[Outer[Times, x, op/2]]], # <= z &]]
    a = Numerator[x] (*sequence*)
    zzaprx = N@Table[2 Pi a[[i]]/2^PrimeOmega[a[[i]]] - i/2 + Sqrt[i]/2, {i, 1, Length[a]}] (*approximation for zeta zeros*)

Formula

A374022(a(n)/2^(bigomega(a(n))-1)) ~ n.

A386425 Odd composites k such that sigma(k) has the same powerful part as k, where sigma is the sum of divisors function.

Original entry on oeis.org

153, 801, 1773, 3725, 4689, 4753, 5013, 6957, 8577, 8725, 9549, 9873, 11493, 13437, 14409, 15381, 18621, 19269, 21213, 21537, 23481, 25101, 26073, 26225, 28989, 29161, 29313, 29961, 32229, 33849, 34173, 36117, 38061, 39033, 40653, 42597, 43893, 47457, 47781, 48725, 48753, 51669, 52317, 54261, 56953, 57177, 57501
Offset: 1

Views

Author

Antti Karttunen, Aug 17 2025

Keywords

Comments

By definition, the sequence contains all odd perfect numbers, and also includes any hypothetical odd triperfect number that is not a multiple of 3 (see A005820 and A347391), and similarly, any odd term of A046060 that is not a multiple of 5, etc. If there are no squares in this sequence (see conjecture in A386424), then the latter categories of numbers certainly do not exist, and this is then a subsequence of A228058.
The first nondeficient term is a(32315) = 81022725. See A386426.

Crossrefs

Intersection of A071904 and A386424.
Nonsquare terms form a subsequence of A228058.
Cf. A000203, A003557, A057521, A386426 (nondeficient terms).
Cf. also A324647, A349749.

Programs

  • Mathematica
    rad[n_] := Times @@ First /@ FactorInteger[n];a057521[n_] := n/Denominator[n/rad[n]^2];Select[Range[9,57501,2],!PrimeQ[#]&&a057521[DivisorSigma[1,#]]==a057521[#]&] (* James C. McMahon, Aug 18 2025 *)
  • PARI
    A057521(n)=my(f=factor(n)); prod(i=1, #f~, if(f[i, 2]>1, f[i, 1]^f[i, 2], 1))
    isA386425(n) = ((n>1) && (n%2) && !isprime(n) && (A057521(sigma(n))==A057521(n)));

Formula

{k | k is odd composite and A003557(A000203(k)) = A003557(k)}.

A039769 Composite integers k such that gcd(phi(k), k - 1) > 1.

Original entry on oeis.org

9, 15, 21, 25, 27, 28, 33, 35, 39, 45, 49, 51, 52, 55, 57, 63, 65, 66, 69, 70, 75, 76, 77, 81, 85, 87, 91, 93, 95, 99, 105, 111, 112, 115, 117, 119, 121, 123, 124, 125, 129, 130, 133, 135, 141, 143, 145, 147, 148, 153, 154, 155, 159, 161, 165, 169, 171, 172, 175
Offset: 1

Views

Author

Keywords

Comments

Previous name was: phi(a(n)) and (a(n) - 1) have a common factor but are distinct.
Equivalently, numbers n that are Fermat pseudoprimes to some base b, 1 < b < n. A nonprime number n is a Fermat pseudoprime to base b if b^(n-1) = 1 (mod n). Cf. A181780. - Geoffrey Critzer, Apr 04 2015
A071904, the odd composite numbers, is a subset of this sequence. - Peter Munn, May 15 2017
Lehmer's totient problem can be stated as finding a number in this sequence such that gcd(a(n) - 1, phi(a(n))) = phi(n). By the original definition of this sequence, such a number (if it exists) would not be in this sequence. - Alonso del Arte, Sep 07 2018, clarified Sep 14 2018

Examples

			phi(21) = 12 and gcd(12, 20) = 4 > 1, hence 21 is in the sequence.
phi(22) = 10 but gcd(10, 21) = 1, so 22 is not in the sequence.
		

Crossrefs

Programs

  • Maple
    select(n -> not isprime(n) and igcd(n-1, numtheory:-phi(n))>1, [$4..1000]);  # Robert Israel, Apr 07 2015
  • Mathematica
    Select[Range[250], GCD[EulerPhi[#], # - 1] > 1 && EulerPhi[#] != # - 1 &] (* Geoffrey Critzer, Apr 04 2015 *)
  • PARI
    forcomposite(k=1, 1e3, if(gcd(eulerphi(k), k-1) > 1, print1(k, ", "))); \\ Altug Alkan, Sep 21 2018

Extensions

Name clarified by Tom Edgar, Apr 05 2015

A246379 Permutation of natural numbers: a(1) = 1, a(p_n) = A003961(1+a(n)), a(c_n) = 2*a(n), where p_n = n-th prime = A000040(n), c_n = n-th composite number = A002808(n), and A003961(n) shifts the prime factorization of n one step towards larger primes.

Original entry on oeis.org

1, 3, 9, 2, 21, 6, 5, 18, 4, 42, 39, 12, 11, 10, 36, 8, 15, 84, 23, 78, 24, 22, 7, 20, 72, 16, 30, 168, 47, 46, 189, 156, 48, 44, 14, 40, 17, 144, 32, 60, 45, 336, 13, 94, 92, 378, 41, 312, 96, 88, 28, 80, 25, 34, 288, 64, 120, 90, 81, 672, 133, 26, 188, 184, 756, 82, 135, 624, 192, 176, 83, 56, 49
Offset: 1

Views

Author

Antti Karttunen, Aug 29 2014

Keywords

Comments

Because 2 is the only even prime, it implies that, apart from a(2)=3, odd numbers occur in odd positions only (along with many even numbers that also occur in odd positions). This in turn implies that each odd composite (A071904) resides in a separate infinite cycle in this permutation, except 9, which is in a finite cycle (2 3 9 4).

Crossrefs

Inverse: A246380.
Similar or related permutations: A246375, A246377, A246363, A246364, A246365, A246367, A246681.

Programs

Formula

a(1) = 1, and for n > 1, if A010051(n) = 1 [i.e. when n is a prime], a(n) = A003961(1+a(A000720(n))), otherwise a(n) = 2*a(A065855(n)).
As a composition of related permutations:
a(n) = A246375(A246377(n)).
Other identities. For all n > 1 the following holds:
A000035(a(n)) = A010051(n). [Maps primes to odd numbers > 1, and composites to even numbers, in some order. Permutations A246377 & A246681 have the same property].

A257728 Permutation of natural numbers: a(1)=1; a(2n) = not_an_oddprime(1+a(n)), a(2n+1) = oddprime(a(n)).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 11, 9, 13, 10, 17, 12, 19, 14, 23, 18, 37, 15, 29, 21, 43, 16, 31, 26, 61, 20, 41, 28, 71, 22, 47, 34, 89, 27, 67, 52, 163, 24, 53, 42, 113, 32, 79, 60, 193, 25, 59, 45, 131, 38, 103, 84, 293, 30, 73, 57, 181, 40, 109, 95, 359, 33, 83, 65, 223, 49, 149, 119, 463, 39, 107, 91, 337, 72, 241, 209, 971, 35, 97, 74, 251, 58
Offset: 1

Views

Author

Antti Karttunen, May 09 2015

Keywords

Comments

Here oddprime(n) = n-th odd prime = A065091(n) = A000040(n+1), not_an_oddprime(n) = n-th natural number which is not an odd prime = A065090(n).
This sequence can be represented as a binary tree. Each left hand child is produced as A065090(1+n), and each right hand child as A065091(n), when a parent contains n >= 1:
|
...................1...................
2 3
4......../ \........5 6......../ \........7
/ \ / \ / \ / \
/ \ / \ / \ / \
/ \ / \ / \ / \
8 11 9 13 10 17 12 19
14 23 18 37 15 29 21 43 16 31 26 61 20 41 28 71
etc.
Because all odd primes are odd, it means that even terms can only occur in even positions (together with odd composites, A071904, for each one of which there is a separate infinite cycle), while terms in odd positions are all odd.

Crossrefs

Inverse: A257727.
Related or similar permutations: A246377, A246378, A257726, A257729, A257802.
Differs from A255004 for the first time at n=17, where a(17) = 23, while A255004(17) = 15.

Programs

Formula

a(1) = 1; a(2n) = A065090(1+a(n)), a(2n+1) = A065091(a(n)).
As a composition of other permutations:
a(n) = A257729(A246378(n)).
a(n) = A257802(A257726(n)).

A354369 Successive pairs of terms (a, b) such that (a + b) is a prime number and at least one of a and b is a prime number. This is the lexicographically earliest infinite sequence of distinct terms > 0 with this property.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 10, 8, 11, 12, 17, 13, 16, 14, 23, 18, 19, 20, 41, 22, 31, 24, 29, 26, 47, 28, 43, 30, 37, 32, 71, 34, 67, 36, 53, 38, 59, 40, 61, 42, 89, 44, 83, 46, 103, 48, 79, 50, 101, 52, 97, 54, 73, 56, 107, 58, 109, 60, 113, 62, 131, 64, 127, 66, 157, 68, 173, 70, 163, 72, 139, 74, 137
Offset: 1

Views

Author

Eric Angelini and Carole Dubois, May 24 2022

Keywords

Comments

The terms 9, 15, 21, 25, 27, 33, 35, 39, 45, 49, 51, ... will never appear in the sequence; they form A071904, the "Odd composite numbers".

Examples

			The earliest pairs with their prime sum: (1, 2) = 3, (3, 4) = 7, (5, 6) = 11, (7, 10) = 17, (8, 11) = 19, (12, 17) = 29, (13, 16) = 29, (14, 23) = 37, etc.
		

Crossrefs

Cf. A354367, A354368, A354370 (same idea), A071904.

Programs

A008508 Number of odd primes less than n-th odd composite number.

Original entry on oeis.org

3, 5, 7, 8, 8, 10, 10, 11, 13, 14, 14, 15, 15, 17, 17, 18, 20, 20, 21, 22, 22, 23, 23, 23, 24, 26, 28, 29, 29, 29, 29, 29, 29, 30, 31, 31, 33, 33, 33, 33, 35, 35, 36, 36, 37, 38, 38, 39, 39, 41, 41, 41, 41, 43, 45, 45, 45, 45, 45, 46
Offset: 1

Views

Author

Gary Findley (chfindley(AT)alpha.nlu.edu), Mar 15 1996

Keywords

Examples

			The first odd composite is 9, and there are 4 primes below: 2, 3, 5, and 7; so there are 3 odd primes, hence a(1)=3.
		

Crossrefs

Programs

  • Mathematica
    PrimePi[#] - 1 & /@ Select[Range@ 213, CompositeQ@ # && OddQ@ # &] (* Michael De Vlieger, Apr 17 2015 *)
  • PARI
    lista(nn) = {forcomposite (n=1, nn, if (n % 2, print1(primepi(n)-1, ", ")););} \\ Michel Marcus, Apr 18 2015
    
  • Python
    from sympy import primepi
    def A008508(n):
        if n == 1: return 3
        m, k = n, (r:=primepi(n)) + n + (n>>1)
        while m != k:
            m, k = k, (r:=primepi(k)) + n + (k>>1)
        return r-1 # Chai Wah Wu, Aug 01 2024

Formula

From Antti Karttunen, Apr 17 2015: (Start)
a(n) = A000720(A071904(n)) - 1 (by the definition).
a(n) = A053726(n) - n - 1.
(End)

A038510 Composite numbers with smallest prime factor >= 7.

Original entry on oeis.org

49, 77, 91, 119, 121, 133, 143, 161, 169, 187, 203, 209, 217, 221, 247, 253, 259, 287, 289, 299, 301, 319, 323, 329, 341, 343, 361, 371, 377, 391, 403, 407, 413, 427, 437, 451, 469, 473, 481, 493, 497, 511, 517, 527, 529, 533, 539, 551, 553, 559, 581, 583
Offset: 1

Views

Author

Keywords

Comments

Let A = set of numbers of form 6n + 1, B = numbers of form 6n - 1. Eliminating numbers of form 25 + 30s from A and those of form 35 + 30s from B we obtain sets A* and B*. Removing all terms of the sequence from the union of A* and B*, only prime numbers remain. - Hisanobu Shinya (ilikemathematics(AT)hotmail.com), Jul 14 2002
Divide n by a*b*c where a = 2^(A001511(n)-1), b = 3^(A051064(n)-1) and c = 5^(A055457(n) -1). Then the resulting sequence includes only primes and a(n). - Alford Arnold, Sep 08 2003
Composite numbers not divisible by 2, 3 or 5. - Lekraj Beedassy, Jun 30 2004
Composite numbers k such that k^4 mod 30 = 1. - Gary Detlefs, Dec 09 2012
Composite numbers congruent to 1, 7, 11, 13, -13, -11, -7, -1 (mod 30). Since asymptotically, 100% of integers are composite, we have a(n)/n ~ 30/phi(30) = 30/8 = 3.75. - Daniel Forgues, Mar 16 2013
"John [Conway] recommends the more refined partition [of the positive numbers]: 1, prime, trivially composite, or nontrivially composite. Here, a composite integer is trivially composite if it is divisible by 2, 3, or 5." See link to (van der Poorten, Thomsen, and Wiebe; 2006) pp. 73-74. - Daniel Forgues, Jan 30 2015, Feb 04 2015
For the eight congruences coprime to 30, we can use one byte to encode the "primality/non-primality (unit or composite)" for each [30*n, 30*(n+1)[, n >= 0, closed-open interval, either as little endian binary sequence {01111111, 11111011, 11110111, 01111110, ...}, or as big endian binary sequence {11111110, 11011111, 11101111, 01111110, ...}, which we may then express in base 10. - Daniel Forgues, Feb 05 2015

References

  • J. H. Silverman, A Friendly Introduction to Number Theory, 2nd Edn. "Appendix A: Factorization of Small Composite Integers", Prentice Hall NY 2001.

Crossrefs

Intersection of A002808 and A007775.

Programs

  • Maple
    for n from 1 to 583 do if n^4 mod 30 = 1 and not isprime(n) then print(n)fi od; # Gary Detlefs, Dec 09 2012
  • Mathematica
    Select[Range[1000], ! PrimeQ[#] && FactorInteger[#][[1, 1]] >= 7 &] (* T. D. Noe, Mar 16 2013 *)
  • PARI
    is(n)=gcd(n,30)==1 && !isprime(n) \\ Charles R Greathouse IV, Dec 09 2012

Formula

a(n) ~ 3.75n. - Charles R Greathouse IV, Dec 09 2012

Extensions

Corrected by Ralf Stephan, Apr 04 2003
Previous Showing 31-40 of 102 results. Next