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

A230078 Complement of A138929: positive integers not of the form 2*p^k, k >= 0, p a prime (also 2).

Original entry on oeis.org

1, 3, 5, 7, 9, 11, 12, 13, 15, 17, 19, 20, 21, 23, 24, 25, 27, 28, 29, 30, 31, 33, 35, 36, 37, 39, 40, 41, 42, 43, 44, 45, 47, 48, 49, 51, 52, 53, 55, 56, 57, 59, 60, 61, 63, 65, 66, 67, 68, 69, 70, 71, 72, 73, 75, 76, 77, 78, 79, 80, 81, 83, 84, 85, 87, 88, 89, 90, 91, 92, 93, 95, 96, 97, 99, 100
Offset: 1

Views

Author

Wolfdieter Lang, Nov 02 2013

Keywords

Comments

The complement relative to the positive integers of the present sequence is A138929.
The sequence includes all positive integers of the forms (i) odd, (ii) 2^k*p, p an odd prime and k>=2, and (iii) 2^e0*p1^e1*p2^e2 *** pk^ek, k >= 2, with odd primes p1, ..., pk, and each exponent from {e0, ..., ek} is >= 1.
For a(n) > 1 a regular a(n)-gon, with length ratio (smallest diagonal)/side rho(a(n)) = 2*cos(Pi/a(n)), the inverse of rho(a(n)), which is an element of the algebraic number field Q(rho(a(n))), is in fact a Q(rho(a(n)))-integer. For a(1)=1 rho(1) = -2, and the inverse is not a Q-integer.

Examples

			Even members a(n) of the form (ii) 2^k*p, p an odd prime and k>=2 are: 12, 20, 24, 28, 36, 40, 44, 48, 52, 56, 68, 72, 76, 80, 88, 92, 96, 100,...
Even members a(n) of the form (iii), given above, include 30, 42, 60, 66, 70, 78, 84, 90, ...
For the regular 5-gon (pentagon) rho(5) = tau = (1 + sqrt(5))/ 2 (the golden section). The number field is Q(rho(5)), and for the inverse one has 1/rho(5) = -1*1 + 1* rho(5) (in the power basis <1, rho(5)>, in which Q(rho(5))-integers have integer coefficients).
For the regular 7-gon rho(7) = 2*cos(Pi/7), (approximately 1.801937736) is of degree 3, and 1/rho(7) = 2*1 + 1*rho(7) - 1*rho(7)^2, (approximately 0.5549581320), hence a Q(rho(7))- integer.
For Gauss' regular 17-gon rho(17) = 2*cos(Pi/17) (approximately 1.965946199) is of degree 8 and 1/rho(17) = -4*1+ 10*rho(17)^1 + 10*rho(17)^2  - 15*rho(17)^3 -6*rho(17)^4 + 7*rho(17)^5 + 1*rho(17)^6  -1*rho(17)^7, (approximately 0.5086610), hence this is a Q(rho(17))- integer.
		

Crossrefs

Cf. A138929 (complement), 2*A020513, A230079 (1/rho(a(n))).

Programs

  • Mathematica
    With[{upto = 100}, Complement[Range[upto], 2*Join[{1}, Select[Range[upto/2], PrimePowerQ]]]] (* Paolo Xausa, Aug 30 2024 *)
  • Python
    from sympy import primepi, integer_nthroot
    def A230078(n):
        if n == 1: return 1
        def f(x): return int(n+1+sum(primepi(integer_nthroot(x>>1,k)[0]) for k in range(1,(x>>1).bit_length())))
        kmin, kmax = 0,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 # Chai Wah Wu, Aug 29 2024

A000961 Powers of primes. Alternatively, 1 and the prime powers (p^k, p prime, k >= 1).

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 8, 9, 11, 13, 16, 17, 19, 23, 25, 27, 29, 31, 32, 37, 41, 43, 47, 49, 53, 59, 61, 64, 67, 71, 73, 79, 81, 83, 89, 97, 101, 103, 107, 109, 113, 121, 125, 127, 128, 131, 137, 139, 149, 151, 157, 163, 167, 169, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227
Offset: 1

Views

Author

Keywords

Comments

