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-5 of 5 results.

A002473 7-smooth numbers: positive numbers whose prime divisors are all <= 7.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 24, 25, 27, 28, 30, 32, 35, 36, 40, 42, 45, 48, 49, 50, 54, 56, 60, 63, 64, 70, 72, 75, 80, 81, 84, 90, 96, 98, 100, 105, 108, 112, 120, 125, 126, 128, 135, 140, 144, 147, 150, 160, 162, 168, 175, 180, 189, 192
Offset: 1

Views

Author

Keywords

Comments

Also called humble numbers; sometimes also called highly composite numbers, but this usually refers to A002182.
Successive numbers k such that phi(210k) = 48k. - Artur Jasinski, Nov 05 2008
The divisors of 10! (A161466) are a finite subsequence. - Reinhard Zumkeller, Jun 10 2009
Numbers n such that A198487(n) > 0 and A107698(n) > 0. - Jaroslav Krizek, Nov 04 2011
A262401(a(n)) = a(n). - Reinhard Zumkeller, Sep 25 2015
Numbers which are products of single-digit numbers. - N. J. A. Sloane, Jul 02 2017
Phi(a(n)) is 7-smooth. In fact, the Euler Phi function applied to p-smooth numbers, for any prime p, is p-smooth. - Richard Locke Peterson, May 09 2020
Also those integers k, such that, for every prime p > 5, p^(12k) - 1 == 0 (mod 5040k). - Federico Provvedi, Jun 06 2022
The nonprimes with this property are all terms except for 2, 3, 5 and 7, i.e.: (1, 4, 6, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 24, 25, 27, 28, 30, 32, 35, 36, 40, 42, 45, ...); the composite terms are all but the first one of this subsequence. ["Trivial" data provided mainly for search purpose.] - M. F. Hasler, Jun 06 2023

References

  • B. C. Berndt, Ramanujan's Notebooks Part IV, Springer-Verlag, see p. 52.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Subsequence of A080672, complement of A068191. Subsequences: A003591, A003594, A003595, A195238, A059405.
Not the same as A063938. For p-smooth numbers with other values of p, see A003586, A051037, A051038, A080197, A080681, A080682, A080683.
Cf. A002182, A067374, A210679, A238985 (zeroless terms), A006530.
Cf. A262401.

