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

A235921 Numbers n such that smallest number not dividing n^2 (A236454) is different from smallest prime not dividing n (A053669).

Original entry on oeis.org

210, 630, 1050, 1470, 1890, 2310, 2730, 3150, 3570, 3990, 4410, 4830, 5250, 5670, 6090, 6510, 6930, 7350, 7770, 8190, 8610, 9030, 9450, 9870, 10290, 10710, 11130, 11550, 11970, 12390, 12810, 13230, 13650, 14070, 14490, 14910, 15330, 15750, 16170, 16590, 17010
Offset: 1

Views

Author

Antti Karttunen and Michel Marcus, Jan 17 2014

Keywords

Comments

Equivalent definition is: numbers n such that {the largest m such that 1, 2, ..., m divide n^2 = A055874(n^2) = A235918(n)} is different from {the smallest k such that gcd(n-1,k) = gcd(n,k+1) = A071222(n-1)}.
All terms are multiples of 210 = 2*3*5*7, the fourth primorial, A002110(4).
The first term which is an even multiple of 210 (i.e., 210 times an even number), is 446185740 = 2124694 * 210 = 2*223092870 = 2*A002110(9) = 2*A034386(23). Note that 23 is the 9th prime, and 223092870 is its primorial. Thus this sequence differs from its subsequence, A236432, "the odd multiples of 210" = (2n-1)*210, for the first time at n = 1062348, where a(n) = 446185740, while A236432(n) = 446185950.
Note that a more comprehensive description for which terms are included is still lacking. Compare for example to the third definition of A055926.
At least we know the following:
If a number is not divisible by 210, then it cannot be a member, as then it is "missing" (i.e., not divisible by) one of those primes, 2, 3, 5 or 7, and thus its square is also "missing" the same prime. In more detail, this follows because:
If the least nondividing prime is 2, then A053669(n) = A236454(n) = 2. If the least nondividing prime is 3, then A053669(n) = A236454(n) = 3.
If the least nondividing prime is 5 (so 2 and 3 are present), then as 2|n and 4|(n^2), we have A053669(n) = A236454(n) = 5.
If the least nondividing prime is 7, but 2, 3 and 5 are present, then we have A053669(n) = A236454(n) = 7.
On the other hand, when n is an odd multiple of 210 (= 2*3*5*7), i.e., (2k+1)*210, so that its prime factorization is of the form 2*3*5*7*{zero or more additional odd prime factors}, then A053669(n) must be at least 11, the next prime after 7, which is certainly different from A236454(n) = A007978(n^2) which must be 8, as then 4 is the highest power of 2 dividing n^2.
In contrast to that, when n is an even multiple of 210, so that its prime factorization is of the form 2*2*3*5*7*{zero or more additional prime factors}, then also all the composites 8, 9, 10, 12, 14, 15, 16, 18 and 20 divide n^2, thus if A053669(n) is any prime from 11 to 19, A236454(n) will return the same result.
However, if n is of the form k*446185740, where k is not a multiple of 3, so that the prime factorization of n is 2*2*3*5*7*11*13*17*19*23*{zero or more additional prime factors, all different from 3}, then A053669(n) must be at least 29 (next prime after 23), but A236454(n) = 27, because then 9 is the highest power of 3 dividing n^2.
The pattern continues indefinitely: If n is of the form (2k+1)*2*3*200560490130, where 200560490130 = A002110(11), so that n has a prime factorization of the form 2*2*3*3*5*7*11*13*17*19*23*29*31*{zero or more additional odd prime factors}, then A053669(n) must be at least 37, while A236454(n) = 32 = 2^5, because then 16 is the highest power of 2 dividing n^2.

Examples

			210 (= 2*3*5*7) is a member, because A053669(210)=11, while A236454(210) = A007978(210*210) = A007978(44100) = 8.
446185740 (= 2*2*3*5*7*11*13*17*19*23) is a member, because A053669(446185740) = 29, while A236454(446185740) = 27, as there is only one 3 present in 446185740, which means that its square is only divisible by 9, but not by 27 = 3^3.
		

Crossrefs

A053669 Smallest prime not dividing n.

Original entry on oeis.org

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

Views

Author

Henry Bottomley, Feb 15 2000

Keywords

Comments

