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

A008364 11-rough numbers: not divisible by 2, 3, 5 or 7.

Original entry on oeis.org

1, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 121, 127, 131, 137, 139, 143, 149, 151, 157, 163, 167, 169, 173, 179, 181, 187, 191, 193, 197, 199, 209, 211, 221, 223, 227, 229, 233, 239, 241, 247
Offset: 1

Views

Author

Keywords

Comments

The first A005867(4) = 48 terms give the reduced residue system for the 4th primorial number 210 = A002110(4).
This sequence is closed under multiplication: any product of terms is also a term. - Labos Elemer, Feb 26 2003
Conjecture: these are numbers n such that (Sum_{k=1..n} k^4) mod n = 0 and (Sum_{k=1..n} k^6) mod n = 0. - Gary Detlefs, Dec 20 2011
From Peter Bala, May 03 2018: (Start)
The above conjecture is true. Let m be even and let the m-th Bernoulli number be written in reduced form as Bernoulli(m) = N(m)/D(m). Apply Ireland and Rosen, Proposition 15.2.2, to show the congruence D(m)*( Sum_{k = 1..n} k^m )/n = N(m) (mod n) holds for all n >= 1. It follows easily from this congruence that ( Sum_{k = 1..n} k^m )/n is integral iff n is coprime to D(m). Now Bernoulli(4) = -1/(2*3*5) and Bernoulli(6) = 1/(2*3*7) so the numbers n such that both (Sum_{k=1..n} k^4) mod n = 0 and (Sum_{k=1..n} k^6) mod n = 0 are exactly those numbers coprime to the primes 2, 3, 5 and 7, that is, the 11-rough numbers. (End)
Conjecture: these are numbers n such that (n^6 mod 210 = 1) or (n^6 mod 210 = 169). - Gary Detlefs, Dec 30 2011
The second Detlefs conjecture above is true and extremely easy to verify with some basic properties of congruences: take the terms of this sequence up to 209 and compute their sixth powers modulo 210: there should only be 1's and 169's there. Then take the complement of this sequence up to 210, where you will see no instances of 1 or 169. - Alonso del Arte, Jan 12 2014
It is well-known that the product of 7 consecutive integers is divisible by 7!. Conjecture: This sequence is exactly the set of positive values of r such that ( Product_{k = 0..6} n + k*r )/7! is an integer for all n. - Peter Bala, Nov 14 2015
From Ruediger Jehn, Nov 05 2020: (Start)
This conjecture is true. The first part of the proof deals with numbers not in A008364, i.e., numbers which are divisible by p (p either 2, 3, 5, 7). Let r = p*s and n = 1, then (Product_{k = 0..6} n + k*r) is not divisible by p, because none of the factors 1 + k*p*s are divisible by p. Hence dividing the product by 7! does not return an integer.
The second part deals with numbers in A008364. If r and q are coprime, then for any i < q there exists k < q with (k*r mod q) = i. From this, it also follows that for any n there exists k < q with ((n + k*r) mod q) = 0. But this means that Product_{k = 0..6} n + k*r is divisible by all numbers from 2 to 7 because there is always a factor that is divisible. We still have to show that the product is also divisible by 2 times 3 times 4 times 6. If the k_1 with ((n + k_1*r) mod 4) = 0 is even, then (n mod 2) = ((n + 2*r) mod 2) = ((n + 4*r) mod 2) = ((n + 6*r) mod 2) = 0. If this k_1 is odd, then ((n + r) mod 2) = ((n + 3*r) mod 2) = ((n + 5*r) mod 2) = 0. In both cases there are at least 2 other factors divisible by 2. If the k_2 with ((n + k_2*r) mod 6) = 0 is smaller than 4, then ((n + (k_2 + 3)*r) mod 3) = 0. Otherwise, ((n + (k_2 - 3)*r) mod 3) = 0. In both cases there is at least 1 other factor divisible by 3. And therefore Product_{k = 0..6} n + k*r is divisible by 7! for any n.
(End)