Programs

  • Haskell
    import Data.Set (singleton, deleteFindMin, fromList, union)
    a002473 n = a002473_list !! (n-1)
    a002473_list = f $ singleton 1 where
       f s = x : f (s' `union` fromList (map (* x) [2,3,5,7]))
             where (x, s') = deleteFindMin s
    -- Reinhard Zumkeller, Mar 08 2014, Apr 02 2012, Apr 01 2012
    
  • Magma
    [n: n in [1..200] | PrimeDivisors(n) subset PrimesUpTo(7)]; // Bruno Berselli, Sep 24 2012
    
  • Mathematica
    Select[Range[250], Max[Transpose[FactorInteger[ # ]][[1]]]<=7&]
    aa = {}; Do[If[EulerPhi[210 n] == 48 n, AppendTo[aa, n]], {n, 1, 1200}]; aa (* Artur Jasinski, Nov 05 2008 *)
    mxExp = 8; Select[Union[Times @@@ Flatten[Table[Tuples[{2, 3, 5, 7}, n], {n, mxExp}], 1]], # <= 2^mxExp &] (* Harvey P. Dale, Aug 13 2012 *)
    mx = 200; Sort@ Flatten@ Table[ 2^i*3^j*5^k*7^l, {i, 0, Log[2, mx]}, {j, 0, Log[3, mx/2^i]}, {k, 0, Log[5, mx/(2^i*3^j)]}, {l, 0, Log[7, mx/(2^i*3^j*5^k)]}] (* Robert G. Wilson v, Aug 17 2012 *)
  • PARI
    test(n)=m=n; forprime(p=2,7, while(m%p==0,m=m/p)); return(m==1)
    for(n=1,200,if(test(n),print1(n",")))
    
  • PARI
    is_A002473(n)=n<11||vecmax(factor(n,8)[,1])<8 \\ M. F. Hasler, Jan 16 2015
    
  • PARI
    list(lim)=my(v=List(),t); for(a=0,logint(lim\1,7), for(b=0,logint(lim\7^a,5), for(c=0,logint(lim\7^a\5^b,3), t=3^c*5^b*7^a; while(t<=lim, listput(v,t); t<<=1)))); Set(v) \\ Charles R Greathouse IV, Feb 22 2017
    
  • Python
    import heapq
    from itertools import islice
    from sympy import primerange
    def A002473gen(p=7): # generate all p-smooth terms
        v, oldv, h, psmooth_primes, = 1, 0, [1], list(primerange(1, p+1))
        while True:
            v = heapq.heappop(h)
            if v != oldv:
                yield v
                oldv = v
                for p in psmooth_primes:
                    heapq.heappush(h, v*p)
    print(list(islice(A002473gen(), 65))) # Michael S. Branicky, Nov 19 2022
    
  • Python
    from sympy import integer_log
    def A002473(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):
            c = n+x
            for i in range(integer_log(x,7)[0]+1):
                i7 = 7**i
                m = x//i7
                for j in range(integer_log(m,5)[0]+1):
                    j5 = 5**j
                    r = m//j5
                    for k in range(integer_log(r,3)[0]+1):
                        c -= (r//3**k).bit_length()
            return c
        return bisection(f,n,n) # Chai Wah Wu, Sep 16 2024

Formula

A006530(a(n)) <= 7. - Reinhard Zumkeller, Apr 01 2012
Sum_{n>=1} 1/a(n) = Product_{primes p <= 7} p/(p-1) = (2*3*5*7)/(1*2*4*6) = 35/8. - Amiram Eldar, Sep 22 2020

Extensions

More terms from James Sellers, Dec 23 1999
Additional comments from Michel Lecomte, Jun 09 2007
Edited by M. F. Hasler, Jan 16 2015

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

A171182 Period 6: repeat [0, 1, 1, 1, 0, 2].

Original entry on oeis.org

0, 1, 1, 1, 0, 2, 0, 1, 1, 1, 0, 2, 0, 1, 1, 1, 0, 2, 0, 1, 1, 1, 0, 2, 0, 1, 1, 1, 0, 2, 0, 1, 1, 1, 0, 2, 0, 1, 1, 1, 0, 2, 0, 1, 1, 1, 0, 2, 0, 1, 1, 1, 0, 2, 0, 1, 1, 1, 0, 2, 0, 1, 1, 1, 0, 2, 0, 1, 1, 1, 0, 2, 0, 1, 1, 1, 0, 2, 0, 1, 1, 1, 0, 2, 0, 1, 1, 1, 0, 2, 0, 1, 1, 1, 0, 2, 0, 1, 1, 1, 0, 2, 0, 1, 1
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Dec 04 2009, Dec 07 2009

Keywords

Comments

The number of divisors d of n of the form d=2 or 3. - Vladimir Shevelev, May 21 2010
a(n) = s(n+6), where s(k) is the number of partitions of k into distinct parts such that max(p) = 2 + min(p) for k >= 1, and (s(0)..s(6)) = (0,0,0,0,1,0,2). - Clark Kimberling, Apr 15 2014
Number of r X s integer-sided rectangles such that r < s, r + s = 2n, r | s and (s - r)/2 | s. - Wesley Ivan Hurt, Apr 24 2020
Number of positive integer solutions, (r,s,t), of the equation r^2 + t*s^2 = (n + 6)^2, where r + s = n + 6 and t < r <= s. For example, when n=6 we have the two solutions (4,8,2) and (6,6,3) since 4^2 + 2*8^2 = 12^2 and 6^2 + 3*6^2 = 12^2. - Wesley Ivan Hurt, Oct 04 2020

Crossrefs

Cf. A178142. - Vladimir Shevelev, May 21 2010
Cf. A115357.
Number of distinct prime factors <= p: this sequence (p=3), A178146 (p=5), A210679 (p=7).

Programs

Formula

a(n) = A115357(n-2) for n>1. - R. J. Mathar, Dec 09 2009
a(2) = 1, a(3) = 1, a(5) = 0, otherwise a(n) = a(n-2) + a(n-3) - a(n-5), where we put a(n) = 0, if n<0. - Vladimir Shevelev, May 21 2010
a(n) = floor(((n+1) mod 6)/3) + 2*floor(((n+5) mod 6)/5). - Gary Detlefs, Feb 15 2014
From Wesley Ivan Hurt, Aug 27 2014: (Start)
G.f.: (2+2*x+x^2)/(1+x-x^3-x^4).
a(n) + a(n-1) = a(n-3) + a(n-4) for n>4.
a(n) = (1 + floor((n-3)^2/2)) mod 3. (End)
a(n) = (5 + 3*cos(n*Pi) + 4*cos(2*n*Pi/3))/6. - Wesley Ivan Hurt, Jun 19 2016
From Amiram Eldar, Sep 16 2023: (Start)
Additive with a(p^e) = 1 if p <= 3, and 0 otherwise.
a(n) = A059841(n) + A079978(n).
a(n) = A001221(A089128(n)).
a(n) = A001221(A065331(n)). (End)

Extensions

Edited by Charles R Greathouse IV, Mar 23 2010

A080672 Numbers having divisors 2 or 3 or 5 or 7.

Original entry on oeis.org

2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 22, 24, 25, 26, 27, 28, 30, 32, 33, 34, 35, 36, 38, 39, 40, 42, 44, 45, 46, 48, 49, 50, 51, 52, 54, 55, 56, 57, 58, 60, 62, 63, 64, 65, 66, 68, 69, 70, 72, 74, 75, 76, 77, 78, 80, 81, 82, 84, 85, 86, 87, 88, 90, 91, 92, 93
Offset: 1

Views

Author

Cino Hilliard, Mar 02 2003

Keywords

Comments

A020639(a(n)) <= 7; A210679(a(n)) > 0. - Reinhard Zumkeller, Apr 02 2012

Crossrefs

Cf. A020639, A008364 (complement).
Subsequences: A002473, A343597.

Programs

  • Haskell
    a080672 n = a080672_list !! (n-1)
    a080672_list = filter ((<= 7) . a020639) [2..]
    -- Reinhard Zumkeller, Apr 02 2012
  • Mathematica
    Select[Range[100],Length[Intersection[Divisors[#],{2,3,5,7}]]>0&] (* Harvey P. Dale, Apr 03 2024 *)
  • PARI
    div2357(n)= for(x=1,n, if(gcd(x,210)<>1,print1(x" ")) )
    
  • PARI
    is(n)=gcd(n,210)>1 \\ Charles R Greathouse IV, Sep 14 2015
    

Formula

From Charles R Greathouse IV, Sep 14 2015: (Start)
a(n) = 35n/27 + O(1).
For n > 162, a(n) = a(n-162) + 210. [Corrected by Peter Munn, Apr 22 2021]
(End)
For n < 162, a(n) = 210 - a(162-n). - Peter Munn, Apr 22 2021

Extensions

Offset fixed by Reinhard Zumkeller, Apr 02 2012

A178146 a(n) is the number of distinct prime factors <= 5 of n.

Original entry on oeis.org

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

Views

Author

Vladimir Shevelev, May 21 2010

Keywords

Comments

The sequence is periodic with period {0 1 1 1 1 2 0 1 1 2 0 2 0 1 2 1 0 2 0 2 1 1 0 2 1 1 1 1 0 3} of length 30. There are 26 coincidences on the interval [1,30] with A156542.

Crossrefs

Number of distinct prime factors <= p: A171182 (p=3), this sequence (p=5), A210679 (p=7).

Programs

  • Mathematica
    Rest@ CoefficientList[Series[-x^2*(3*x^6 + 6*x^5 + 7*x^4 + 6*x^3 + 5*x^2 + 3*x + 1)/((x - 1)*(x + 1)*(x^2 + x + 1)*(x^4 + x^3 + x^2 + x + 1)), {x, 0, 50}], x] (* G. C. Greubel, May 16 2017 *)
    LinearRecurrence[{-2,-2,-1,0,1,2,2,1},{0,1,1,1,1,2,0,1},120] (* Harvey P. Dale, Sep 29 2021 *)
    a[n_] := PrimeNu[GCD[n, 30]]; Array[a, 100] (* Amiram Eldar, Sep 16 2023 *)
  • PARI
    my(x='x+O('x^50)); concat([0], Vec(-x^2*(3*x^6+6*x^5+7*x^4+6*x^3+5*x^2+3*x+1)/((x-1)*(x+1)*(x^2+x+1)*(x^4+x^3+x^2+x+1)))) \\ G. C. Greubel, May 16 2017
    
  • PARI
    a(n) = omega(gcd(n, 30)); \\ Amiram Eldar, Sep 16 2023

Formula

a(n) = a(n-2) + a(n-3) - a(n-7) - a(n-8) + a(n-10), a(1) = 0, a(2) = 1, a(3) = 1, a(4) = 1, a(5) = 1, a(6) = 2, a(7) = 0, a(8) = 1, a(9) = 1, a(10) = 2.
G.f.: -x^2*(3*x^6+6*x^5+7*x^4+6*x^3+5*x^2+3*x+1) / ((x-1)*(x+1)*(x^2+x+1)*(x^4+x^3+x^2+x+1)). - Colin Barker, Mar 13 2013
From Amiram Eldar, Sep 16 2023: (Start)
Additive with a(p^e) = 1 if p <= 5, and 0 otherwise.
a(n) = A059841(n) + A079978(n) + A079998(n).
a(n) = A001221(gcd(n, 30)).
a(n) = A001221(A355582(n)).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 31/30. (End)

Extensions

Name edited by Amiram Eldar, Sep 16 2023
Showing 1-5 of 5 results.