Smallest prime coprime to n.
Smallest k >= 2 coprime to n.
a(#(p-1)) = a(A034386(p-1)) = p is the first appearance of prime p in sequence.
a(A005408(n)) = 2; for n > 2: a(n) = A112484(n,1). - Reinhard Zumkeller, Sep 23 2011
Average value is 2.920050977316134... = A249270. - Charles R Greathouse IV, Nov 02 2013
Differs from A236454, "smallest number not dividing n^2", for the first time at n=210, where a(210)=11 while A236454(210)=8. A235921 lists all n for which a(n) differs from A236454. - Antti Karttunen, Jan 26 2014
For k >= 0, a(A002110(k)) is the first occurrence of p = prime(k+1). Thereafter p occurs whenever A007947(n) = A002110(k). Thus every prime appears in this sequence infinitely many times. - David James Sycamore, Dec 04 2024

Examples

			a(60) = 7, since all primes smaller than 7 divide 60 but 7 does not.
a(90) = a(120) = a(150) = a(180) = 7 because 90,120,150,180 all have same squarefree kernel = 30 = A002110(3), and 7 is the smallest prime which does not divide 30. - _David James Sycamore_, Dec 04 2024
		

Crossrefs

Programs

  • Haskell
    a053669 n = head $ dropWhile ((== 0) . (mod n)) a000040_list
    -- Reinhard Zumkeller, Nov 11 2012
    
  • Maple
    f:= proc(n) local p;
    p:= 2;
    while n mod p = 0 do p:= nextprime(p) od:
    p
    end proc:
    map(f, [$1..100]); # Robert Israel, May 18 2016
  • Mathematica
    Table[k := 1; While[Not[GCD[n, Prime[k]] == 1], k++ ]; Prime[k], {n, 1, 60}] (* Stefan Steinerberger, Apr 01 2006 *)
    With[{prs=Prime[Range[10]]},Flatten[Table[Select[prs,!Divisible[ n,#]&,1],{n,110}]]] (* Harvey P. Dale, May 03 2012 *)
  • PARI
    a(n)=forprime(p=2,,if(n%p,return(p))) \\ Charles R Greathouse IV, Nov 20 2012
    
  • Python
    from sympy import nextprime
    def a(n):
        p = 2
        while True:
            if n%p: return p
            else: p=nextprime(p) # Indranil Ghosh, May 12 2017
    
  • Python
    # using standard library functions only
    import math
    def a(n):
        k = 2
        while math.gcd(n,k) > 1: k += 1
        return k # Ely Golden, Nov 26 2020
  • Scheme
    (define (A053669 n) (let loop ((i 1)) (cond ((zero? (modulo n (A000040 i))) (loop (+ i 1))) (else (A000040 i))))) ;; Antti Karttunen, Jan 26 2014
    

Formula

a(n) = A071222(n-1)+1. [Because the right hand side computes the smallest k >= 2 such that gcd(n,k) = gcd(n-1,k-1) which is equal to the smallest k >= 2 coprime to n] - Antti Karttunen, Jan 26 2014
a(n) = 1 + Sum_{k=1..n}(floor((n^k)/k!)-floor(((n^k)-1)/k!)) = 2 + Sum_{k=1..n} A001223(k)*( floor(n/A002110(k))-floor((n-1)/A002110(k)) ). - Anthony Browne, May 11 2016
a(n!) = A151800(n). - Anthony Browne, May 11 2016
a(2k+1) = 2. - Bernard Schott, Jun 03 2019
Asymptotic mean: lim_{n->oo} (1/n) * Sum_{k=1..n} a(k) = A249270. - Amiram Eldar, Oct 29 2020
a(n) = A000040(A257993(n)) = A020639(A276086(n)) = A276086(n) / A324895(n). - Antti Karttunen, Apr 24 2022
a(n) << log n. For every e > 0, there is some N such that for all n > N, a(n) < (1 + e)*log n. - Charles R Greathouse IV, Dec 03 2022
A007947(n) = A002110(k) ==> a(n) = prime(k+1). - David James Sycamore, Dec 04 2024

Extensions

More terms from Andrew Gacek (andrew(AT)dgi.net), Feb 21 2000 and James Sellers, Feb 22 2000
Entry revised by David W. Wilson, Nov 25 2006

A235918 Largest m such that 1, 2, ..., m divide n^2.

Original entry on oeis.org

1, 2, 1, 2, 1, 4, 1, 2, 1, 2, 1, 4, 1, 2, 1, 2, 1, 4, 1, 2, 1, 2, 1, 4, 1, 2, 1, 2, 1, 6, 1, 2, 1, 2, 1, 4, 1, 2, 1, 2, 1, 4, 1, 2, 1, 2, 1, 4, 1, 2, 1, 2, 1, 4, 1, 2, 1, 2, 1, 6, 1, 2, 1, 2, 1, 4, 1, 2, 1, 2, 1, 4, 1, 2, 1, 2, 1, 4, 1, 2, 1, 2, 1, 4, 1, 2, 1
Offset: 1

Views

Author

Michel Marcus, Jan 17 2014

Keywords

Comments

Note that a(n) is equal to A071222(n-1) = A053669(n)-1 for the first 209 values of n. The first difference occurs at n=210, where a(210)=7, while A071222(209)=10. A235921 lists all n where a(n) differs from A071222(n-1). (Note also that a(n) is equal to A071222(n+29) for n=1..179.) - [Comment revised by Antti Karttunen, Jan 26 2014 because of the changed definition of A235921 and newly inserted a(0)=1 term of A071222.]
See A055874 for a similar comment concerning the difference between A055874 and A232098.
Average value is 1.9124064... = sum_{n>=1} 1/A019554(A003418(n)). - Charles R Greathouse IV, Jan 24 2014

Crossrefs

One less than A236454.

Programs

  • Mathematica
    a[n_] := Module[{m = 1}, While[Divisible[n^2, m++]]; m - 2]; Array[a, 100] (* Jean-François Alcover, Mar 07 2016 *)
  • PARI
    a(n) = my(m = 1); while ((n^2 % m) == 0, m++); m - 1; \\ Michel Marcus, Jan 17 2014

Formula

a(n) = A055874(n^2).
a(n) = A236454(n)-1.

A236432 a(n) = (2n-1)*210; numbers which are 210 times an odd number.

Original entry on oeis.org

210, 630, 1050, 1470, 1890, 2310, 2730, 3150, 3570, 3990, 4410, 4830, 5250, 5670, 6090, 6510, 6930, 7350, 7770, 8190, 8610, 9030, 9450, 9870, 10290, 10710, 11130, 11550, 11970, 12390, 12810, 13230, 13650, 14070, 14490, 14910, 15330, 15750, 16170, 16590, 17010
Offset: 1

Views

Author

Antti Karttunen, Jan 25 2014

Keywords

Comments

This is a subsequence of A235921, from which it differs for the first time at n = 1062348, where a(n) = ((2*1062348)-1)*210 = 446185950, while A235921(n) = 446185740.

Crossrefs

Cf. A235921.

Programs

Formula

a(n) = (2n-1) * 210 = 420*n - 210.
For all n, A236454(a(n)) = 8, while A053669(a(n)) >= 11. [Cf. comments at A235921]
Showing 1-4 of 4 results.