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

A331886 T(n, k) is the least positive m such that floor(n/m) = floor(k/m). Square array T(n, k) read by antidiagonals, n >= 0 and k >= 0.

Original entry on oeis.org

1, 2, 2, 3, 1, 3, 4, 3, 3, 4, 5, 4, 1, 4, 5, 6, 5, 2, 2, 5, 6, 7, 6, 5, 1, 5, 6, 7, 8, 7, 6, 3, 3, 6, 7, 8, 9, 8, 7, 3, 1, 3, 7, 8, 9, 10, 9, 8, 7, 2, 2, 7, 8, 9, 10, 11, 10, 9, 8, 4, 1, 4, 8, 9, 10, 11, 12, 11, 10, 9, 4, 4, 4, 4, 9, 10, 11, 12, 13, 12, 11, 10
Offset: 0

Views

Author

Rémy Sigrist, Jan 30 2020

Keywords

Examples

			Array T(n, k) begins:
   n\k|   0   1   2   3   4   5   6   7   8   9  10  11  12
   ---+----------------------------------------------------
     0|   1   2   3   4   5   6   7   8   9  10  11  12  13
     1|   2   1   3   4   5   6   7   8   9  10  11  12  13
     2|   3   3   1   2   5   6   7   8   9  10  11  12  13
     3|   4   4   2   1   3   3   7   8   9  10  11  12  13
     4|   5   5   5   3   1   2   4   4   9  10  11  12  13
     5|   6   6   6   3   2   1   4   4   5   5  11  12  13
     6|   7   7   7   7   4   4   1   2   3   5   6   6  13
     7|   8   8   8   8   4   4   2   1   3   5   6   6   7
     8|   9   9   9   9   9   5   3   3   1   2   4   4   7
     9|  10  10  10  10  10   5   5   5   2   1   3   3   7
    10|  11  11  11  11  11  11   6   6   4   3   1   2   5
    11|  12  12  12  12  12  12   6   6   4   3   2   1   5
    12|  13  13  13  13  13  13  13   7   7   7   5   5   1
		

Crossrefs

Programs

  • PARI
    T(n,k) = for (m=1, oo, if (n\m==k\m, return (m)))

Formula

T(n, k) = T(k, n).
T(n, k) = 1 iff n = k.
T(n, k) <= 1 + max(n, k) with equality iff max(n, k) >= 2*min(n, k).
T(n, n+1) = A007978(n+1).

A360805 Nonnegative integers k such that k! mod nextprime(k) is larger than k.

Original entry on oeis.org

0, 31, 120, 283, 293, 712, 2872, 3287, 5028, 5129, 7088, 9553, 13229, 14232, 14799, 15113, 20153, 20830, 23239, 30233, 31430, 31667, 34443, 40654, 44298, 50184, 78877, 105834, 115281, 125120, 164253, 192103, 201590, 227747, 239910, 241910, 282230, 322550, 374370
Offset: 1

Views

Author

Alois P. Heinz, Feb 22 2023

Keywords

Crossrefs

Programs

  • Maple
    q:= n-> is(n! mod nextprime(n)>n):
    select(q, [$0..20000])[];
  • Python
    from itertools import count, islice
    from functools import reduce
    from sympy import nextprime
    def A360805_gen(startvalue=0): # generator of terms >= startvalue
        n = max(startvalue,0)
        m = nextprime(n)
        while True:
            a = m-1
            klist = []
            for i in range(m-1,n,-1):
                a = a*pow(i,-1,m)%m
                if a>i-1:
                    klist.append(i-1)
            yield from sorted(klist)
            n, m = m, nextprime(m)
    A360805_list = list(islice(A360805_gen(),30)) # Chai Wah Wu, Feb 24 2023

Formula

{ k >= 0 : k! mod nextprime(k) > k }.
A360825(a(n)) > a(n).

A061853 Difference between smallest prime not dividing n and smallest nondivisor of n.

Original entry on oeis.org

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

Views

Author

Henry Bottomley, May 10 2001

Keywords

Comments

a(12m+6) is always positive since it involves subtracting 4 from a larger number; the first case where a term not of this form is positive is a(420).
Primorials from A002110(2)=6 onward seem to give the positions of records. - Antti Karttunen, Jul 28 2017
Difference between the smallest prime coprime to n and the smallest non-divisor of n. - Michael De Vlieger, Jul 28 2017

Examples

			a(29)=2-2=0; a(30)=7-4=3; a(420)=11-8=3.
		

Crossrefs

