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 21-30 of 64 results. Next

A007978 Least non-divisor of n.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Least k >= 2 such that sigma(n) divides sigma(n*k), where sigma is A000203. - Benoit Cloitre, Dec 01 2002
Contains all and only the prime powers p^k, k > 0. The first occurrence of p^k is at A003418(p^k-1); so new records occur at indices in A051451. - Franklin T. Adams-Watters, Jun 13 2011

Crossrefs

Cf. also A266620 (least non-divisor of n!).

Programs

  • Haskell
    import Data.List ((\\))
    a007978 = head . ([1..] \\) . a027750_row
    -- Reinhard Zumkeller, May 10 2014
    
  • Maple
    a:= proc(n) local k;
    for k from 2 while n mod k = 0 do od:
    k
    end proc:
    seq(a(n),n=1..100); # Robert Israel, Sep 02 2014
  • Mathematica
    Table[k := 1; While[Mod[n, k] == 0, k++]; k, {n, 2000}]  (* Clark Kimberling, Jun 16 2012 *)
    Join[{2, 3}, Table[Complement[Range[n], Divisors[n]][[1]], {n, 3, 100}]] (* Alonso del Arte, Sep 23 2017 *)
  • PARI
    a(n) = {my(k=2); while(!(n % k), k++); k;} \\ Michel Marcus, Sep 25 2017
    
  • Python
    def a(n):
        k = 2
        while not n%k: k += 1
        return k
    print([a(n) for n in range(1, 101)]) # Michael S. Branicky, Jul 09 2022
    
  • Python
    def A007978(n): return next(filter(lambda d:n%d,range(2,n))) if n>2 else n+1 # Chai Wah Wu, Feb 22 2023

Formula

a(n) = A053669(n) + A061853(n) = A055874(n) + 1. - Henry Bottomley, May 10 2001
G.f.: sum(k >= 2, -k*(x^A003418(k) - x^A003418(k-1))/((x^A003418(k) - 1)*(x^A003418(k-1) - 1))). - Robert Israel, Sep 02 2014
From Alonso del Arte, Sep 23 2017: (Start)
a(n) < n for all n > 2.
a(2n + 1) = 2, a(2n) >= 3.
a(2^k) = 3 for k > 0.
a(n!) = prime(pi(n) + 1) for n >= 0, except for a(3!) = 4. (End)
Asymptotic mean: lim_{n->oo} Sum_{k=1..n} a(k) = 1 + A064859 (Farhi, 2009). - Amiram Eldar, Jun 29 2021

A025473 a(1) = 1; for n > 1, a(n) = prime root of n-th prime power (A000961).

Original entry on oeis.org

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

Views

Author

David W. Wilson, Dec 11 1999

Keywords

Comments

This sequence is related to the cyclotomic sequences A013595 and A020500, leading to the procedure used in the Mathematica program. - Roger L. Bagula, Jul 08 2008
"LCM numeral system": a(n+1) is radix for index n, n >= 0; a(-n+1) is 1/radix for index n, n < 0. - Daniel Forgues, May 03 2014
This is the LCM-transform of A000961; same as A014963 with all 1's (except a(1)) removed. - David James Sycamore, Jan 11 2024

References

  • Paul J. McCarthy, Algebraic Extensions of Fields, Dover books, 1976, pages 40, 69

Crossrefs