References

  • Diatomic sequence of 4th prime: A. de Polignac (1849), J. Dechamps (1907).
  • Dickson L. E., History of the Theory of Numbers, Vol. 1, p. 439, Chelsea, 1952.
  • K. Ireland and M. Rosen, A Classical Introduction to Modern Number Theory, Springer-Verlag, 1980.

Crossrefs

First differences give A049296. Cf. A002110, A048597.
For k-rough numbers with other values of k, see A000027, A005408, A007310, A007775, A008364, A008365, A008366, A166061, A166063. - Michael B. Porter, Oct 10 2009
Cf. A005867, A092695, A210679, A080672 (complement).

Programs

  • Haskell
    a008364 n = a008364_list !! (n-1)
    a008364_list = 1 : filter ((> 7) . a020639) [1..]
    -- Reinhard Zumkeller, Mar 26 2012
  • Maple
    for i from 1 to 500 do if gcd(i,210) = 1 then print(i); fi; od;
    t1:=[]; for i from 1 to 1000 do if gcd(i,210) = 1 then t1:=[op(t1),i]; fi; od: t1;
    S:= (j,n)-> sum(k^j,k=1..n): for n from 1 to 247 do if (S(4,n) mod n = 0) and (S(6,n) mod n = 0) then print(n) fi od; # Gary Detlefs, Dec 20 2011
  • Mathematica
    Select[ Range[ 300 ], GCD[ #1, 210 ] == 1 & ]
    Select[Range[250], Mod[#, 2]>0 && Mod[#, 3]>0 && Mod[#, 5]>0 && Mod[#, 7]>0 &] (* Vincenzo Librandi, Nov 16 2015 *)
    Cases[Range@1000, x_ /; NoneTrue[Array[Prime, 4], Divisible[x, #] &]] (* Mikk Heidemaa, Dec 07 2017 *)
    Select[Range[250],Union[Divisible[#,{2,3,5,7}]]=={False}&] (* Harvey P. Dale, Sep 24 2021 *)
  • PARI
    isA008364(n) = gcd(n,210)==1 \\ Michael B. Porter, Oct 10 2009
    

Formula

Starting with a(49) = 211, a(n) = a(n-48) + 210. - Zak Seidov, Apr 11 2011
a(n) = a(n-1) + a(n-48) - a(n-49). - Charles R Greathouse IV, Dec 21 2011
A020639(a(n)) > 7. - Reinhard Zumkeller, Mar 26 2012
G.f.: x*(x^48 + 10*x^47 + 2*x^46 + 4*x^45 + 2*x^44 + 4*x^43 + 6*x^42 + 2*x^41 + 6*x^40 + 4*x^39 + 2*x^38 + 4*x^37 + 6*x^36 + 6*x^35 + 2*x^34 + 6*x^33 + 4*x^32 + 2*x^31 + 6*x^30 + 4*x^29 + 6*x^28 + 8*x^27 + 4*x^26 + 2*x^25 + 4*x^24 + 2*x^23 + 4*x^22 + 8*x^21 + 6*x^20 + 4*x^19 + 6*x^18 + 2*x^17 + 4*x^16 + 6*x^15 + 2*x^14 + 6*x^13 + 6*x^12 + 4*x^11 + 2*x^10 + 4*x^9 + 6*x^8 + 2*x^7 + 6*x^6 + 4*x^5 + 2*x^4 + 4*x^3 + 2*x^2 + 10*x + 1) / (x^49 - x^48 - x + 1). - Colin Barker, Sep 27 2013
a(n) = 35*n/8 + O(1). - Charles R Greathouse IV, Sep 14 2015
A007775 INTERSECT A206547. - R. J. Mathar, Apr 10 2024

Extensions

New name from Charles R Greathouse IV, Dec 21 2011 based on comment from Michael B. Porter, Oct 10 2009

A048865 a(n) is the number of primes in the reduced residue system mod n.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

The number of primes p <= n with p coprime to n. - Enrique Pérez Herrero, Jul 23 2011

Examples

			At n=30 all but 1 element in reduced residue system of 30 are primes (see A048597) so a(30) = Phi(30) - 1 = 7.
n=100: a(100) = Pi(100) - A001221(100) = 25 - 2 = 23.
		

Crossrefs

Programs

  • Haskell
    a048865 n = sum $ map a010051 [t | t <- [1..n], gcd n t == 1]
    -- Reinhard Zumkeller, Sep 16 2011
  • Maple
    A048865 := n ->  nops(select(isprime, select(k -> igcd(n,k) = 1, [$1..n]))):
    seq(A048865(n), n = 1..81); # Peter Luschny, Jul 23 2011
  • Mathematica
    p=Prime[Range[1000]]; q=Table[PrimePi[i], {i, 1, 1000}]; t=Table[c=0; Do[If[GCD[p[[j]], i]==1, c++ ], {j, 1, q[[i-1]]}]; c, {i, 2, 950}]
    Table[Count[Select[Range@ n, CoprimeQ[#, n] &], p_ /; PrimeQ@ p], {n, 81}] (* Michael De Vlieger, Apr 27 2016 *)
    Table[PrimePi[n] - PrimeNu[n], {n, 50}] (* G. C. Greubel, May 16 2017 *)
  • PARI
    A048865(n)=primepi(n)-omega(n)
    

Formula

a(n) = A000720(n) - A001221(n).
From Reinhard Zumkeller, Apr 05 2004: (Start)
a(n) = Sum_{p prime and p<=n} (ceiling(n/p) - floor(n/p)).
a(n) = A093614(n) - A013939(n). (End)
a(n) = A001221(A001783(n)). - Enrique Pérez Herrero, Jul 23 2011
a(n) = A368616(n) - A368641(n). - Wesley Ivan Hurt, Jan 01 2024

A005776 Exponents m_i associated with Weyl group W(E_8).

Original entry on oeis.org

1, 7, 11, 13, 17, 19, 23, 29
Offset: 1

Views

Author

Keywords

Comments

Numbers coprime to 30 in that number's reduced residue system. - Alonso del Arte, Oct 03 2017

References

  • H. S. M. Coxeter and W. O. J. Moser, Generators and Relations for Discrete Groups, 4th ed., Springer-Verlag, NY, reprinted 1984, p. 141.

Crossrefs

Programs

  • Magma
    Exponents(RootDatum("E8")); // Sergei Haller (sergei(AT)sergei-haller.de), Dec 21 2006
    
  • Mathematica
    Select[Range[30], GCD[30, #] == 1 &] (* Alonso del Arte, Oct 03 2017 *)
  • PARI
    select(n->gcd(n,30)==1, [1..29]) \\ Charles R Greathouse IV, Oct 17 2017

A051250 Numbers whose reduced residue system consists of 1 and prime powers only.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 14, 18, 20, 24, 30, 42, 60
Offset: 1

Views

Author

Keywords

Comments

From Reinhard Zumkeller, Oct 27 2010: (Start)
Conjecture: the sequence is finite and 60 is the largest term, empirically verified up to 10^7;
A139555(a(n)) = A000010(a(n)). (End)
The sequence is indeed finite. Let pi*(x) denote the number of prime powers (including 1) up to x. Dusart's bounds plus finite checking [up to 60184] shows that pi*(x) <= x/(log(x) - 1.1) + sqrt(x) for x >= 4. phi(n) > n/(e^gamma log log n + 3/(log log n)) for n >= 3. Convexity plus finite checking [up to 1096] allows a quick proof that phi(n) > pi*(n) for n > 420. So if n > 420, the reduced residue system mod n must contain at least one number that is neither 1 nor a prime power. Hence 60 is the last term in the sequence. - Charles R Greathouse IV, Jul 14 2011

Examples

			RRS[ 60 ] = {1,7,11,13,17,19,23,29,31,37,41,43,47,49,53,59}.
		

Crossrefs

Programs

  • Haskell
    a051250 n = a051250_list !! (n-1)
    a051250_list = filter (all ((== 1) . a010055) . a038566_row) [1..]
    -- Reinhard Zumkeller, May 27 2015, Dec 18 2011, Oct 27 2010
    
  • Mathematica
    fQ[n_] := Union[# == 1 || Mod[#, # - EulerPhi[#]] == 0 & /@ Select[ Range@ n, GCD[#, n] == 1 &]] == {True}; Select[ Range@ 100, fQ] (* Robert G. Wilson v, Jul 11 2011 *)
  • PARI
    isprimepower(n)=ispower(n,,&n);isprime(n)
    is(n)=for(k=2,n-1,if(gcd(n,k)==1&&!isprimepower(k),return(0)));1 \\ Charles R Greathouse IV, Jul 14 2011

A076368 a(1) = 1; for n > 1, a(n) = prime(n) - prime(n-1) + 1.

Original entry on oeis.org

1, 2, 3, 3, 5, 3, 5, 3, 5, 7, 3, 7, 5, 3, 5, 7, 7, 3, 7, 5, 3, 7, 5, 7, 9, 5, 3, 5, 3, 5, 15, 5, 7, 3, 11, 3, 7, 7, 5, 7, 7, 3, 11, 3, 5, 3, 13, 13, 5, 3, 5, 7, 3, 11, 7, 7, 7, 3, 7, 5, 3, 11, 15, 5, 3, 5, 15, 7, 11, 3, 5, 7, 9, 7, 7, 5, 7, 9, 5, 9, 11, 3, 11, 3, 7, 5, 7, 9, 5, 3, 5, 13, 9, 5, 9, 5, 7
Offset: 1

Views

Author

Labos Elemer, Oct 14 2002

Keywords

Comments

Number of occurrences of n in A060646 or n-th prime in A076367.
Sequences A060646, A076367, A076368 were used in proving a property of 30. See A048597, A060646 and corresponding References. It is provable [Bonse] that a(n)>=3 if n>3.
For n>1, a(n) is the sum of the digits of prime(n) in the base prime(n-1). - R. J. Cano, Dec 31 2016; corrected by Michel Marcus, Jan 01 2017

Crossrefs

Cf. A048597, A060646, A076367. See also A076366.

Programs

  • Magma
    [1] cat [NthPrime(n)-NthPrime(n-1)+1: n in [1..80]]; // Vincenzo Librandi, Jan 01 2017
  • Mathematica
    c[x_, j_] := x+1-(j+Prime[j])c[x, 0]=x; a=1000; t=Table[0, {a}]; t1=Table[0, {a}]; Table[fl=1; (*Print["% ", u, " #"]; *)Do[s=c[u, n]; If[Equal[fl, 1]&&Equal[Sign[s], -1], Print[n]; t[[u]]=n; t1[[u]]=Prime[n]; fl=0], {n, 1, u}], {u, 1, a}]//t (*=A060646*)//t1 (*=A076367*) Table[Count[t, j], {j, 1, PrimePi[a]}]
    (* Second program *)
    Table[If[n == 1, 1, (Prime@ n - Prime[n - 1]) + 1], {n, 97}] (* Michael De Vlieger, Dec 31 2016 *)
    Join[{1},Differences[Prime[Range[100]]]+1] (* Harvey P. Dale, Mar 13 2019 *)

Extensions

Simpler description from Vladeta Jovovic, Mar 29 2003

A048862 Number of primes in the reduced residue system of n-th primorial number (=A002110(n)).

Original entry on oeis.org

0, 0, 1, 7, 42, 338, 3242, 42324, 646021, 12283522, 300369786, 8028642999, 259488750732, 9414916809082, 362597750396726, 15397728527812843, 742238179058722875, 40068968501510691877, 2251262473052300960808, 139566579945945392719394
Offset: 0

Views

Author

Keywords

Examples

			For n = 3, the 3rd primorial is 30, phi(30) = 8, a(3) = 8-1 = 7 since 1 is nonprime. See A048597.
For n = 4, the 4th primorial is 210, the size of its reduced residue system (RRS) is 48 of which 42 are primes and 6 are either composite numbers or 1.
		

Crossrefs

Formula

a(n) = A000849(n) - n = A000720(A002110(n)) - A001221(A002110(n)).

Extensions

a(0) prepended and extended by Max Alekseyev, Feb 22 2016
a(17) corrected and a(18)-a(19) calculated using Kim Walisch's primecount and added by Amiram Eldar, Sep 03 2024

A048863 Number of nonprimes (1 and composites) in the reduced residue system of n-th primorial number (A002110).

Original entry on oeis.org

1, 1, 1, 1, 6, 142, 2518, 49836, 1012859, 24211838, 721500294, 22627459401, 844130935668, 34729870646918, 1491483322755274, 69890000837179157, 3692723747920861125, 217158823263305180123, 13182405032836651359192, 879055475442725460400606
Offset: 0

Views

Author

Keywords

Examples

			For n = 3, the 3rd primorial is 30, phi(30) = 8, a(3) = 1 since 1 is nonprime. See A048597.
For n = 4, the 4th primorial is 210, the size of its reduced residue system (RRS) is 48 of which 6 are either composite numbers or 1: {1, 121, 143, 169, 187, 209}.
		

Crossrefs

Programs

  • Mathematica
    Table[Function[P, EulerPhi@ P - # &[PrimePi@ P - n]]@ Product[Prime@ i, {i, n}], {n, 0, 12}] (* Michael De Vlieger, May 08 2017 *)

Formula

a(n) = A005867(n) - A000849(n) + n.
a(n) = A000010(A002110(n)) - A000720(A002110(n)) + A001221(A002110(n)).

Extensions

a(14)-a(15) from Max Alekseyev, Aug 21 2013
a(0) prepended, a(15) corrected, a(16)-a(17) computed from A000849 by Max Alekseyev, Feb 21 2016
a(18)-a(19) calculated using Kim Walisch's primecount and added by Amiram Eldar, Sep 03 2024

A036997 Number of composite numbers <= n and relatively prime to n.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 2, 0, 2, 1, 5, 0, 6, 1, 3, 2, 9, 0, 10, 1, 5, 3, 13, 0, 11, 4, 9, 4, 18, 0, 19, 5, 10, 6, 14, 2, 24, 7, 13, 5, 27, 1, 28, 7, 11, 9, 31, 2, 27, 6, 18, 10, 36, 3, 25, 9, 21, 13, 41, 1, 42, 13, 19, 14, 31, 4, 47, 14, 26, 7, 50, 5, 51, 16, 20, 16, 40, 5, 56, 11, 32, 19, 59, 3
Offset: 1

Views

Author

Keywords

Comments

30 is the largest number n with the property that if 1 < k < n and k is relatively prime to n, then k is prime. In other words, a(30) = 0 and if m > 30, then a(m) > 0. - Jonathan Sondow, Dec 08 2012

Crossrefs

Cf. A048597 (indices where a(n) = 0), A048865 (number of primes p < n that are relatively prime to n).

Programs

  • Mathematica
    Table[ Count[ Select[ Range[ n ], GCD[ #, n ]===1& ], q_/;!(PrimeQ[ q ]||q===1) ], {n, 180} ]

Formula

A048864(n) = a(n) + 1. - Peter Luschny, Oct 22 2010

Extensions

Minor edits by Ray Chandler, Mar 16 2010

A074915 Largest x such that the number of nonprimes (i.e., 1 and composites) in the reduced residue set (RRS(x)) of x equals n, or 0 if there are no such numbers.

Original entry on oeis.org

30, 60, 90, 84, 120, 210, 50, 150, 126, 180, 132, 168, 0, 138, 240, 144, 140, 330, 420, 130, 300, 92, 390, 234, 294, 228, 360, 222, 160, 246, 0, 336, 276, 630, 510, 450, 378, 152, 480, 280, 318, 196, 342, 660, 165, 396, 172, 546, 250, 840, 504, 408, 350, 600
Offset: 1

Views

Author

Labos Elemer, Oct 10 2002

Keywords

Comments

It is conjectured that x is always bounded.
If p and q are primes < sqrt(x) that do not divide x, then p*q is in RRS(x). Thus the number of composites in RRS(x) is at least (pi(sqrt(x)) - log_2(x))^2/2. If x is too large, this must be greater than n. Thus suppose N is large enough that pi(sqrt(N)) > 2*sqrt(2*n) and for all x >= N, pi(sqrt(x)) > 2*log_2(x). Then a(n) <= N. It appears that the condition pi(sqrt(x)) > 2*log_2(x) is true for all x >= 103^2. - Robert Israel, Aug 26 2018, corrected Feb 24 2020
From Giovanni Resta, Feb 25 2020: (Start)
The following bounds (valid for n>1) are known:
primepi(n) < 1.256*n/log(n),
omega(n) > 0,
phi(n) > n/(3/log(log(n)) + exp(g)*log(log(n))), where g = A001620 = 0.5770836... is the Euler-Mascheroni constant.
Combining these bounds we obtain a lower bound for A048864(k) = phi(k) - primepi(k) + omega(k), which allows the establishment of a finite search range when solving A048864(x) = n. (End)

Examples

			One nonprime (=1) is in RRS of {1,2,3,4,6,8,12,18,24,30}; min=1, max=30. See A048597.
Two nonprimes are in RRS of {5,10,14,20,42,60}; min=A072022(2), max = a(2) = 60 here.
For entries of A072023 neither min nor max is believed to exist.
		

Crossrefs

Programs

  • PARI
    lista(nn) = {my(v = vector(10^5, n, eulerphi(n) - (primepi(n) - omega(n)))); vector(nn, k, if (#(w=Vec(select(x->(x==k), v, 1))) == 0, 0, vecmax(w)));} \\ Michel Marcus, Feb 23 2020

Formula

a(n) = max{x; A048864(x)=n}; a(n)=0 if no such number exists (see A072023).

A048868 Numbers whose reduced residue system contains more primes than nonprimes.

Original entry on oeis.org

8, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 84, 88, 90, 96, 98, 100, 102, 104, 108, 110, 112, 114, 120, 126, 130, 132, 138, 140, 144, 150, 154, 156, 160, 162, 168, 170
Offset: 1

Views

Author

Keywords

Comments

From Michael De Vlieger, May 21 2017: (Start)
Conjecture: all terms are even.
Let b(n) = differences of a(n). Many of the terms in b(n) are in A060735(n), i.e., b(n) >= A002110(n) and divisible by A002110(n). The smallest b(n) that is not in A060735 is b(450) = 66; b(450) > A002110(n) but not divisible by it; instead it is divisible by A002110(n-1). b(n) seems to "prefer" values of A002110(n) as n increases. There is a run of 22 values of 2 starting at b(2), of 22 values of 6 starting at b(178), of 7 values of 210 starting at b(543), and 3 values of 2310 starting at b(577). In the case of A002110(n) with n < 3, the length of runs of A002110(n) is greater than that of runs of any other number of comparable magnitude. The last observed position of A002110(n) in b(n) is {201, 442, (557), ...}.
Questions: are there increasingly more terms such that b(n) is not in A060735 as n increases? Are terms such that b(n) is in A060735 prevalent? Why does b(n) seem to "prefer" values in A002110 at certain magnitudes of n as n increases? Are there differences of a(n) = A002110(k) at positions greater than those observed, and if not, why? (End)

Examples

			n=30 is the largest extremal example whose reduced residue system consists only of primes and 1 (see A048597); n=8 Phi(8)=4, reduced residue system (8)={1,3,5,7} n=32 Phi(32)=16, reduced residue system (32)={1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31} of which only {1,9,15,21,25,27} are not primes, 10 are primes: 10 > 6 thus 32 belongs here.
		

Crossrefs

A000720(n) - A001221(n) > A000010(n) - (A000720(n)-A001221(n)).

Programs

Showing 1-10 of 32 results. Next