Programs

  • PARI
    a(n) = {my(f = factor(n), d = divisors(f), res, p = 2, i = 1, j); while(i<=#f~ && f[i, 1]==p, i++; p = nextprime(p+1)); res = p; for(j=2, #d, if(d[j]!=j, return(res - d[j-1] - 1)))} \\ David A. Corneth, Jul 29 2017
    
  • Python
    from sympy import nextprime
    def a053669(n):
        p=2
        while n%p==0: p=nextprime(p)
        return p
    def a007978(n):
        p=2
        while n%p==0: p+=1
        return p
    def a(n): return a053669(n) - a007978(n)
    print([a(n) for n in range(1, 101)]) # Indranil Ghosh, Jul 29 2017

Formula

a(n) = A053669(n) - A007978(n).

Extensions

Description corrected by Michael De Vlieger, Jul 28 2017

A066482 The smallest anti-divisor of n.

Original entry on oeis.org

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, 8, 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, 8, 2, 3, 2, 3, 2, 4, 2, 3, 2, 3, 2, 64, 2, 3, 2, 3
Offset: 3

Views

Author

Robert G. Wilson v, Jan 02 2002

Keywords

Comments

Almost identical to A007978, least non-divisor of n, but there are some subtle differences.
See A066272 for definition of anti-divisor.

Crossrefs

Cf. A066481.

Programs

  • Mathematica
    antid[n_] := Select[ Union[ Join[ Select[ Divisors[2n - 1], OddQ[ # ] && # != 1 &], Select[ Divisors[2n + 1], OddQ[ # ] && # != 1 &], 2n/Select[ Divisors[2*n], OddQ[ # ] && # != 1 &]]], # < n & ]; Table[ First[ antid[n]], {n, 3, 100} ]

A208570 LCM of n and smallest nondivisor of n.

Original entry on oeis.org

2, 6, 6, 12, 10, 12, 14, 24, 18, 30, 22, 60, 26, 42, 30, 48, 34, 36, 38, 60, 42, 66, 46, 120, 50, 78, 54, 84, 58, 60, 62, 96, 66, 102, 70, 180, 74, 114, 78, 120, 82, 84, 86, 132, 90, 138, 94, 240, 98, 150, 102, 156, 106, 108, 110, 168, 114, 174, 118, 420, 122
Offset: 1

Views

Author

J. Lowell, Feb 28 2012

Keywords

Comments

a(n) = 2*n for all odd numbers.

Examples

			a(6) = 12 because the divisors of 6 are 1,2,3,6; 4 is the smallest number not a divisor of 6; the LCM of 6 and 4 is 12.
		

Crossrefs

Cf. A007978.
Cf. A258115.

Programs

  • Haskell
    a208570 n = lcm n $ a007978 n  -- Reinhard Zumkeller, May 22 2015
    
  • Maple
    a:= proc(n) local t;
          for t from 2 do
            if irem (n, t)<>0 then return ilcm(t, n) fi
          od
        end:
    seq(a(n), n=1..100); # Alois P. Heinz, Mar 13 2012
  • Mathematica
    Table[LCM[n, Min[Complement[Range[n + 1], Divisors[n]]]], {n, 61}] (* Ivan Neretin, May 20 2015 *)
  • PARI
    a(n) = {my(k=2); while(!(n % k), k++); lcm(n, k); } \\ Michel Marcus, Mar 13 2018

Formula

From Robert Israel, May 20 2015: (Start)
a(n) = lcm(n, A007978(n)).
For primes p let nu_p(n) be the p-adic order of n.
a(n) = p * n where p is the prime that minimizes p^(1+nu_p(n)). (End)

Extensions

More terms from Alois P. Heinz, Mar 13 2012

A242342 a(n) = binomial(n, smallest non-divisor of n).

Original entry on oeis.org

0, 0, 3, 4, 10, 15, 21, 56, 36, 120, 55, 792, 78, 364, 105, 560, 136, 3060, 171, 1140, 210, 1540, 253, 42504, 300, 2600, 351, 3276, 406, 27405, 465, 4960, 528, 5984, 595, 376992, 666, 8436, 741, 9880, 820, 111930, 903, 13244, 990, 15180, 1081, 1712304, 1176
Offset: 1

Views

Author

Reinhard Zumkeller, May 11 2014

Keywords

Crossrefs

Cf. A014105.

Programs

  • Haskell
    a242342 n = if n <= 2 then 0 else a007318' n (a007978 n)
  • Mathematica
    Join[{0,0},Table[Binomial[n,Complement[Range[DivisorSigma[0,n]], Divisors[ n]][[1]]],{n,3,50}]] (* Harvey P. Dale, May 23 2019 *)

Formula

a(n) = A007318(n, A007978(n)) for n > 2.
a(2*n-1) = A014105(n).

A258115 a(n) = A208570(n)/n.

Original entry on oeis.org

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

Views

Author

Robert Israel, May 20 2015

Keywords

Comments

The prime p that minimizes p^(1+nu_p(n)), where nu_p(n) is the p-adic order of n.
It satisfies p^(1+nu_p(n)) = A007978(n).

Crossrefs

Programs

  • Haskell
    a258115 n = a208570 n `div` n  -- Reinhard Zumkeller, May 22 2015
  • Maple
    Primes:= select(isprime,[2,seq(2*i+1,i=1..100)]):
    seq(Primes[min[index](map(p -> p^(1+padic[ordp](n,p)), Primes))],n=1..200);
  • Mathematica
    Table[(LCM[n, Min[Complement[Range[n+1], Divisors[n]]]]/n), {n, 100}] (* Vincenzo Librandi, May 21 2015 *)

A266620 a(n) = least non-divisor of n!.

Original entry on oeis.org

2, 3, 4, 5, 7, 7, 11, 11, 11, 11, 13, 13, 17, 17, 17, 17, 19, 19, 23, 23, 23, 23, 29, 29, 29, 29, 29, 29, 31, 31, 37, 37, 37, 37, 37, 37, 41, 41, 41, 41, 43, 43, 47, 47, 47, 47, 53, 53, 53, 53, 53, 53, 59, 59, 59, 59, 59, 59, 61, 61, 67, 67, 67, 67, 67, 67, 71
Offset: 1

Views

Author

Jeffrey Shallit, Jan 01 2016

Keywords

Comments

It appears that a(n) = A151800(n) with the exception of n = 3. - Robert Israel, Jan 13 2016

Examples

			For n = 4 the least non-divisor of 4! = 24 = 2^3 * 3 is 5.
For n = 5 the least non-divisor of 5! = 120 = 2^3 * 3 * 5 is 7.
		

Crossrefs

Programs

  • Maple
    N:= 100: # to get a(1)..a(N)
    m:= 1 + numtheory:-pi(N):
    Primes:= [seq(ithprime(i),i=1..m)]:
    for i from 1 to m do pindex[Primes[i]]:= i od:
    V:= Vector(m):
    k:= 0:
    for n from 1 to N do
      for f in ifactors(n)[2] do
        q:= pindex[f[1]];
        V[q]:= V[q] + f[2];
        k:= max(k, q);
      od:
      a[n]:= min(seq(Primes[i]^(1+V[i]),i=1..k),Primes[k+1]);
    od:
    seq(a[n],n=1..N); # Robert Israel, Jan 13 2016
  • Mathematica
    Table[Complement[Range[2n], Divisors[n!]][[1]], {n, 30}] (* Alonso del Arte, Sep 23 2017 *)
    Table[Block[{m = n!, k = n + 1}, While[Divisible[m, k], k++]; k], {n, 67}] (* Michael De Vlieger, Sep 23 2017 *)
  • Python
    from sympy import nextprime
    def A266620(n): return 4 if n == 3 else nextprime(n) # Chai Wah Wu, Feb 22 2023

Formula

a(n) = min_{k >= 1} prime(k)^(1 + v(n!, prime(k))) where v(m, p) is the p-adic order of m. - Robert Israel, Jan 13 2016
a(n) = prime(pi(n) + 1) except for n = 3, in which case the least non-divisor of 3! is 4, not 5. - Alonso del Arte, Sep 23 2017

A374369 Triangle T(n, k), n > 0, k = 0..n-1, read by rows; T(n, k) is the least m such that n and k differ modulo m.

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Jul 06 2024

Keywords

Examples

			Triangle T(n, k) begins:
  n   n-th row
  --  ----------------------------------
   1  2
   2  3, 2
   3  2, 3, 2
   4  3, 2, 3, 2
   5  2, 3, 2, 3, 2
   6  4, 2, 3, 2, 3, 2
   7  2, 4, 2, 3, 2, 3, 2
   8  3, 2, 4, 2, 3, 2, 3, 2
   9  2, 3, 2, 4, 2, 3, 2, 3, 2
  10  3, 2, 3, 2, 4, 2, 3, 2, 3, 2
  11  2, 3, 2, 3, 2, 4, 2, 3, 2, 3, 2
  12  5, 2, 3, 2, 3, 2, 4, 2, 3, 2, 3, 2
		

Crossrefs

Programs

  • Mathematica
    T[n_,k_]:=Module[{m=2},While[Mod[n,m]==Mod[k,m], m++]; m]; Table[T[n,k],{n,13},{k,0,n-1}]//Flatten (* Stefano Spezia, Jul 12 2024 *)
  • PARI
    T(n, k) = { for (m = 2, oo, if ((n%m) != (k%m), return (m););); }

Formula

T(n, k) = A007978(n-k).

A382445 Lexicographically least increasing sequence of distinct positive integers such that for any n > 1, a(n) does not divide the concatenation of the earlier terms.

Original entry on oeis.org

1, 2, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70
Offset: 1

Views

Author

Rémy Sigrist, Mar 25 2025

Keywords

Examples

			a(1) = 1.
a(2) must not divide 1; we can take a(2) = 2.
a(3) must not divide 12; we can take a(3) = 5.
		

Crossrefs

Programs

  • PARI
    \\ See Links section.
  • Python
    from itertools import count, islice
    def agen(): # generator of terms
        an = t = 1
        while True:
            yield an
            an = next(k for k in count(an+1) if t%k != 0)
            t = t*10**len(str(an)) + an
    print(list(islice(agen(), 54))) # Michael S. Branicky, Mar 26 2025
    
Previous Showing 21-30 of 36 results. Next