Programs

  • Haskell
    a025473 = a020639 . a000961 -- Reinhard Zumkeller, Aug 14 2013
    
  • Maple
    cvm := proc(n, level) local f,opf; if n < 2 then RETURN() fi;
    f := ifactors(n); opf := op(1,op(2,f)); if nops(op(2,f)) > 1 or
    op(2,opf) <= level then RETURN() fi; op(1,opf) end:
    A025473_list := n -> [1,seq(cvm(i,0),i=1..n)];
    A025473_list(240); # Peter Luschny, Sep 21 2011
  • Mathematica
    a = Join[{1}, Flatten[Table[If[PrimeQ[Apply[Plus, CoefficientList[Cyclotomic[n, x], x]]], Apply[Plus, CoefficientList[Cyclotomic[n, x], x]], {}], {n, 1, 1000}]]] (* Roger L. Bagula, Jul 08 2008 *)
    Join[{1}, First@ First@# & /@ FactorInteger@ Select[Range@ 240, PrimePowerQ]] (* Robert G. Wilson v, Aug 17 2017 *)
  • PARI
    print1(1); for(n=2,1e3, if(isprimepower(n,&p), print1(", "p))) \\ Charles R Greathouse IV, Apr 28 2014
    
  • Python
    from sympy import primepi, integer_nthroot, primefactors
    def A025473(n):
        if n == 1: return 1
        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 primefactors(m)[0] # Chai Wah Wu, Aug 15 2024
  • Sage
    def A025473_list(n) :
        R = [1]
        for i in (2..n) :
            if i.is_prime_power() :
                R.append(prime_divisors(i)[0])
        return R
    A025473_list(239) # Peter Luschny, Feb 07 2012
    

Formula

a(n) = A006530(A000961(n)) = A020639(A000961(n)). - David Wasserman, Feb 16 2006
From Reinhard Zumkeller, Jun 26 2011: (Start)
A000961(n) = a(n)^A025474(n).
A056798(n) = a(n)^(2*A025474(n)).
A192015(n) = A025474(n)*a(n)^(A025474(n)-1). (End)
a(1) = A051451(1) ; for n > 1, a(n) = A051451(n)/A051451(n-1). - Peter Munn, Aug 11 2024

Extensions

Offset corrected by David Wasserman, Dec 22 2008

A004825 Numbers that are the sum of at most 3 positive cubes.

Original entry on oeis.org

0, 1, 2, 3, 8, 9, 10, 16, 17, 24, 27, 28, 29, 35, 36, 43, 54, 55, 62, 64, 65, 66, 72, 73, 80, 81, 91, 92, 99, 118, 125, 126, 127, 128, 129, 133, 134, 136, 141, 152, 153, 155, 160, 179, 189, 190, 192, 197, 216, 217, 218, 224, 225, 232, 243, 244, 250, 251, 253
Offset: 1

Views

Author

Keywords

Comments

Or: numbers which are the sum of 3 (not necessarily distinct) nonnegative cubes. - R. J. Mathar, Sep 09 2015
Deshouillers, Hennecart, & Landreau conjecture that this sequence has density 0.0999425... = lim_K Sum_{k=1..K} exp(c*rho(k,K)/K^2)/K where c = -gamma(4/3)^3/6 = -0.1186788..., K takes increasing values in A003418 (or, equivalently, A051451), and rho(k0,K) is the number of triples 1 <= k1,k2,k3 <= K such that k0 = k1^3 + k2^3 + k3^3 mod K. - Charles R Greathouse IV, Sep 16 2016

Crossrefs

A003072 is a subsequence.
Cf. A004999.
Column k=3 of A336820.

Programs

  • Maple
    isA004825 := proc(n)
        local x,y,zc ;
        for x from 0 do
            if 3*x^3 > n then
                return false;
            end if;
            for y from x do
                if x^3+2*y^3 > n then
                    break;
                else
                    zc := n-x^3-y^3 ;
                    if zc >= y^3 and isA000578(zc) then
                        return true;
                    end if;
                end if;
            end do:
        end do:
    end proc:
    A004825 := proc(n)
        option remember;
        local a;
        if n = 1 then
            0;
        else
            for a from procname(n-1)+1 do
                if isA004825(a) then
                    return a;
                end if;
            end do:
        end if;
    end proc:
    seq(A004825(n),n=1..100) ; # R. J. Mathar, Sep 09 2015
    # second Maple program:
    b:= proc(n, i, t) option remember; n=0 or i>0 and t>0
          and (b(n, i-1, t) or i^3<=n and b(n-i^3, i, t-1))
        end:
    a:= proc(n) option remember; local k;
          for k from 1+ `if`(n=1, -1, a(n-1))
          while not b(k, iroot(k, 3), 3) do od; k
        end:
    seq(a(n), n=1..100);  # Alois P. Heinz, Sep 16 2016
  • Mathematica
    q=7; imax=q^3; Select[Union[Flatten[Table[x^3+y^3+z^3, {x,0,q}, {y,x,q}, {z,y,q}]]], #<=imax&] (* Vladimir Joseph Stephan Orlovsky, Apr 20 2011 *)
  • PARI
    list(lim)=my(v=List(),k,t); for(x=0,sqrtnint(lim\=1,3), for(y=0, min(sqrtnint(lim-x^3,3),x), k=x^3+y^3; for(z=0,min(sqrtnint(lim-k,3), y), listput(v, k+z^3)))); Set(v) \\ Charles R Greathouse IV, Sep 14 2015

A181063 Smallest positive integer with a discrete string of exactly n consecutive divisors, or 0 if no such integer exists.

Original entry on oeis.org

1, 2, 6, 12, 3960, 60, 420, 840, 17907120, 2520, 411863760, 27720, 68502634200, 447069823200, 360360, 720720, 7600186994400, 12252240, 9524356075634400, 81909462250455840, 1149071006394511200, 232792560, 35621201198229847200, 5354228880, 91351145008363640400
Offset: 1

Views

Author

Matthew Vandermast, Oct 07 2010

Keywords

Comments

The word "discrete" is used to describe a string of consecutive divisors that is not part of a longer such string.
Does a(n) ever equal 0?
a(n) = A003418(n) iff n belongs to A181062; otherwise, a(n) > A003418(n). a(A181062(n)) = A051451(n).

Examples

			a(5) = 3960 is divisible by 8, 9, 10, 11, and 12, but not 7 or 13. It is the smallest positive integer with a string of 5 consecutive divisors that is not part of a longer string.
From _Gus Wiseman_, Oct 16 2019: (Start)
The sequence of terms together with their divisors begins:
     1: {1}
     2: {1,2}
     6: {1,2,3,6}
    12: {1,2,3,4,6,12}
  3960: {1,2,...,8,9,10,11,12,...,1980,3960}
    60: {1,2,3,4,5,6,...,30,60}
   420: {1,2,3,4,5,6,7,...,210,420}
   840: {1,2,3,4,5,6,7,8,...,420,840}
(End)
		

Crossrefs

The version taking only the longest run is A328449.
The longest run of divisors of n has length A055874(n).
Numbers whose divisors > 1 have no non-singleton runs are A088725.
The number of successive pairs of divisors of n is A129308(n).

Programs

  • Mathematica
    tav=Table[Length/@Split[Divisors[n],#2==#1+1&],{n,10000}];
    Table[Position[tav,i][[1,1]],{i,Split[Union@@tav,#2==#1+1&][[1]]}] (* Assumes there are no zeros. - Gus Wiseman, Oct 16 2019 *)

A181062 Prime powers minus 1.

Original entry on oeis.org

0, 1, 2, 3, 4, 6, 7, 8, 10, 12, 15, 16, 18, 22, 24, 26, 28, 30, 31, 36, 40, 42, 46, 48, 52, 58, 60, 63, 66, 70, 72, 78, 80, 82, 88, 96, 100, 102, 106, 108, 112, 120, 124, 126, 127, 130, 136, 138, 148, 150, 156, 162, 166, 168, 172, 178, 180, 190, 192, 196, 198, 210, 222, 226
Offset: 1

Views

Author

Matthew Vandermast, Oct 07 2010

Keywords

Comments

If 0 is excluded, a(n) gives the possible lengths of the longest string of consecutive divisors of a positive integer: range of values of A055874.
a(n) is the largest number m such that A051451(n) = A003418(m).
From Jianing Song, Nov 01 2023: (Start)
Let q = A000961(n) for n > 1. Then:
- a(n) is the number of units in the finite field F_q.
- a(n) is the number of solutions to x*y = t for any t != 0 in F_q.
- If q is odd, then a(n) is also the number of solutions to x^2 - y^2 = t for any t != 0 in F_q. (End)

Examples

			Any integer that is divisible by 5 consecutive integers will be divisible by at least 6 consecutive integers. Hence 5 is not in the sequence.
		

Crossrefs

Includes A006093 as a subsequence.

Programs

Formula

a(n) = A000961(n)-1.

Extensions

Entry revised by N. J. A. Sloane, Jan 06 2013

A212167 Numbers k such that the maximum exponent in its prime factorization is not greater than the number of positive exponents (A051903(k) <= A001221(k)).

Original entry on oeis.org

1, 2, 3, 5, 6, 7, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 26, 28, 29, 30, 31, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 50, 51, 52, 53, 55, 57, 58, 59, 60, 61, 62, 63, 65, 66, 67, 68, 69, 70, 71, 73, 74, 75, 76, 77, 78, 79, 82, 83
Offset: 1

Views

Author

Matthew Vandermast, May 22 2012

Keywords

Comments

Union of A212166 and A212168. Includes numerous subsequences that are subsequences of neither A212166 nor A212168.

Examples

			40 = 2^3*5^1 has 2 distinct prime factors, hence, 2 positive exponents in its prime factorization (although the 1 is often left implicit).  2 is less than the maximal exponent in 40's prime factorization, which is 3. Therefore, 40 does not belong to the sequence. But 10 = 2^1*5^1 and 20 = 2^2*5^1 belong, since the maximal exponents in their prime factorizations are 1 and 2 respectively.
		

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. 844.

Crossrefs

Complement of A212164. See also A212165.
Subsequences (none of which are subsequences of A212166 or A212168) include A002110, A051451, A129912, A179983, A181826, A181827, A182862, A182863. Includes all members of A003418.

Programs

  • Haskell
    import Data.List (findIndices)
    a212167 n = a212167_list !! (n-1)
    a212167_list = map (+ 1) $ findIndices (>= 0) a225230_list
    -- Reinhard Zumkeller, May 03 2013
    
  • Maple
    isA212167 := proc(n)
        simplify(A051903(n) <= A001221(n)) ;
    end proc:
    for n from 1 to 1000 do
        if isA212167(n) then
            printf("%d,",n) ;
        end if;
    end do: # R. J. Mathar, Jan 06 2021
  • Mathematica
    okQ[n_] := Module[{f = Transpose[FactorInteger[n]][[2]]}, Max[f] <= Length[f]]; Select[Range[1000], okQ] (* T. D. Noe, May 24 2012 *)
  • PARI
    is(k) = {my(e = factor(k)[, 2]); !(#e) || vecmax(e) <= #e; } \\ Amiram Eldar, Sep 09 2024

Formula

A225230(a(n)) >= 0; A050326(a(n)) > 0. - Reinhard Zumkeller, May 03 2013

A181826 Members of A025487 such that A025487(n) >= A181822(n).

Original entry on oeis.org

1, 2, 6, 12, 30, 36, 60, 120, 180, 210, 360, 420, 840, 900, 1260, 1680, 1800, 2310, 2520, 4620, 5040, 5400, 6300, 7560, 9240, 12600, 13860, 18480, 25200, 27000, 27720, 30030, 36960, 37800, 44100, 55440, 60060, 69300, 75600, 83160, 88200, 110880, 120120
Offset: 1

Views

Author

Matthew Vandermast, Dec 08 2010

Keywords

Comments

Includes all members of A003418, A051451 and A129912.

Crossrefs

Formula

Union of A181825 and A181827.

A095848 Deeply composite numbers: numbers n where sigma_k(n) increases to a record for all sufficiently low (i.e., negative) values of k.

Original entry on oeis.org

1, 2, 4, 6, 12, 24, 48, 60, 120, 240, 360, 420, 840, 1680, 2520, 5040, 10080, 15120, 25200, 27720, 55440, 110880, 166320, 277200, 360360, 720720, 1441440, 2162160, 3603600, 7207200, 10810800, 12252240, 24504480, 36756720, 61261200, 122522400
Offset: 1

Views

Author

Matthew Vandermast, Jun 09 2004

Keywords

Comments

Sigma_k(n) > sigma_k(m) for all m < n (where the function sigma_k(n) is the sum of the k-th powers of all divisors of n) for all or almost all negative values of k.
This sequence is infinite, because it includes every term in A051451. This follows from the formula for a(n), and the fact that A051451 consists of the distinct terms of A003418. - Hal M. Switkay, Mar 22 2021
From Hal M. Switkay, Aug 27 2023: (Start)
There is a formula defining members of this sequence for all n.
Let the extended natural numbers N+ = {1, 2, 3, ..., oo}, with the ordering 1 < 2 < 3 < ... < oo.
For every natural number k, let Div+(k) be an infinitely long vector of extended natural numbers, starting with the divisors of k in increasing order, followed by infinitely many coordinates equal to oo. For example:
Div+(6) = (1, 2, 3, 6, oo, oo, oo, ...)
Div+(7) = (1, 7, oo, oo, oo, ...)
Then for all natural numbers n, a(n) = k if and only if k is the smallest natural number such that Div+(k) lexicographically precedes Div+(a(i)), for 1 <= i < n.
(End)

Examples

			The list of the divisors of a(6)=24, {1,2,3,4,6,8,12,24}, lexicographically precedes the list for the previous term in the sequence (in this case, {1,2,3,4,6,12}, the list for a(5)=12). Therefore 24 belongs in the sequence.
36 does not satisfy this requirement, as {1,2,3,4,6,9,...} comes after {1,2,3,4,6,8,...} in lexicographic order. Since 8^k/9^k increases without limit as k decreases, sigma(36)_k < sigma(24)_k for almost all negative values of k; therefore 36 does not belong in the sequence.
		

Crossrefs

Formula

For n >= 4, a(n) is the smallest integer > a(n-1) such that the list of its divisors precedes the list of a(n-1)'s divisors in lexicographic order.

A056604 a(0)=1; thereafter a(n) = lcm(1, 2, 3, 4, ..., prime(n)).

Original entry on oeis.org

1, 2, 6, 60, 420, 27720, 360360, 12252240, 232792560, 5354228880, 2329089562800, 72201776446800, 5342931457063200, 219060189739591200, 9419588158802421600, 442720643463713815200, 164249358725037825439200, 9690712164777231700912800, 591133442051411133755680800
Offset: 0

Views

Author

Labos Elemer, Aug 07 2000

Keywords

Comments

Previous name was: Values of lcm[1,...,m], m = prime, whose squarefree kernels give A002110.
a(n) can be used like A006939(n) for certain kinds of rounding. E.g., the Babylonian a(3) = 60 = 2*2*3*5 divides A006939(3) = 360 = 2*2*2*3*3*5. - Frank Ellermann, Dec 18 2001
a(342) has 1000 decimal digits. - Michael De Vlieger, Mar 05 2017

Examples

			a(5) = lcm(1,2,...,10,11) = 27720, prime(5) = 11. Not all possible lcm(1,..,n) values of A003418 occur, e.g., 12, 840, 25520, etc. are not present. Their squarefree kernels gives exactly A002110.
		

Crossrefs

Programs

  • Magma
    [1] cat [Lcm([2..p]): p in PrimesUpTo(65)]; // Bruno Berselli, Feb 08 2015
  • Maple
    a:= n-> ilcm(`if`(n=0, NULL, $1..ithprime(n))):
    seq(a(n), n=0..20);  # Alois P. Heinz, Dec 05 2014
  • Mathematica
    Table[If[n == 0, 1, LCM @@ Range@ Prime@ n], {n, 0, 18}] (* Michael De Vlieger, Mar 05 2017 *)
  • PARI
    a(n)=lcm(vector(prime(n),i,i)) \\ Charles R Greathouse IV, Oct 27 2013
    
  • PARI
    apply( A056604(n)=lcm([2..if(n,prime(n))]), [0..20]) \\ Or A056604(n) = A003418(prime(n)), might be more efficient. - M. F. Hasler, Jan 04 2020
    

Formula

a(n) = prime(n)^r(n) *...* prime(1)^r(1) for maximal prime(j)^r(j) <= prime(n).
a(n) = Product_{k=1..n} prime(k)^floor(log(prime(n))/log(prime(k))). - Daniel Suteu, Oct 09 2017
a(n) = A003418(prime(n)). - M. F. Hasler, Jan 04 2020

Extensions

a(16) from Frank Ellermann, Dec 18 2001
New name from Charles R Greathouse IV, Oct 27 2013
More terms from Alois P. Heinz, Dec 05 2014
a(0)=1 added to definition by N. J. A. Sloane, Jan 05 2020

A057824 Primes p such that p+1 is LCM(1,...,m) for some (usually more than one) m.

Original entry on oeis.org

5, 11, 59, 419, 839, 232792559, 5354228879, 2329089562799, 144403552893599, 442720643463713815199, 591133442051411133755680799, 69720375229712477164533808935312303556799
Offset: 1

Views

Author

Labos Elemer, Nov 08 2000

Keywords

Comments

Prime numbers of the form A051451(k)-1.
Primes p = LCM(1,...,m) - 1, where m is a prime power. (The prime powers give all values, and do so uniquely.) - Daniel Forgues, Apr 28 2014
This unique prime power m associated with a(n) is m = A385564(n). - Jeppe Stig Nielsen, Jul 09 2025

Examples

			232792559 + 1 = LCM(1,...,m) for m = 19, 20, 21, 22.
		

Crossrefs

Programs

  • Mathematica
    Select[FoldList[LCM, Select[Range[100], PrimePowerQ]] - 1, PrimeQ] (* Amiram Eldar, Aug 18 2024 *)
  • PARI
    L=1; for(n=2,1e3,if(isprimepower(n,&p) && ispseudoprime((L*=p)-1), print1(L-1", "))) \\ Charles R Greathouse IV, Apr 28 2014
Previous Showing 21-30 of 64 results. Next