The term "prime power" is ambiguous. To a mathematician it means any number p^k, p prime, k >= 0, including p^0 = 1.
Any nonzero integer is a product of primes and units, where the units are +1 and -1. This is tied to the Fundamental Theorem of Arithmetic which proves that the factorizations are unique up to order and units. (So, since 1 = p^0 does not have a well defined prime base p, it is sometimes not regarded as a prime power. See A246655 for the sequence without 1.)
These numbers are (apart from 1) the numbers of elements in finite fields. - Franz Vrabec, Aug 11 2004
Numbers whose divisors form a geometrical progression. The divisors of p^k are 1, p, p^2, p^3, ..., p^k. - Amarnath Murthy, Jan 09 2002
These are also precisely the orders of those finite affine planes that are known to exist as of today. (The order of a finite affine plane is the number of points in an arbitrarily chosen line of that plane. This number is unique for all lines comprise the same number of points.) - Peter C. Heinig (algorithms(AT)gmx.de), Aug 09 2006
Except for first term, the index of the second number divisible by n in A002378, if the index equals n. - Mats Granvik, Nov 18 2007
These are precisely the numbers such that lcm(1,...,m-1) < lcm(1,...,m) (=A003418(m) for m>0; here for m=1, the l.h.s. is taken to be 0). We have a(n+1)=a(n)+1 if a(n) is a Mersenne prime or a(n)+1 is a Fermat prime; the converse is true except for n=7 (from Catalan's conjecture) and n=1, since 2^1-1 and 2^0+1 are not considered as Mersenne resp. Fermat prime. - M. F. Hasler, Jan 18 2007, Apr 18 2010
The sequence is A000015 without repetitions, or more formally, A000961=Union[A000015]. - Zak Seidov, Feb 06 2008
Except for a(1)=1, indices for which the cyclotomic polynomial Phi[k] yields a prime at x=1, cf. A020500. - M. F. Hasler, Apr 04 2008
Also, {A138929(k) ; k>1} = {2*A000961(k) ; k>1} = {4,6,8,10,14,16,18,22,26,32,34,38,46,50,54,58,62,64,74,82,86,94,98,...} are exactly the indices for which Phi[k](-1) is prime. - M. F. Hasler, Apr 04 2008
A143201(a(n)) = 1. - Reinhard Zumkeller, Aug 12 2008
Number of distinct primes dividing n=omega(n) < 2. - Juri-Stepan Gerasimov, Oct 30 2009
Numbers n such that Sum_{p-1|p is prime and divisor of n} = Product_{p-1|p is prime and divisor of n}. A055631(n) = A173557(n-1). - Juri-Stepan Gerasimov, Dec 09 2009, Mar 10 2010
Numbers n such that A028236(n) = 1. Klaus Brockhaus, Nov 06 2010
A188666(k) = a(k+1) for k: 2*a(k) <= k < 2*a(k+1), k > 0; notably a(n+1) = A188666(2*a(n)). - Reinhard Zumkeller, Apr 25 2011
A003415(a(n)) = A192015(n); A068346(a(n)) = A192016(n); a(n)=A192134(n) + A192015(n). - Reinhard Zumkeller, Jun 26 2011
A089233(a(n)) = 0. - Reinhard Zumkeller, Sep 04 2013
The positive integers n such that every element of the symmetric group S_n which has order n is an n-cycle. - W. Edwin Clark, Aug 05 2014
Conjecture: these are numbers m such that Sum_{k=0..m-1} k^phi(m) == phi(m) (mod m), where phi(m) = A000010(m). - Thomas Ordowski and Giovanni Resta, Jul 25 2018
Numbers whose (increasingly ordered) divisors are alternatingly squares and nonsquares. - Michel Marcus, Jan 16 2019
Possible numbers of elements in a finite vector space. - Jianing Song, Apr 22 2021

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 870.
  • M. Koecher and A. Krieg, Ebene Geometrie, Springer, 1993.
  • R. Lidl and H. Niederreiter, Introduction to Finite Fields and Their Applications, Cambridge 1986, Theorem 2.5, p. 45.
  • 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

There are four different sequences which may legitimately be called "prime powers": A000961 (p^k, k >= 0), A246655 (p^k, k >= 1), A246547 (p^k, k >= 2), A025475 (p^k, k=0 and k >= 2). When you refer to "prime powers", be sure to specify which of these you mean. Also A001597 is the sequence of nontrivial powers n^k, n >= 1, k >= 2. - N. J. A. Sloane, Mar 24 2018
Cf. indices of record values of A003418; A000668 and A019434 give a member of twin pairs a(n+1)=a(n)+1.
A138929(n) = 2*a(n).
A028236 (if n = Product (p_j^k_j), a(n) = numerator of Sum 1/p_j^k_j). - Klaus Brockhaus, Nov 06 2010
A000015(n) = Min{term : >= n}; A031218(n) = Max{term : <= n}.
Complementary (in the positive integers) to sequence A024619. - Jason Kimberley, Nov 10 2015

Programs

  • Haskell
    import Data.Set (singleton, deleteFindMin, insert)
    a000961 n = a000961_list !! (n-1)
    a000961_list = 1 : g (singleton 2) (tail a000040_list) where
    g s (p:ps) = m : g (insert (m * a020639 m) $ insert p s') ps
    where (m, s') = deleteFindMin s
    -- Reinhard Zumkeller, May 01 2012, Apr 25 2011
    
  • Magma
    [1] cat [ n : n in [2..250] | IsPrimePower(n) ]; // corrected by Arkadiusz Wesolowski, Jul 20 2012
    
  • Maple
    readlib(ifactors): for n from 1 to 250 do if nops(ifactors(n)[2])=1 then printf(`%d,`,n) fi: od:
    # second Maple program:
    a:= proc(n) option remember; local k; for k from
          1+a(n-1) while nops(ifactors(k)[2])>1 do od; k
        end: a(1):=1: A000961:= a:
    seq(a(n), n=1..100);  # Alois P. Heinz, Apr 08 2013
  • Mathematica
    Select[ Range[ 2, 250 ], Mod[ #, # - EulerPhi[ # ] ] == 0 & ]
    Select[ Range[ 2, 250 ], Length[FactorInteger[ # ] ] == 1 & ]
    max = 0; a = {}; Do[m = FactorInteger[n]; w = Sum[m[[k]][[1]]^m[[k]][[2]], {k, 1, Length[m]}]; If[w > max, AppendTo[a, n]; max = w], {n, 1, 1000}]; a (* Artur Jasinski *)
    Join[{1}, Select[Range[2, 250], PrimePowerQ]] (* Jean-François Alcover, Jul 07 2015 *)
  • PARI
    A000961(n,l=-1,k=0)=until(n--<1,until(lA000961(lim=999,l=-1)=for(k=1,lim, l==lcm(l,k) && next; l=lcm(l,k); print1(k,",")) \\ M. F. Hasler, Jan 18 2007
    
  • PARI
    isA000961(n) = (omega(n) == 1 || n == 1) \\ Michael B. Porter, Sep 23 2009
    
  • PARI
    nextA000961(n)=my(m,r,p);m=2*n;for(e=1,ceil(log(n+0.01)/log(2)),r=(n+0.01)^(1/e);p=prime(primepi(r)+1);m=min(m,p^e));m \\ Michael B. Porter, Nov 02 2009
    
  • PARI
    is(n)=isprimepower(n) || n==1 \\ Charles R Greathouse IV, Nov 20 2012
    
  • PARI
    list(lim)=my(v=primes(primepi(lim)),u=List([1])); forprime(p=2,sqrtint(lim\1),for(e=2,log(lim+.5)\log(p),listput(u,p^e))); vecsort(concat(v,Vec(u))) \\ Charles R Greathouse IV, Nov 20 2012
    
  • Python
    from sympy import primerange
    def A000961_list(limit): # following Python style, list terms < limit
        L = [1]
        for p in primerange(1, limit):
            pe = p
            while pe < limit:
                L.append(pe)
                pe *= p
        return sorted(L) # Chai Wah Wu, Sep 08 2014, edited by M. F. Hasler, Jun 16 2022
    
  • Python
    from sympy import primepi
    from sympy.ntheory.primetest import integer_nthroot
    def A000961(n):
        def f(x): return int(n+x-1-sum(primepi(integer_nthroot(x,k)[0]) for k in range(1,x.bit_length())))
        m, k = n, f(n)
        while m != k:
            m, k = k, f(k)
        return m # Chai Wah Wu, Jul 23 2024
  • Sage
    def A000961_list(n):
        R = [1]
        for i in (2..n):
            if i.is_prime_power(): R.append(i)
        return R
    A000961_list(227) # Peter Luschny, Feb 07 2012
    

Formula

a(n) = A025473(n)^A025474(n). - David Wasserman, Feb 16 2006
a(n) = A117331(A117333(n)). - Reinhard Zumkeller, Mar 08 2006
Panaitopol (2001) gives many properties, inequalities and asymptotics, including a(n) ~ prime(n). - N. J. A. Sloane, Oct 31 2014, corrected by M. F. Hasler, Jun 12 2023 [The reference gives pi*(x) = pi(x) + pi(sqrt(x)) + ... where pi*(x) counts the terms up to x, so it is the inverse function to a(n).]
m=a(n) for some n <=> lcm(1,...,m-1) < lcm(1,...,m), where lcm(1...0):=0 as to include a(1)=1. a(n+1)=a(n)+1 <=> a(n+1)=A019434(k) or a(n)=A000668(k) for some k (by Catalan's conjecture), except for n=1 and n=7. - M. F. Hasler, Jan 18 2007, Apr 18 2010
A001221(a(n)) < 2. - Juri-Stepan Gerasimov, Oct 30 2009
A008480(a(n)) = 1 for all n >= 1. - Alois P. Heinz, May 26 2018
Sum_{k=1..n} 1/a(k) ~ log(log(a(n))) + 1 + A077761 + A136141. - François Huppé, Jul 31 2024

Extensions

Description modified by Ralf Stephan, Aug 29 2014

A187360 Coefficient array for minimal polynomials of 2*cos(Pi/n) (rising powers of x).

Original entry on oeis.org

2, 1, 0, 1, -1, 1, -2, 0, 1, -1, -1, 1, -3, 0, 1, 1, -2, -1, 1, 2, 0, -4, 0, 1, -1, -3, 0, 1, 5, 0, -5, 0, 1, -1, 3, 3, -4, -1, 1, 1, 0, -4, 0, 1, -1, -3, 6, 4, -5, -1, 1, -7, 0, 14, 0, -7, 0, 1, 1, -4, -4, 1, 1, 2, 0, -16, 0, 20, 0, -8, 0, 1, 1, 4, -10, -10, 15, 6, -7, -1, 1
Offset: 1

Views

Author

Wolfdieter Lang, Jul 14 2011

Keywords

Comments

The degree delta(n) of the monic integer row polynomial, call it C(n,x), is A055034(n).
This minimal polynomial of the algebraic number 2*cos(Pi/n), n>=1, is given by
C(n,x) = sum(a(n,m)*x^m,m=0..A055034(n)) = (2^delta(n))*Psi(2n,x/2), with Psi(n,x) the minimal polynomial of cos(2Pi/n), with rational coefficient array A181875/A181876. There also references and links are found. See especially Watkins and Zeitlin for Psi(n,x).
The zeros of C(n,x), n>=2, are 2*cos(Pi k/n), with k=1,...,n-1 and gcd(k,2n)=1. For n=1 the zero is -2. Alternatively, these zeros are 2*cos(Pi(2l+1)/n), with l=0,...,floor((n-2)/2) and gcd(2l+1,n)=1. For n=1 take l=0.
The first column looks like the differently signed A020513(n),n>=1.
The polynomial for row n=2^m, m>=1, coincides with the row polynomial R(2^(m-1),x) of A127672. See the factorization of these R-polynomials (also known as Chebyshev C-polynomials) given there. - Wolfdieter Lang, Sep 15 2011
From Wolfdieter Lang, Nov 04 2013: (Start)
The norm N(rho(n)) of rho(n) = 2*cos(Pi/n), n >= 1, in the algebraic number field Q(rho(n)) is given by (-1)^delta(n)* C(n, 0), with C(n, x) of degree delta(n) = A055034(n). If N(rho(n)) equals +1 or -1 then 1/rho(n), which is an element of Q(rho(n)), is in fact an integer in this number field. For the 1/rho(n) formula in terms of the C coefficients see A230079. Thus 1/rho(n) is a Q(rho(n))-integer if and only if C(n, 0) is +1 or -1 , and this happens if and only if n is from the set {A230078(k), k >= 2}.
The negation says that, for n a positive integer, 1/rho(n) is not a Q(rho(n))-integer if and only if n is 1 or of the form 2*p^m, m >= 0 and p a prime, which are the numbers of A138929 including 1.
The proof uses for case (i): n = 2*m+1, m >= 1, the fact that C(2*m+1, 0)^2 = (product( 2*cos(Pi*(2*l+1)/(2*m+1)), l=0 .. m-1 and gcd(2*l+1, 2*m+1) = 1))^2 = (product(2*cos(Pi*k/(2*m+1)), k=1..L and gcd(k, 2*m+1) = 1))^2 = cyclotomic(2*m +1, -1). See the linked Q(rho(n)) paper, eq. (31), for a product formula for cyclotomic(n, -1). With the prime factorization of 2*m+1, and the fact that only the squarefree kernel of 2*m+1 enters (see an Oct 29 2013 comment on A013595), one finds, form the formula for cyclotomic(p1*p2*...*pk, x) involving the Moebius function, cyclotomic(2*m +1, -1) = +1, m >= 1. C(1, 0) = +2. For case (ii): n even, one has C(2^m, 0) = 0, -2, +2, for m = 1 , 2, >=3, respectively (see eq. (39) of the linked Q(rho(n)) paper). For odd prime p: (-1)^((p-1)/2)*C(2*p^m, 0) = cyclotomic(2*p^m, -1) = cyclotomic(2*p, -1) = cyclotomic(p, +1) = p, for m >= 1. For more than one odd prime in the squarefree kernel of n = 2*m, m >= 1, one finds C(2*m, 0) = +1 from cyclotomic(2*p1*...*pk, -1) = +1, for k >= 2. (End)
For the conversion of the C-polynomials into sums of Chebyshev's S-polynomials (A049310) see A255237. - Wolfdieter Lang, Mar 16 2015

Examples

			n=1:  2, 1;
n=2:  0, 1;
n=3: -1, 1;
n=4: -2, 0, 1;
n=5: -1,-1, 1;
n=6: -3, 0, 1;
n=7:  1,-2,-1, 1;
n=8:  2, 0,-4, 0, 1;
n=9: -1,-3, 0, 1;
n=10: 5, 0,-5, 0, 1;
...
C(2,x) = R(1,x), C(4,x) = R(2,x), C(8,x) = R(4,x),... with R(n,x) from A127672. - _Wolfdieter Lang_, Sep 15 2011
		

Crossrefs

Cf. A192003 (row sums). A192004 (alternating row sums).

Programs

  • Maple
    f:= proc(n) local P,z,j;
       P:= factor(evala(Norm(z-convert(2*cos(Pi/n),RootOf))));
       if type(P,`^`) then P:= op(1,P) fi;
       seq(coeff(P,z,j),j=0..degree(P));
    end proc:
    seq(f(n),n=1..20); # Robert Israel, Aug 04 2015
  • Mathematica
    Flatten[ CoefficientList[ Table[ MinimalPolynomial[2*Cos[Pi/n], x], {n, 1, 17}], x]] (* Jean-François Alcover, Sep 26 2011 *)
  • PARI
    halftot(n)=if(n<=2, 1, eulerphi(n)/2); \\ A023022
    default(realprecision, 110);
    row(n) = Vecrev(algdep(2*cos(2*Pi/n), halftot(n))); \\ Michel Marcus, Sep 19 2023

Formula

a(n,m) = [x^m] C(n,x), n>=1, m=0..A055034(n), with the minimal (monic and integer) polynomial C(n,x) of 2*cos(Pi/n). See the comment above.

A020513 Cyclotomic polynomials evaluated at x=-1.

Original entry on oeis.org

-1, -2, 0, 1, 2, 1, 3, 1, 2, 1, 5, 1, 1, 1, 7, 1, 2, 1, 3, 1, 1, 1, 11, 1, 1, 1, 13, 1, 1, 1, 1, 1, 2, 1, 17, 1, 1, 1, 19, 1, 1, 1, 1, 1, 1, 1, 23, 1, 1, 1, 5, 1, 1, 1, 3, 1, 1, 1, 29, 1, 1, 1, 31, 1, 2
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A138929 (2*p^m, m >= 0 values).

Programs

  • Maple
    with(numtheory,cyclotomic); f := n->subs(x=-1,cyclotomic(n,x)); seq(f(i),i=0..64);
  • Mathematica
    Array[Cyclotomic[#, -1] &, 90, 0] (* Robert G. Wilson v, Nov 23 2016 *)
  • PARI
    a(n) = if (n==0, -1, subst(polcyclo(n), x, -1)); \\ Michel Marcus, Apr 22 2016
    
  • PARI
    a(n) = if (n==0, -1, if (n==1, -2, if (n==2, 0, if (!(n % 2) && isprimepower(n/2,&p), p, 1)))); \\ Michel Marcus, Nov 23 2016
    
  • Python
    from sympy import primefactors
    def A020513(n): return (-1,-2,0)[n] if n<3 else (f[0] if n&1^1 and len(f:=primefactors(n>>1))==1 else 1) # Chai Wah Wu, Aug 26 2024

Formula

For n >= 3: if n = 2*p^m with a prime p then a(n) = p otherwise a(n) = 1. - Ola Veshta (olaveshta(AT)my-deja.com), Jun 01 2001

A346608 Indices k such that A047994(k) != A344005(k).

Original entry on oeis.org

12, 15, 20, 21, 24, 28, 30, 33, 35, 36, 39, 40, 42, 44, 45, 48, 51, 52, 55, 56, 57, 60, 63, 65, 66, 68, 69, 70, 72, 75, 76, 77, 78, 80, 84, 85, 87, 88, 90, 91, 92, 93, 95, 96, 99, 100, 102, 104, 105, 108, 110, 111, 112, 114, 115, 116, 117, 119, 120, 123, 124, 126, 129, 130, 132, 133, 135, 136, 138, 140
Offset: 1

Views

Author

N. J. A. Sloane, Aug 09 2021

Keywords

Comments

Conjectures: (i) For all k in this sequence, A047994(k) >= A344005(k).
(ii) Equals composite numbers with {18, 2*p (p prime), p^i (p prime, i >= 2)} deleted.
The second conjecture asserts that this is equal to A265128 with {0, 1, 18} deleted.
I believe I have a proof of both conjectures, although I have not yet written out all the details.
Numbers k that are in A265128, but do not appear here are: 1, 18, 50, 54, 98, 162, 242, 250, 338, 486, 578, 686, ... probably given by {1} UNION A354929. Hence conjecture: the sequence consists of numbers that are neither a power of prime, or 2 * power of prime. - Antti Karttunen, Jun 14 2022
Is this the set of all k such that Phi_k(-1) = Phi_k(0) = Phi_k(1) where Phi_k denotes the k-th cyclotomic polynomial? - Jeppe Stig Nielsen, Jun 26 2023

Crossrefs

Cf. A047994, A265128, A344005, A345992, A354928 (complement).
Positions of nonzeros in A346607. Positions of zeros in A354924.
Setwise difference A265128 \ ({0,1} U A138929). (conjectured).
Intersection of A024619 and A230078 (conjectured).

Programs

A188666 Largest m <= n such that lcm(m, m+1, ..., n) = lcm(1, 2, ..., n).

Original entry on oeis.org

1, 2, 2, 3, 3, 4, 4, 5, 5, 7, 7, 7, 7, 8, 8, 9, 9, 11, 11, 11, 11, 13, 13, 13, 13, 16, 16, 16, 16, 16, 16, 17, 17, 19, 19, 19, 19, 23, 23, 23, 23, 23, 23, 23, 23, 25, 25, 25, 25, 27, 27, 27, 27, 29, 29, 29, 29, 31, 31, 31, 31, 32, 32, 37, 37, 37, 37, 37, 37
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 25 2011

Keywords

Comments

By definition: A003418(n) = lcm(a(n), a(n)+1, ... n)
and lcm(m, m+1, ... n) < A003418(n) for m > a(n);
all terms are prime powers, cf. A000961: A010055(a(n)) = 1;
a(A110654(n)) = A000015(n);
floor(n/2)+1 <= a(n) < a(2*(a(n));
A000961(n+1) = a(2*A000961(n)) = a(A138929(n)), cf. formula.
A237709 gives number of occurrences of n-th prime power. - Reinhard Zumkeller, Feb 12 2014
Conjecture: a(n) = A000015(floor(n/2)+1). - Georg Fischer, Nov 29 2022

Crossrefs

Programs

  • Haskell
    import Data.List (elemIndices)
    a188666 n = a188666_list !! (n-1)
    a188666_list = g 1 a000961_list where
       g n pps'@(pp:pp':pps) | n < 2*pp  = pp  : g (n+1) pps'
                             | otherwise = pp' : g (n+1) (pp':pps)
    -- Alternative, rewriting the definition, but less efficient:
    a188666' n = last $ elemIndices (f 1) $ map f [0..n] where
       f from = foldl lcm 1 [from..n]
    
  • Mathematica
    Table[Block[{k = n, m = LCM @@ Range[n]},  While[LCM @@ Range[k, n] != m, k--]; k], {n, 69}] (* Michael De Vlieger, Nov 29 2022 *)
  • PARI
    A188666(n)=L=lcm(n=vector(n-1,k,k+1));!for(m=1,#n,lcm(n[-m..-1])==L&&return(#n+2-m))\\ Rather illustrative than efficient. - M. F. Hasler, Jul 25 2015
    
  • Python
    from itertools import count
    from sympy import factorint
    def A188666(n): return next(filter(lambda m:len(factorint(m))<=1, count((n>>1)+1))) # Chai Wah Wu, Oct 25 2024

Formula

a(n) = A000961(k+1) for n: 2*A000961(k) <= n < 2*A000961(k+1), k > 0.

A383276 Numbers of the form A034444(k) * k.

Original entry on oeis.org

1, 4, 6, 8, 10, 14, 16, 18, 22, 24, 26, 32, 34, 38, 40, 46, 48, 50, 54, 56, 58, 60, 62, 64, 72, 74, 80, 82, 84, 86, 88, 94, 96, 98, 104, 106, 112, 118, 122, 128, 132, 134, 136, 140, 142, 144, 146, 152, 156, 158, 160, 162, 166, 176, 178, 180, 184, 192, 194, 200
Offset: 1

Views

Author

Amiram Eldar, Apr 21 2025

Keywords

Comments

The sorted values of {abs(A298473(n))}.
Numbers m that have a divisor d such that A034444(d) * d = m.
All the terms above 1 are even since A034444(k) is even for k >= 2.
A number m is a term if and only if either A007814(m) = A005087(m) or A007814(m) > A005087(m) + 1.

Crossrefs

The unitary analog of A036438.
Subsequences: A100484, A138929 \ {2}, A151821.
Cf. A005087, A007814, A034444, A298473, A383277 (characteristic function), A383278 (number of terms not exceeding n), A383279.

Programs

  • Mathematica
    q[k_] := AnyTrue[Divisors[k], 2^PrimeNu[#] * # == k &]; Select[Range[200], q]
    (* second program: *)
    q[k_] := Module[{e = IntegerExponent[k, 2], w}, w = PrimeNu[k/2^e]; e > w + 1 || e == w]; Select[Range[200], q]
  • PARI
    isok(k) = fordiv(k, d, if((1 << omega(d)) * d == k, return(1))); 0;
    
  • PARI
    isok(k) = {my(e = valuation(k, 2), w = omega(k >> e)); e > w + 1 || e == w;}

Formula

a(n) = A383279(n) * A034444(A383279(n)).

A237709 Number of occurrences of n-th prime power in A188666.

Original entry on oeis.org

1, 2, 2, 2, 2, 4, 2, 2, 4, 4, 6, 2, 4, 8, 4, 4, 4, 4, 2, 10, 8, 4, 8, 4, 8, 12, 4, 6, 6, 8, 4, 12, 4, 4, 12, 16, 8, 4, 8, 4, 8, 16, 8, 4, 2, 6, 12, 4, 20, 4, 12, 12, 8, 4, 8, 12, 4, 20, 4, 8, 4, 24, 24, 8, 4, 8, 12, 4, 4, 16, 10, 2, 12, 12, 4, 12, 8, 4, 12
Offset: 1

Views

Author

Reinhard Zumkeller, Feb 12 2014

Keywords

Examples

			A188666: 1 2 2 3 3 4 4 5 5 7 7 7 7 8 8 9 9 11 11 11 11 13 13 13 13 16 ...
A237709: 1   2   2   2   2       4   2   2           4           4
		

Crossrefs

Programs

  • Haskell
    import Data.List (group)
    a237709 n = a237709_list !! (n-1)
    a237709_list = map length $ group a188666_list
Showing 1-8 of 8 results.